identity patterns and anit-patterns in real world web services

67
Identity patterns & anti-patterns in real world web services ~ By Prabath Siriwardena, WSO2

Upload: prabath-siriwardena

Post on 24-Jan-2015

2.800 views

Category:

Technology


1 download

DESCRIPTION

Identity patterns and anit-patterns in real world web services @ Apache Asia Roadshow 2009 ~ Colombo

TRANSCRIPT

Page 1: Identity patterns and anit-patterns in real world web services

Identity patterns & anti-patterns in real world web services

~ By Prabath Siriwardena, WSO2

Page 2: Identity patterns and anit-patterns in real world web services
Page 3: Identity patterns and anit-patterns in real world web services
Page 4: Identity patterns and anit-patterns in real world web services
Page 5: Identity patterns and anit-patterns in real world web services
Page 6: Identity patterns and anit-patterns in real world web services
Page 7: Identity patterns and anit-patterns in real world web services
Page 8: Identity patterns and anit-patterns in real world web services
Page 9: Identity patterns and anit-patterns in real world web services
Page 10: Identity patterns and anit-patterns in real world web services
Page 11: Identity patterns and anit-patterns in real world web services
Page 12: Identity patterns and anit-patterns in real world web services
Page 13: Identity patterns and anit-patterns in real world web services

Proof of identity

Page 14: Identity patterns and anit-patterns in real world web services

Something you know…

Page 15: Identity patterns and anit-patterns in real world web services

Something you have…

Page 16: Identity patterns and anit-patterns in real world web services

Something you are…

Page 17: Identity patterns and anit-patterns in real world web services

Multifactor Authentication

Page 18: Identity patterns and anit-patterns in real world web services
Page 19: Identity patterns and anit-patterns in real world web services
Page 20: Identity patterns and anit-patterns in real world web services

Anyone can access my Service

Page 21: Identity patterns and anit-patterns in real world web services
Page 22: Identity patterns and anit-patterns in real world web services
Page 23: Identity patterns and anit-patterns in real world web services

WSDL

WSDL

WSDL

Page 24: Identity patterns and anit-patterns in real world web services

WSDL

WSDL

WSDL

Page 25: Identity patterns and anit-patterns in real world web services

Transport Level SecurityVs

Message Level Security

Page 26: Identity patterns and anit-patterns in real world web services

Transport Level Security

Page 27: Identity patterns and anit-patterns in real world web services

Message Level Security

Page 28: Identity patterns and anit-patterns in real world web services

<wsse:UsernameToken wsu:Id="Example-1"><wsse:Username> ... </wsse:Username><wsse:Password Type="..."> ... </wsse:Password><wsse:Nonce EncodingType="..."> ... </wsse:Nonce><wsu:Created> ... </wsu:Created>

</wsse:UsernameToken>

Page 29: Identity patterns and anit-patterns in real world web services

BasicAuth with Transport Level Security

Page 30: Identity patterns and anit-patterns in real world web services

Direct Authentication Pattern

Problem :

How to avoid anonymous users accessing a web service

Page 31: Identity patterns and anit-patterns in real world web services

Direct Authentication Pattern

Solution :

The web service acts as an authentication service to validate credentials from the client.

Page 32: Identity patterns and anit-patterns in real world web services

Direct Authentication Pattern

Implementation(s) :

UsernameToken with WSSEBasicAuth with TLS

Page 33: Identity patterns and anit-patterns in real world web services
Page 34: Identity patterns and anit-patterns in real world web services
Page 35: Identity patterns and anit-patterns in real world web services

Exception Shielding Pattern

Problem :

Exception data output by a service containing implementation details could compromise the security of the service

Page 36: Identity patterns and anit-patterns in real world web services

Exception Shielding Pattern

Solution :

Potentially unsafe exception data is "sanitized" by replacing it with exception data that is safe by design before it is made available to consumers

Page 37: Identity patterns and anit-patterns in real world web services

Users OUT SIDE Our Domain Need ACCESS

Page 38: Identity patterns and anit-patterns in real world web services

Direct Authentication needs us to maintain user credentials internally

Page 39: Identity patterns and anit-patterns in real world web services

We don’t have the credential of external

users

Page 40: Identity patterns and anit-patterns in real world web services

Direct Authentication doesn’t solve our problem

Page 41: Identity patterns and anit-patterns in real world web services

Can’t we delegate Authentication to the External Domain itself

Page 42: Identity patterns and anit-patterns in real world web services
Page 43: Identity patterns and anit-patterns in real world web services
Page 44: Identity patterns and anit-patterns in real world web services
Page 45: Identity patterns and anit-patterns in real world web services
Page 46: Identity patterns and anit-patterns in real world web services

WS-TRUST

Page 47: Identity patterns and anit-patterns in real world web services

Brokered Authentication Pattern

Problem :

How to avoid anonymous users accessing a web service and give access to users outside our domain, where we don’t have the users’ credentials to validate

Page 48: Identity patterns and anit-patterns in real world web services

Brokered Authentication Pattern

Solution :

Delegate authentication to a third party who knows to validate user credentials and the service trusts the assertions provided by that particular third party

Page 49: Identity patterns and anit-patterns in real world web services

Brokered Authentication Pattern

Implementation(s) :

WS-TrustOpenID, Information Cards, OAuth

Page 50: Identity patterns and anit-patterns in real world web services

How do we know the legitimacy of the third party

Security Token Service ?

Page 51: Identity patterns and anit-patterns in real world web services
Page 52: Identity patterns and anit-patterns in real world web services

Data Origin Authentication Pattern

Problem :

How do we prevent an attacker from manipulating messages in transit between a client and a web service.

Page 53: Identity patterns and anit-patterns in real world web services

Data Origin Authentication Pattern

Solution :

Validate message integrity and non-repudiation with message signature

Page 54: Identity patterns and anit-patterns in real world web services

Our services access downstreamresources with the

authenticated user’s credentials

Page 55: Identity patterns and anit-patterns in real world web services

This could bring security risks –and make down stream resources

vulnerable to attacks

Page 56: Identity patterns and anit-patterns in real world web services

How about controlling user access to the down stream resources

Page 57: Identity patterns and anit-patterns in real world web services

Service acts as the client –with service’s credentials

Page 58: Identity patterns and anit-patterns in real world web services
Page 59: Identity patterns and anit-patterns in real world web services

Trusted Sub System Pattern

Problem :

A consumer that accesses backend resources of a service directly can compromise the integrity of the resources and can further lead to undesirable form of implementation coupling.

Page 60: Identity patterns and anit-patterns in real world web services

Trusted Sub System Pattern

Solution :

The service is designed to use it’s own credentials for authentication and authorization with backend resources on behalf of the consumers

Page 61: Identity patterns and anit-patterns in real world web services

Patterns @ Work…

Page 62: Identity patterns and anit-patterns in real world web services
Page 63: Identity patterns and anit-patterns in real world web services
Page 64: Identity patterns and anit-patterns in real world web services

Message Interceptor Gateway Pattern

Problem :

Different services deployed could have different security policies and a security vulnerability of the weakest service could be exploited to create loop holes in entire system.

Page 65: Identity patterns and anit-patterns in real world web services

Message Interceptor Gateway Pattern

Solution :

Provides a single entry point and allows centralization of security enforcement for incoming and outgoing messages.

Page 66: Identity patterns and anit-patterns in real world web services

http://blog.facileLogin.com

http://RampartFAQ.com

[email protected]

[email protected]

Page 67: Identity patterns and anit-patterns in real world web services

Thank You…!!!