Context

An online application needs to access one or more Web services. The Web service requires that the application presents proof of authentication, so that additional controls such as authorization and auditing can be implemented. The organization needs to use an Authentication Broker to issue signed security tokens that can be used for authentication.

Problem

How does the Web service verify the credentials presented by the requesting application?

Forces

 

Solution

Use Brokered Authentication with X.509 certificates issued by a Certificate Authority (CA) in a Public Key Infrastructure (PKI) to verify the credentials presented by the requesting application.

The client application attaches credentials (or a reference to the credentials) to the request message and digitally signs the message using the subject's private key. When a service receives the message it uses the public key, included with the X.509 certificate, to validate the signature. Additional validation may also be required to ensure that the X.509 certificate was issued by a CA that the service trusts.

Participants

 

Process

A mutually trusted Certificate Authority must issue an X.509 certificate before brokered authentication using an X.509 can complete. There are several options that can be used to obtain an X.509 certificate:

Once an X.509 certificate has been issued, local repositories, such as a machine certificate store, are used to store information about the X.509 certificate. The actual process of issuing and distributing X.509 certificates is beyond the scope of this pattern. For detailed information see X.509 Security Primer.

The process of using an X.509 certificate for authentication is shown in Figure 1.

 

Figure 1

Authentication using an X.509 Certificate

1.  The Requestor attaches the Subject’s credentials to the request message. The request message is signed with the private key that is paired with the public key in the Subject’s X.509 certificate. The Requestor can also attach the subject’s X.509 Certificate to the message, if the Service does not store or have access to the X.509 certificates out-of-band. If the X.509 Certificate is not attached, the Requestor instead attaches information to the request message, so that the Service may retrieve the Subject’s X.509 certificate from a certificate repository to verify the message signature.

2.  Requestor sends the message to the Service.

3.  Service authenticates the Subject by performing the following steps:

3.1. Verifying the issuing CA of the subject’s X.509 certificate. This is done by verifying the issuer signature on the Subject’s X.509 certificate against the issuing CA’s X.509 certificate. In order  for this step to be of any value to either party, the CA that issued the Subject’s X.509 certificate must be trusted by both the Requestor and Service.

3.2. The X.509 Certificate is checked to see if it valid. An X.509 certificate is considered to be valid if the issuing CA has not revoked it. The Service checks to see if an X.509 certificate is valid by making sure that the X.509 certificate does not appear on a Certificate Revocation List (CRL) published by the issuing CA.)  The Service can check the CRL by directly accessing it from the CA or by checking against a CRL that was downloaded out-of-band from the issuing CA to the certificate repository used by the Service to look up X.509 Certificates.

3.3. Verifying the Subject's signature by using the public key in the Subject’s X.509 certificate.  This enables the Service not only to authenticate the Subject, but to ensure that the signed data has not been tampered with after the message was signed.

 

 

Note: Checking the validity of the X.509 certificate is optional, however it is highly recommended. For more information on X.509 certificate revocation, see X.509 Security Primer.

 

4.  The Service may send a response back to the Requestor (a response is not always required).

One of the strong points of Brokered Authentication is the ability for a Service to authenticate a Subject even though it has no prior relationship through the Authentication Broker. However, in some cases a Service must be able to authorize subjects based on their identity. The Service must be able to either recognize the Subject individually or verify that the Subject belongs to a limited population of Subjects. There are two different ways that the Service can accomplish this:

 

Resulting Context

The following benefits, liabilities, and security considerations are associated with the use of the X.509 CA as an Authentication Broker.

Benefits

The following benefits are associated with Brokered Authentication using an X.509 PKI:

Liabilities

The following liabilities are associated with using Brokered Authentication with an X.509 PKI:

Security Considerations

The following Security Considerations should be examined for this pattern:

Related Patterns

There are two different types of patterns associated with X.509 PKI Authentication: Child patterns and alternate patterns.

Child Patterns

Implementing Message Layer Security with X.509 Certificates using WSE 2.0 -  Composite pattern that focuses on using Brokered Authentication at the message layer with X.509 certificates in WSE 2.0.

Pattlet – Transport Layer Security using X.509 Certificates and HTTPS -  Pattlet that provides concise reference on how to use SSL for data confidentiality and data integrity and how to use SSL client certificates for brokered authentication and data origin authentication.

Dependent Pat terns

Brokered Authentication - Architectural pattern that describes how to prove a Subject’s identity to an Authentication Broker for issuance of a security token.

Alternate Patterns

Brokered Authentication - Kerberos – Kerberos provides an alternative to X.509 for brokered authentication.

 

 

 

Microsoft Confidential. © 2005 Microsoft Corporation. All rights reserved. By using or providing feedback on these materials, you agree to the attached license agreement.