Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Security patterns with wso2 esb


Published on

Security is a key aspect of any successful enterprise SOA solution.

The Enterprise Service Bus is usually the entry point to an enterprise SOA solution. It is also the central place through which the incoming and outgoing messages flow, thus making it the most relevant location to enforce security measures of the solution.

This presentation which was used in a webinar, goes through the recurring problems and requirements in the space of identity, security and access control of a SOA solution along with the security patterns that can be applied to overcome them using the WSO2 ESB as a security gateway. Use cases are taken from a Healthcare SOA solution to illustrate these challenges and the corresponding solution patterns that can be designed to overcome them.

Published in: Technology, Business
  • Be the first to comment

Security patterns with wso2 esb

  1. 1. Hasini GunasingheSoftware Engineer-WSO2
  2. 2.  Security requirements of a SOA solution in healthcare domain. Security patterns to accomplish them. Implementing patterns with WSO2 ESB.
  3. 3. Hospital Services Channelling consultation Physicians’Patients’ data data Ceycare Systems Medical Laboratory Collaboration with medical Services research institutes Medical Test results Medical statistics
  4. 4.  Why SOA?  Expose legacy sytem components as services.  Loose coupling  Interoperability  Flexibility  Business process composition.
  5. 5.  Why security in SOA?  Business assets exposed to outside as services to be discovered.  Should facilitates interoperability, flexibility.
  6. 6.  Identification and authentication Authorization Intergrity Privacy Security auditing Survivability Non-repudiation Source: Security in SOA-Based Healthcare System
  7. 7. Requirement:Services need to identify and verify the claimedidentity of internal users of the organization.
  8. 8. Pattern:Authentication Patterns: Direct Authentication - Authenticating users with credentials stored internally. - Credentials can be : - Username/password - Username token - X.509 certificates
  9. 9. Patient’s Records: Name:Credential 3 Age: Histroy: 1 Secured Proxy 2 Ceycare credential store
  10. 10. Requirement:Services need to identify and verify the claimedidentity of external users – from partnerorganizations.
  11. 11. Pattern:Authentication Patterns: Brokered Authentication  Authenticating users outside the organization boundary.  Ceycare trusts a token issued by a trusted party in partner organization.  Brokered authentication based on WS-Trust with SAML.
  12. 12. Scenario 1: Authentication accross organizational boundries CeyCare 4 Patient’s Records:Secure Token Name: Service of Age: CeyMed Histroy: 2 Secured Proxy 3 CeyMed 1 credential store CeyMed
  13. 13. Requirement: Facilitate communication between clients and services which talk in different authentication mechanisms.
  14. 14. Pattern:Resource Access Patterns: Protocol Transition  ESB authenticates clients with the auth mechanism that they understand – eg: UT  Transform credentials in the form that service understands - eg: Basic Auth
  15. 15. Patient’s Records: Name: Age: Histroy: BasicAuth Header 3 1 2Username Token Ceycare credential store
  16. 16. Requirements:- Avoid user credentials to be passed to backend service.- Avoid user bypassing security processing.
  17. 17. Pattern:Resource Access Patterns: Trusted sub system pattern  User authenticates to ESB with his/her credentials.  BE service trusts ESB.  ESB accesses BE service on behalf of authenticated user.
  18. 18. Patient’s Records: Name: ESB Age: Credential Histroy: 3 UserCredential Secured Proxy 1 2 Ceycare credential store
  19. 19. Requirement:Control access based on privileges of the users. Eg: Users in role: ‘Physician’ can update patients’ records while users in role: ‘Lab technologist’ can only view records
  20. 20. Pattern:Authorization patterns Role based access control:  Assign users to roles.  Grant privileges to roles.  This is a coarse grained authorization model.
  21. 21. Requirement:Control access based on user’s claims, in a finegrained manner. Eg: Heart patients data could only be accessed by Physicians with job title: “Cardiologists”
  22. 22. Pattern:Authorization patterns Claim based authorization :  Provides fine grained authorization.  Policy based access control with XACML – provides flexibilty.
  23. 23. Authorization based on claims carried in SAML token. Heart Patient’s Records: (4) Allow/deny Name: access Age: Histroy: SAML Token Secured Proxy 1 (3) Authorization decision Entitlement PAP, PDP, Mediator (2) XACML PIP [PEP] Authorization request
  24. 24. Requirement:Delegating access: Eg: Application in a phisician’s mobile device needs to retrieve channelling appointments from his account in Ceycare System.
  25. 25. Pattern:Authorization patterns Constrained delegation using OAuth: 1. Mobile app authenticates to authorization server. 2. Mobile app requests authorization from resource owner. 3. Resource owner authenticates to authorization server. 4. Resource owner grants permissions to the application to access resource on behalf of him. 5. Application obtains access token from access grant. 6. Resource server (ESB) validates access token. 7. Allow/Deny access to BE resource.
  26. 26. Chanelling appointments Name: Time: (7) Allow/ Hospital: Access request+ deny Access Token OAuth access 5 Mediator (6) Validate Access Token Authorization1 request (4) Access Token 2Authorization (3) Authorization grantgrant
  27. 27. Requirements: Protect sensitive personal data during transmission from :  tampering  unauthorized access Non-repudiation - A patient’s account should show who has updated his/her medical records.
  28. 28. Patterns:Message protection patterns: Data origin authentication and intergrity - digital signatures. Data confidentiality - digital encyption.
  29. 29. Example Configuration:
  30. 30. Example Configuration:
  31. 31. Requirement:Avoid exposing sensitive data through exceptions. Legacy application code might throw exceptions containing sensitive information. Need to filter those expections when system is exposed to external parties.
  32. 32. Pattern:Boundry defense pattern Exception shielding: - Sanitize unsafe exception data by replacing it with non-harmful exception message. - Enrich mediator of ESB.
  33. 33.  Example un-safe message:
  34. 34.  Example Configuration:
  35. 35. Requirement:Log security incidents to trace system abuse:- Failed login attempts- Unauthorized access attempts to services
  36. 36. Pattern:Boundry defense pattern: Audit Intercepter  All messages flow through the a gateway of the system. (ESB)  Necessary auditing is done by the logging at the gateway. (Log mediators of ESB)
  37. 37. Example Configuration:
  38. 38. Requirement:Prevent denial of service attacks caused byreplaying valid messages.
  39. 39. Pattern:Boundray defense pattern Replay mitigation:- Apply throttling rules at the entry point (ESB).- Validate message freshness by WS-Security mechanisms (Timestamp).
  40. 40. Applying throttling rules in ESB:Control access at three different levels throughthrottling:1. Global2. Service3. Operation
  41. 41.  Throttling at global level:
  42. 42.  Throttling at service level:
  43. 43.  Configuring throttling in ESB:
  44. 44.  Example Time Stamp in WS-Security Header:
  45. 45. Requriement:Mitigate damages to the system from messageswith malicious content :- SQL injection- X-Doc attacks
  46. 46. Pattern:Boundray defense pattern Message validation :- XML Schema validation.- Regular expression validation to avoid SQL injections contained in strings.- Validation & Filter mediators of ESB.
  47. 47.  Examlpe SQL Injection attack:Query:SELECT * FROM p r e s c r i p t i o n s WHERE pat i ent ID = + $pat i ent ID + ;If$pat i ent ID = 3 5 2 1 ; DROP TABLE p a t i e n t s ;Resulting query causing SQL injection:SELECT FROM p r e s c r i p t i o n s WHERE pat i ent ID = 3 5 2 1 ;DROP TABLE p a t i e n t s ; Source: Security in SOA-Based Healthcare System
  48. 48.  Example Configuration:
  49. 49.  Security requierments related to a healthcare SOA solution. Security patterns used to accomplish them. How WSO2 ESB fits in the security patterns.
  50. 50.  WSO2 Security & Identity Gateway solution white paper: identity-gateway-solution/ Security in SOA based healthcare systems: By Richard Sassoon
  51. 51. Selected Customers e58f41&view=att&th=1331a70983344a32&atti d=0.1&disp=thd&realattid=f_gtxto6mk0&zw
  52. 52. • QuickStart• Development Support• Development Services• Production Support• Turnkey Solutions • WSO2 Mobile Services Solution • WSO2 FIX Gateway Solution • WSO2 SAP Gateway Solution
  53. 53. Contact us: