Web services security_in_wse_3_ppt


Published on

Web Systems Presentation

Published in: Education
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Web services security_in_wse_3_ppt

  1. 1. Harshavardhan Achrekar - Grad Student Umass Lowell presents Scenarios Authentication Patterns Direct Authentication v/s Brokered Authentication Kerberos X.509 PKI STS
  2. 2. <ul><li>What is WSE 3.0 ? </li></ul><ul><li>Simplifies the development and deployment of secure Web services. </li></ul><ul><li>Enables developers and administrators to apply security policies to Web services running on the .NET Framework 2.0. </li></ul><ul><li>Web services communication can be signed and encrypted using Kerberos tickets, X.509 certificates and other custom binary and XML-based security tokens. </li></ul>Introduction
  3. 3. Web Service Security Discussion includes:- <ul><li>Choosing between message layer security and transport layer security. </li></ul><ul><li>Choosing a client authentication technology, from basic direct authentication to more sophisticated brokered solutions, including an in-depth look at X.509 certificates, using the Kerberos version 5 protocol, and solutions involving a Security Token Service (STS). </li></ul><ul><li>Protecting confidentiality of messages. </li></ul><ul><li>Detecting tampered messages. </li></ul><ul><li>Preventing the processing of replayed messages. </li></ul>
  4. 4. Important Concepts <ul><li>Brokered authentication Trusted authority is used to broker authentication services between a client and a service. </li></ul><ul><li>Client 1 ) Access the Web service. 2 ) Provides credentials for authentication during the request to the Web service. </li></ul><ul><li>Credentials A set of claims used to prove the identity of a client. They contain 1 ) An identifier for the client 2 ) Proof of the client’s identity, such as a password. 3 ) Include information, such as a signature, to indicate that the issuer certifies the claims in the credential. (Optional) </li></ul>
  5. 5. <ul><li>Direct authentication Service validates credentials with an identity store, such as a database or directory service. </li></ul><ul><li>Impersonation Act of assuming a different identity on a temporary basis. Purpose:- A different security context or set of credentials can be used to access a resource. </li></ul><ul><li>Message layer security Information related to security (like credentials) is encapsulated in the message. </li></ul><ul><li>Mutual authentication Client authenticates the server in addition to the server that authenticates the client. </li></ul>
  6. 6. <ul><li>Security token 1 ) Credentials Implementers 2 ) Contain additional information that is specific to the authentication broker that issued the token. </li></ul><ul><li>Service A Web service that requires authentication. </li></ul><ul><li>Transport layer security Approach where security protection is enforced by lower level network communication protocols. </li></ul><ul><li>Trusted subsystem 1 ) Use trusted business identity to access resource on behalf of client. 2 ) Service account or identity of an application account created specifically for access to remote resources. </li></ul>
  7. 7. Decision Criteria in Common Scenarios <ul><li>Public Web service 1 ) Transport layer confidentiality with HTTPS 2 ) Username Token </li></ul><ul><li>Intranet Web service 1 ) Message layer security with the Kerberos protocol for an internal banking solution </li></ul><ul><li>Internet business-to-business A B2B solution that uses 1 ) Message layer security with the Kerberos protocol within the organization 2 ) X.509 certificates between businesses. </li></ul><ul><li>Multiple Internet Web services Security Token Service (STS) for a travel agency application . Uses 1 ) direct authentication and 2 ) brokered authentication </li></ul>
  8. 8. Public Web Service Scenario <ul><li>A large clothing distributor wants to provide catalog information of current items to merchants that provide online shopping services. </li></ul><ul><li>Web Apps  Web Services  Catalog Data. </li></ul>
  9. 9. Distributor Web Service Profile <ul><li>A distributor Web service requirements: </li></ul><ul><li>1 ) Web application requires direct access to Web service. </li></ul><ul><li>2) Authenticated Merchants access the Web service. </li></ul><ul><li>3) Data Protection of merchant account information between the merchant and distributor communication. </li></ul>
  10. 10.
  11. 11. Candidate Solution
  12. 12. <ul><li>Implementation: </li></ul><ul><li>The distributor Web service uses a server certificate. Establishes secure communications with the merchant Web application using HTTPS. </li></ul><ul><li>The merchant Web application passes a Username Token to the distributor Web service for authentication. </li></ul><ul><li>Username Token information used to authenticate the merchant Web application. </li></ul><ul><li>The distributor Web service uses a trusted subsystem to access catalog data. </li></ul>
  13. 13. Intranet Web Service Scenario <ul><li>A national bank uses Web services to provide operations that are accessed by an internal banking application. </li></ul><ul><li>Banking application (Windows client)  Web service  bank account database . </li></ul>
  14. 14. Banking Application Requirements <ul><li>1 ) Used in bank branches. </li></ul><ul><li>2 ) User of Application - customer service representative (CSR). </li></ul><ul><li>3 ) Authenticate CSR - a valid user to use banking application. </li></ul><ul><li>4 ) Banking regulations - account activities that the CSR performs must be audited. </li></ul>
  15. 15. Solution Approach
  16. 16.
  17. 17. Candidate Solution
  18. 18. <ul><li>Intranet banking security solution implementation: </li></ul><ul><li>The user’s credentials are used to obtain a security token from the Kerberos Key Distribution Center (KDC) implemented in Active Directory . </li></ul><ul><li>The security token used to sign and encrypt messages sent to the service. </li></ul><ul><li>The security token is used to obtain additional information about the user from Active Directory. </li></ul><ul><li>Impersonation with delegation used to access database. </li></ul>
  19. 19. Internet B2B Scenario <ul><li>A supply chain application for Procurement operations </li></ul><ul><li>The supply chain application  Procurement Web service (intranet)  External ordering Web service (Internet). </li></ul>
  20. 20. Supply Chain Management Requirement <ul><li>1 ) The manufacturing company orders parts from a business partner through an internal line-of-business supply chain management application. </li></ul><ul><li>2 ) Application Users-Factory floor supervisors. </li></ul><ul><li>3 ) The two Web services have to agree on the external service contract. </li></ul><ul><li>4 ) The procurement Web service is one of a few other internal Web services that the supply chain management application uses. SSO user experience mandatory. </li></ul>
  21. 21. Solution Approach <ul><li>Analysis of : Intranet communication and the Internet communication. </li></ul>
  22. 22. Summary of Security Decisions
  23. 23. Candidate Solution
  24. 24. <ul><li>Supply Chain Management security solution implementation: </li></ul><ul><li>The user’s credentials used to obtain a security token from the Kerberos KDC implemented in AD. </li></ul><ul><li>Use security token to sign & encrypt messages sent to service. </li></ul><ul><li>The supplier’s security solution is implemented in the following way: </li></ul><ul><li>X.509 certificates issued & imported into certificate stores. </li></ul><ul><li>X.509 certificates provide mutual authentication, data confidentiality, and data origin authentication between two Web services. </li></ul><ul><li>A perimeter service router forwards requests from the supply chain application to the ordering Web service. </li></ul>
  25. 25. Multiple Internet Web Services Scenario <ul><li>A travel booking franchise provides a Web application that travel agents(Users) can use to search for & book travel packages. </li></ul><ul><li>Web services to </li></ul><ul><li>perform searching and booking travel packages. </li></ul><ul><li>The travel booking Web application is accessible from the Internet. </li></ul>
  26. 26. Travel Booking Application Requirement <ul><li>1 ) Users - Travel agents - help customers book tour packages. </li></ul><ul><li>2 ) Travel packages Web service  travel product catalog information such as tour dates, itineraries, and prices. 3 ) Online booking Web service  travel agents to book tour packages on behalf of the customers. </li></ul><ul><li>4 ) Identity propagation needed  Customers can go to any travel agent in the franchise to book a tour. </li></ul><ul><li>5 ) Performance issues  During peak travel seasons </li></ul>
  27. 27. Solution Approach
  28. 28.
  29. 29. Candidate Solution
  30. 30. <ul><li>Use Direct authentication to access Security Token Service (STS) </li></ul><ul><li>The security token that is returned would then be used for brokered authentication against the Web services to provide data confidentiality and data origin authentication support. </li></ul><ul><li>IMPLEMENTATION </li></ul><ul><li>The STS uses a server certificate to establish secure communications with Web application using HTTPS. </li></ul><ul><li>Web application passes Username Token to STS . </li></ul><ul><li>The STS returns SINGLE security token for interaction with both Web services. </li></ul>
  31. 31. <ul><li>Encryption is not required  the travel package Web service. However, the STS security token is used to sign the messages to provide authentication and encrypt in online booking Web service. </li></ul><ul><li>A trusted subsystem is used to access the product catalog and customer booking database. </li></ul><ul><li>Impersonation  not required for auditing. </li></ul><ul><li>Retrieve agent’s ID from the security token  passed to the customer booking database as part of the request. </li></ul>
  32. 32. Authentication Patterns <ul><li>As computer systems have increased in complexity, the challenge of authenticating users has also increased. As a result, there are a variety of models for authentication. </li></ul><ul><li>E.g., Clients accessing a Web application may directly provide credentials , such as a user name and password. </li></ul><ul><li>A third-party broker, (Kerberos domain controller),provide security token for authentication. </li></ul><ul><li>These two models are referred to as direct authentication and brokered authentication. </li></ul>
  33. 33. Authentication Patterns
  34. 34. Direct Authentication vs. Brokered Authentication <ul><li>In trust relationship , exchange and validate credentials including passwords, direct authentication can be performed. </li></ul><ul><li>For accessing a company’s stock tracking service, establish an ID and password with the provider then use to call its Web service. </li></ul>
  35. 35. <ul><li>Client and service do not share direct trust relationship, use Broker </li></ul><ul><li>The broker authenticates the client issues a security token that the service can use to authenticate the client. </li></ul><ul><li>Verification - token itself contain proof of a relationship with the broker. </li></ul>
  36. 36. Authentication Decision Matrix
  37. 37. Brokered Authentication Options - Security Token Decision Matrix
  38. 38. Direct Authentication <ul><li>Forces </li></ul><ul><li>The credentials that the client presents to the Web service are based on shared secrets, such as passwords. </li></ul><ul><li>The Web service can validate credentials from the client against an identity No support for capabilities such as single-sign on (SSO) or support for non-repudiation. </li></ul><ul><li>The client and the Web service trust one another to manage credentials securely. </li></ul>
  39. 39. Process <ul><li>1. The client sends a request to the Web service, attaching credentials to the request message. </li></ul><ul><li>2. The Web service validates the credentials against an identity store and makes authorization decisions about the client. </li></ul><ul><li>3. The Web service returns a response to the client. (This step is optional.) </li></ul>
  40. 40. Brokered Authentication <ul><li>Forces The client accesses additional services, which results in the need for a single sign on (SSO) solution. </li></ul><ul><li>No Trust Between 1 ) The client and the Web service 2 ) The Web service and the Identity store </li></ul><ul><li>The client and Web service share a standard access control infrastructure. </li></ul><ul><li>An authentication broker that both parties trust independently. </li></ul>
  41. 41. Process 1.The client submits an authentication request to the authentication broker. 2. The authentication broker contacts the identity store to validate the client’ credentials.
  42. 42. <ul><li>3. If authentication successful, issues a security token to Client to authenticate with the service for lifetime of token. </li></ul><ul><li>4. A request message is sent to the service; it contains the security token that is issued by the authentication broker. </li></ul><ul><li>5. The service authenticates the request by validating the security token that was sent with the message. </li></ul><ul><li>6. The service returns the response to the client. </li></ul>
  43. 43. Brokered Authentication- Kerberos <ul><li>Forces </li></ul><ul><li>multiple users clients call Web services, single sign on (SSO) capabilities and Centralized authentication of clients required. </li></ul><ul><li>Interoperability for Clients on different Platforms. Clients may exist in an untrusted network environment. </li></ul><ul><li>Extended capabilities associated with a particular implementation of the Kerberos protocol. E.g. Windows Server 2003 implementation of the Kerberos protocol provides capabilities, such as integration with Active Directory. </li></ul>
  44. 44. Solution <ul><li>Participants: </li></ul><ul><li>Client </li></ul><ul><li>Service </li></ul><ul><li>Key Distribution Center (KDC) The KDC is the authentication broker that is responsible for authenticating clients and issuing service tickets. On the Windows </li></ul><ul><li>platform, the KDC is implemented in Active Directory. </li></ul><ul><li>KDC Components:- 1 ) Account database </li></ul><ul><li> 2 ) Kerberos policy </li></ul>
  45. 45. <ul><li>Account database Identity store to check client credentials presented for authentication. </li></ul><ul><li>Master keys for the client and service are also stored in this database. </li></ul><ul><li>Kerberos policy 1 ) user logon restrictions 2 ) service ticket lifetime 3 ) user ticket lifetime 4 ) clock synchronization </li></ul>
  46. 46. Process <ul><li>1. The client is authenticated with the broker, and given access to a ticket-granting ticket (TGT) to request access to a service. </li></ul><ul><li>2. The client uses the TGT to request access to a particular service, and then it receives a service ticket. </li></ul><ul><li>3. The service uses the service ticket to validate credentials. </li></ul><ul><li>4. Clients can be authenticated through a wide variety of techniques, one is Windows integrated authentication used to access a Web application. </li></ul>
  47. 47. Client Authenticates with Service Concentrate
  48. 48. <ul><li>1. The client sends a TGT in a message to the KDC to request a service ticket for communication with a specific Web service. </li></ul><ul><li>2. The KDC creates a new session key and service ticket that will be used for communication with the requested service. </li></ul><ul><li>The service ticket contains the client’s authorization data and the new session key. The KDC encrypts the service ticket with the Web service’s master key. </li></ul><ul><li>The service ticket and encrypted session key are returned to the client. Both the new session key and service ticket represent credentials used to create a security token that allows access to the Web service. </li></ul><ul><li>The client decrypts the session key and then uses the key to encrypt an authenticator, which contains a timestamp and other information. </li></ul>
  49. 49. <ul><li>The authenticator and session ticket are included in the new Kerberos security token. The session key is not included in the token; however, it is included in the service ticket, which is what the service uses to validate the token. </li></ul><ul><li>3. A request message, which contains the Kerberos security token created in the previous step, is sent to the service. </li></ul><ul><li>4. The service uses its master key to decrypt the service ticket found in the security token and to retrieve the session key. The session key is used to decrypt the authenticator and validate the security token. </li></ul><ul><li>5. (optional)The service returns a response to the client. To provide mutual authentication, the response should contain unique information that is encrypted with the session key to prove to the client that the service knows the session key. </li></ul>
  50. 50. Brokered Authentication: X.509 PKI <ul><li>Forces </li></ul><ul><li>multiple organizational boundaries </li></ul><ul><li>The client and the Web service do not trust each other. </li></ul><ul><li>The authentication broker might be offline or unavailable on some occasions. </li></ul><ul><li>Clients require interoperability of platforms for authentication. </li></ul><ul><li>The organization may need to trace particular actions to a specific client or service. </li></ul>
  51. 51. Solution <ul><li>Participants </li></ul><ul><li>Certificate authority (CA) A CA is an authentication broker that is responsible for authenticating clients and issuing valid X.509 certificates. </li></ul><ul><li>Certificate store This is where the X.509 certificates are located. </li></ul><ul><li>Client </li></ul><ul><li>Service </li></ul>
  52. 52. Process <ul><li>A mutually trusted CA must issue an X.509 certificate. You can obtain an X.509 certificate in one of the following ways: </li></ul><ul><li>● Purchase an X.509 certificate from a public CA. </li></ul><ul><li>● Configure a PKI server, such as Windows Certificate Services, to create an X.509 certificate, and then use the PKI CA to sign the certificate. </li></ul><ul><li>● MakeCert tool create a self-signed certificate . </li></ul><ul><li>The actual process of issuing and distributing X.509 certificates is beyond the scope of this presentation. </li></ul>
  53. 53. <ul><li>1. The client sends a message to the service. The message includes the client’s credentials, signed with the private key that is paired with the public key in the client’s X.509 certificate. </li></ul><ul><li>The client can also attach its X.509 certificate to the message else it attaches a certificate identifier to the request message so that the service can retrieve the client’s X.509 certificate from a certificate repository . </li></ul>
  54. 54. <ul><li>2. The service validates the certificate, by performing checks, including: </li></ul><ul><li>● Verifying that the certificate has not expired. -expiration date in the certificate is past the current date </li></ul><ul><li>● Verifying that the certificate is internally consistent. -By verifying the certificate contents against the signature of the issuing CA. </li></ul><ul><li>● Verifying the issuing CA of the client’s X.509 certificate. This is done by comparing the issuer signature on the user’s X.509 certificate with the X.509 certificate of the issuing CA. </li></ul>
  55. 55. <ul><li>● Verifying that the issuing CA has not revoked the certificate. X.509 certificate does not appear on a certificate revocation list (CRL) published by the issuing CA by directly accessing it from the CA or by checking against a CRL that was previously downloaded from the issuing CA. </li></ul><ul><li>3. The service uses the public key in the client’s X.509 certificate to verify the client’s signature. Thus </li></ul><ul><li>1 ) service to authenticate the client </li></ul><ul><li>2 ) ensure that the signed data has not been tampered with after the message was signed. </li></ul><ul><li>4. (Optional) The service may send a response back to the client. </li></ul>
  56. 56. Brokered Authentication: Security Token Service (STS) <ul><li>Forces </li></ul><ul><li>Clients requiring authentication require interoperability between those platforms. </li></ul><ul><li>Firewalls (ports) protected organizational boundary . </li></ul><ul><li>Participants </li></ul><ul><li>Client </li></ul><ul><li>STS The STS is the Web service that authenticates clients by validating credentials that are presented by a client and issue a security token for a successfully authenticated client. </li></ul><ul><li>Service </li></ul>
  57. 57. Process
  58. 58. <ul><li>1. The client sends authentication request to the STS in the form of an RST message. This step can be performed by presenting the client’s identifier and proof-of-possession. </li></ul><ul><li>The RST message contains a security token that holds the client’s credentials, which are required to authenticate the client. </li></ul><ul><li>The specific security mechanism used for securing the RST depends on the relationship between the client and the STS. </li></ul><ul><li>2. The STS validates the client’s credentials and issue a security token for the authenticated client. For example, the STS may have a policy where it issues tokens only for users who belong to a specific role. </li></ul>
  59. 59. <ul><li>3. If the client’s credentials are successfully validated, the STS issues a security token (such as a SAML token) in an RSTR message to the client; typically, the security token contains claims related to the client. </li></ul><ul><li>When the security token is signed by STS, the service can confirm that the token was issued by the STS and that the security token was not tampered with after it was issued. </li></ul><ul><li>4. The client initializes and sends a request message to the service that includes the issued security token. </li></ul><ul><li>5. The service validates the security token and processes the request. </li></ul><ul><li>6. (Optional) The service initializes and sends a response message to the client. </li></ul>
  60. 60. Conclusion <ul><li>Overview </li></ul><ul><li>Common Scenarios </li></ul><ul><li>Authentication Patterns </li></ul><ul><li>Direct Authentication v/s Brokered Authentication </li></ul><ul><li>Brokered Authentication: Kerberos </li></ul><ul><li>Brokered Authentication: X.509 PKI </li></ul><ul><li>Brokered Authentication: Security Token Service (STS) </li></ul>