Abstract:
The present invention extends to trusted third party authentication for Web services. Web services trust and delegate user authentication responsibility to a trusted third party that acts as an identity provider for the trusting Web services. The trusted third party authenticates users through common authentication mechanisms, such as, for example, username/password and X.509 certificates and uses initial user authentication to bootstrap subsequent secure sessions with Web services. Web services construct user identity context using a service session token issued by the trusted third party and reconstruct security states without having to use a service-side distributed cache.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS  
       [0001]     Not applicable.  
       BACKGROUND OF THE INVENTION  
       [0002]     1. The Field of the Invention  
         [0003]     The present invention relates to computerized authentication and, more particularly, to trusted third party authentication for Web services.  
         [0004]     2. Background and Relevant Art  
         [0005]     Computer systems and related technology affect many aspects of society. Indeed, the computer system&#39;s ability to process information has transformed the way we live and work. For example, computer systems typically include software applications for performing a host of tasks (e.g., word processing, scheduling, and database management) that prior to the advent of the computer system were performed manually. A computer system can also include maintenance, diagnostic, and security applications (e.g., backup applications, health checkers, anti-virus applications, firewalls, etc.) that help to insure that the computer system remains, or can be returned to, an appropriate operating state. For example, an anti-virus application can detect and eliminate computer viruses before any harm is done to the computer system.  
         [0006]     Many computer systems are also typically coupled to one another and to other electronic devices to form both wired and wireless computer networks over which the computer systems and other electronic devices can transfer electronic data. As a result, many tasks performed at a computer system (e.g., voice communication, accessing electronic mail, controlling home electronics, Web browsing, and printing documents) include the exchange of electronic messages between a number of computer systems and/or other electronic devices via wired and/or wireless computer networks.  
         [0007]     Networks have in fact become so prolific that a simple network-enabled computer system may communicate with any one of millions of other computing systems spread throughout the globe over a conglomeration of networks often referred to as the “Internet”. Such computing systems may include desktop, laptop, or tablet personal computers; Personal Digital Assistants (PDAs); telephones; or any other computer or device capable of communicating over a digital network.  
         [0008]     Further, application functionality can be spread or “distributed” across a number of different networked computer systems. That is, a first portion of an application can reside at a first computer system, a second portion of the application can reside at a second computer system, etc., that are all connected to a common network. These types of applications are commonly referred to as “distributed applications.” Distributed applications are particularly prevalent on the World Wide Web (“the Web”).  
         [0009]     To promote interoperability across different platforms, distributed applications on the Web are often developed in accordance with one or more industry specifications. In particular, Web services describes a standardized way of integrating Web-based applications using the eXtensible Markup Language (“XML”), Simple Object Access Protocol (“SOAP”), Web Services Description Language (“WSDL”), and Universal Description, Discovery and Integration (“UDDI”) open standards over the Internet. XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listing what services are available.  
         [0010]     Often used as a means for businesses to communicate with each other and with clients, Web services allow organizations to communicate data without intimate knowledge of each other&#39;s IT systems. Web services share business logic, data and processes through a programmatic interface across a network. Web services allow different applications from different sources to communicate with each other without time-consuming custom coding, and because communication is in XML, Web services are not tied to any one operating system or programming language.  
         [0011]     However, since Web services communicate with one another over, often public, networks, there are security risks associated with transferring data between Web services. For example, malicious users can attempt to intercept Web services data as the data is transferred across a network and can implement programs that impersonate the identity of one Web service in an attempt to have other Web services send Web services data to the impersonating programs. Accordingly, a number of Web Services specifications, such as, for example, WS-security, WS-SecureConversation, and WS-Trust, provide building blocks for addressing some of these security issues, such as, for example, signing and encrypting SOAP messages and requesting and receiving security tokens.  
         [0012]     However, Web services specifications do not constitute an end-to-end security protocol that Web services can rely on to meet all of their security requirements. That is, there is no prescriptive way that describes how different Web service specifications can be used together to enable common application security requirements. For example, there are limited, if any, mechanisms that allow a group of Web services to trust and delegate user authentication responsibility to a trusted third party that acts as an identity provider for the trusting Web services. Further, there are limited, if any, mechanisms that allow a trusted third party to authenticate users through common authentication mechanisms, such as, for example, username/password and X.509 certificates and use initial user authentication to bootstrap subsequent secure sessions with Web services. Additionally, there are limited, if any, mechanisms that allow Web services to construct user identity context using a service session token issued by a trusted third party and to reconstruct security states without having to use a service-side distributed cache.  
         [0013]     Therefore systems, methods, and computer program products that facilitate trusted third party authentication for Web services would be advantageous.  
       BRIEF SUMMARY OF THE INVENTION  
       [0014]     The foregoing problems with the prior state of the art are overcome by the principles of the present invention, which are directed towards methods, systems, and computer program products for trusted third party authentication for Web services. A Web services component sends an authentication request to an authentication service. The authentication service receives the request and validates authentication data contained in the authentication request.  
         [0015]     The authentication service sends an authentication response to the Web services component. The authentication response includes two instances of a first symmetric session key for securing communication between the Web services component and an access granting service. The first instance of the session key is included in a first proof token and secured for delivery to the Web services client. The second instance of the session key is included in a token granting token and encrypted with a secret symmetric key of a security token service.  
         [0016]     The Web services component receives the authentication response. The Web services component sends an access request, which includes the token granting token, for access to a Web service to the access granting service. The access granting service receives the access request and verifies that the Web service component has an authenticated session to the security token service based on the contents of the token granting token.  
         [0017]     The access granting service sends an access granting response to the Web service component. The access granting response includes two instances of a second symmetric session key for securing communication between the Web services component and the Web service. The first instance of the second symmetric session key is encrypted with the first symmetric session key and included in a second proof token. The second instance of the second symmetric session key being encrypted with a public key from a public/private key pair corresponding to the Web service and included in a service token.  
         [0018]     The Web services component receives the access granting response. The Web services component sends a security token request, which includes identity information for the Web service component and the service token, to the Web service. The Web service receives the security token request and uses the corresponding private key of the public/private key to decrypt the second instance of the second symmetric session key included in the service token. The Web service authorizes the Web service component to access the Web service based on the contents of the service token.  
         [0019]     The Web service generates a master symmetric session key for securing communication between the Web services client and the Web service. The Web service encrypts the master symmetric session key using the second symmetric session key to generate an encrypted master symmetric session key. The Web service includes the encrypted master symmetric session key along with a security context token in a security token response. The Web service sends the security token response to the Web services component such that communication between the Web services component and the Web service can be secured using derived symmetric session keys derived from the master symmetric session key. The Web services component receives the security token response and uses the second symmetric session key to decrypt the master symmetric session key.  
         [0020]     These and other objects and features of the present invention will become more fully apparent from the following description and appended claims, or may be learned by the practice of the invention as set forth hereinafter.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0021]     To further clarify the above and other advantages and features of the present invention, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It is appreciated that these drawings depict only typical embodiments of the invention and are therefore not to be considered limiting of its scope. The invention will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:  
         [0022]      FIG. 1A  illustrates an example of a computer architecture that facilitates trusted third party authentication for Web services.  
         [0023]      FIG. 1B  illustrates an alternate depiction of a first portion of the example computer architecture in  FIG. 1A .  
         [0024]      FIG. 1C  illustrates an alternate depiction of a second portion of the example computer architecture in  FIG. 1A .  
         [0025]      FIG. 2  illustrates an example flow chart of a method for acquiring a service token for accessing a Web service.  
         [0026]      FIG. 3  illustrates an example flow chart of a method for securing communication between a Web services component and a Web service.  
         [0027]      FIG. 4  illustrates a suitable operating environment for the principles of the present invention.  
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0028]     The foregoing problems with the prior state of the art are overcome by the principles of the present invention, which are directed towards methods, systems, and computer program products for trusted third party authentication of Web services. A Web services component sends an authentication request to an authentication service. The authentication service receives the request and validates authentication data contained in the authentication request.  
         [0029]     The authentication service sends an authentication response to the Web services component. The authentication response includes two instances of a first symmetric session key for securing communication between the Web services component and an access granting service. The first instance of the session key is included in a first proof token and secured for delivery to the Web services client. The second instance of the session key is included in a token granting token and encrypted with a secret symmetric key of a security token service.  
         [0030]     The Web services component receives the authentication response. The Web services component sends an access request, which includes the token granting token, for access to a Web service to the access granting service. The access granting service receives the access request and verifies that the Web service component has an authenticated session to the security token service based on the contents of the token granting token.  
         [0031]     The access granting service sends an access granting response to the Web service component. The access granting response includes two instances of a second symmetric session key for securing communication between the Web services component and the Web service. The first instance of the second symmetric session key is encrypted with the first symmetric session key and included in a second proof token. The second instance of the second symmetric session key being encrypted with a public key from a public/private key pair corresponding to the Web service and included in a service token.  
         [0032]     The Web services component receives the access granting response. The Web services component sends a security token request, which includes identity information for the Web service component and the service token, to the Web service. The Web service receives the security token request and uses the corresponding private key of the public/private key to decrypt the second instance of the second symmetric session key included in the service token. The Web service authorizes the Web service component to access the Web service based on the contents of the service token.  
         [0033]     The Web service generates a master symmetric session key for securing communication between the Web services client and the Web service. The Web service encrypts the master symmetric session key using the second symmetric session key to generate an encrypted master symmetric session key. The Web service includes the encrypted master symmetric session key along with a security context token in a security token response. The Web service sends the security token response to the Web services component such that communication between the Web services component and the Web service can be secured using derived symmetric session keys derived from the master symmetric session key. The Web services component receives the security token response and uses the second symmetric session key to decrypt the master symmetric session key.  
         [0034]     Embodiments within the scope of the present invention include computer-readable media for carrying or having computer-executable instructions or data structures stored thereon. Such computer-readable media may be any available media, which is accessible by a general-purpose or special-purpose computer system. By way of example, and not limitation, such computer-readable media can comprise physical storage media such as RAM, ROM, EPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other media which can be used to carry or store desired program code means in the form of computer-executable instructions, computer-readable instructions, or data structures and which may be accessed by a general-purpose or special-purpose computer system.  
         [0035]     In this description and in the following claims, a “network” is defined as one or more data links that enable the transport of electronic data between computer systems and/or modules. When information is transferred or provided over a network or another communications connection (either hardwired, wireless, or a combination of hardwired or wireless) to a computer system, the connection is properly viewed as a computer-readable medium. Thus, any such connection is properly termed a computer-readable medium. Combinations of the above should also be included within the scope of computer-readable media. Computer-executable instructions comprise, for example, instructions and data which cause a general-purpose computer system or special-purpose computer system to perform a certain function or group of functions. The computer executable instructions may be, for example, binaries, intermediate format instructions such as assembly language, or even source code.  
         [0036]     In this description and in the following claims, a “computer system” is defined as one or more software modules, one or more hardware modules, or combinations thereof, that work together to perform operations on electronic data. For example, the definition of computer system includes the hardware components of a personal computer, as well as software modules, such as the operating system of the personal computer. The physical layout of the modules is not important. A computer system may include one or more computers coupled via a network. Likewise, a computer system may include a single physical device (such as a mobile phone or Personal Digital Assistant “PDA”) where internal modules (such as a memory and processor) work together to perform operations on electronic data.  
         [0037]     Those skilled in the art will appreciate that the invention may be practiced in network computing environments with many types of computer system configurations, including, personal computers, laptop computers, hand-held devices, multi-processor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile telephones, PDAs, pagers, and the like. The invention may also be practiced in distributed system environments where local and remote computer systems, which are linked (either by hardwired data links, wireless data links, or by a combination of hardwired and wireless data links) through a network, both perform tasks. In a distributed system environment, program modules may be located in both local and remote memory storage devices.  
         [0038]      FIG. 1A  illustrates an example of a computer architecture  100  that facilitates trusted third party authentication for Web services. As depicted in computer architecture  100 , Web service client  101 , security token service  102 , and Web service  108  are connected to network  105 . Network  105  can be a Local Area Network (“LAN”), Wide Area Network (“WAN”), or even the Internet. Computer systems and modules connected to network  105  can receive data from and send data to other computer systems and modules connected to network  105 . Accordingly, Web service client  101 , security token service  102 , and Web service  108 , as well as other connected computer systems and modules (not shown), can create message related data and exchange message related data (e.g., Internet Protocol (“IP”) datagrams and other higher layer protocols that utilize IP datagrams, such as, Transmission Control Protocol (“TCP”), Hypertext Transfer Protocol (“HTTP”), Simple Mail Transfer Protocol (“SMTP”), etc.) over network  105 . For example, Web service client  101  and Web service  108  can create SOAP envelopes and exchange SOAP envelopes (including eXstensinle Markup Language (“XML”) data) over network  105 .  
         [0039]     Within computer architecture  100 , it should be understood that drawing labels including the label portion “Pu” are used to refer to public keys of public/private key pairs and that drawing labels including the label portion “Pr” are used to refer to private keys of public/private key pairs. Further, like numbered drawing labels that include the label portion Pu or Pr refer to either a public key or corresponding private key respectively of the same public/private key pair. Thus, two different public/private key pairs are depicted in computer architecture  100 . One public/private key pair is depicted as public key  163 Pu/private key  163 Pr and another public/private key pair is depicted as public key  164 Pu/private key  164 Pr. Public/private key pairs can be part of a Public Key Infrastructure (“PKI”).  
         [0040]     Private key  163 Pr can be a private key that corresponds to security token service  102 . Thus, Web service client  101  and Web service  108  can be given access to the corresponding public key, public key  163 Pu. Likewise, private key  164 Pr can be a private key that corresponds to Web service  108 . Thus, Web service client  101  and security token service  102  can be given access to the corresponding public key, public key  164 Pu. Accordingly, security token service  102 , Web service client  101 , Web service  108  can utilize the public/private key pairs public key 163 Pu/private key  163 Pr and public key  164 Pu/private key  164 Pr to appropriately sign data, validate signatures, encrypt data, and decrypt data.  
         [0041]     Within computer architecture  100 , it should be understood that drawing labels including the label portion “Dr” are used to refer to derived symmetric keys that have be derived from other symmetric keys. For example, referring briefly to  FIG. 1B , derived client/STS session key  114 Dr is derived from client/STS session key  114 . Accordingly, security token service  102 , Web service client  101 , Web service  108  can also utilize (potentially derived) symmetric keys (e.g., session keys) to sign data, validate signatures, encrypt data, and decrypt data. Symmetric keys can be shared between components in computer architecture  100  or can remain secret to a particular component. For example, security token service  102  can maintain secret symmetric key  161 .  
         [0042]     Security token service  102  includes authentication service  103  and access granting service  106 . Authentication service  103  is configured to receive authentication requests from Web service components (e.g., Web services client  101 ), authenticate the Web service components, and return authentication responses to the requesting Web service components. Authentication module  103  can refer to authentication data  104 , such as, for example, a credentials database or certificate validation data, to authenticate a Web service component. Access granting service  106  is configured to receive access granting requests from Web service components, determine if access is to be granted to a Web service, and return access granting response to requesting Web service components. Access granting service  106  can refer to policy data  107 , such as, for example, policy set by a Web services administrator, to determine if access is to be granted.  
         [0043]     Web service client  101  can be a client portion of a distributed application. Trust  191  represents that Web service client  101  has an established trust relationship with security token service  102 . That is, Web service client  101  trusts security token service  102 . Trust  191  can be pre-established and/or can result from out-of-band communication. For example, trust  191  can be a symmetric key trust or an X.509 certificate trust.  
         [0044]     Web service  108  can be a server portion of a distributed application. In some embodiments, Web service  108  is a Web service farm including multiple Web service instances, such as, for example, instances  108 A,  108 B, and  108 C. State information for Web service clients connected to each instance  108 A,  108 B, and  108 C can optionally be maintained in distributed cache  109  such that Web service clients can more efficiently transition between instances  108 A,  108 B and  108 C.  
         [0045]     Trust  192  represents that Web service  108  has an established trust relationship with security token service  102 . That is, Web service  108  trusts security token service  102 . Trust  192  can be pre-established and/or can result from out-of-band communication. For example, trust  192  can be a symmetric key trust or an X.509 certificate trust.  
         [0046]      FIG. 1B  illustrates an alternate depiction of Web service client  101  and security token service  102  from computer architecture  100 .  FIG. 1B  also depicts a number of electronic messages that are exchanged (e.g., via network  105 ) between Web service client  101  and security token service  102 . As depicted, some of the data elements in  FIG. 1B  include parenthetical descriptions. For example, signature  119  includes the parenthetical description “(secret symmetric key  161 )”. These parenthetical descriptions are used to indicate what key was used to encrypt encrypted data or sign signed data or how data was secured.  
         [0047]     Thus, referring back to signature  119 , the parenthetical description “(secret (symmetric key  161 )” indicates that secret symmetric key  161  was used to generate signature  119 . Similarly, referring now to encrypted client-service session key  131 B, the parenthetical description “(public key  164 Pu)” indicates that public key  164 Pu was used to encrypt encrypted client-service session key  131 B. Referring now to secured client/STS session key  114 A, the parenthetical description “(secure channel or X.509)” indicates that secured client/STS session key  114  was secured over a secure channel or using the public key in an X.509 certificate.  
         [0048]      FIG. 2  illustrates an example flow chart of a method  200  for acquiring a service token for accessing a Web service. The method  200  will be described with respect to the components and data in  FIG. 1B .  
         [0049]     Method  200  includes an act of sending an authentication request (act  201 ). For example, Web service client  101  can send authentication request  111  to authentication service  103 . Authentication request  111  can include a user name and password that are protected using a secure channel, such as, for example, HTTPS. Alternately, authentication request  111  can include an X.509 certificate that is signed with a private key (not shown) corresponding to Web service client  101 .  
         [0050]     Method  200  includes an act of receiving an authentication request (act  205 ). For example, authentication service  103  can receive authentication request  111 . Method  200  includes an act of validating authentication data (act  206 ). For example, authentication service  103  can compare a user name and password contained in authentication request  111  to authentication data  104  (e.g., a credentials database). Alternately, authentication service  103  can refer to authentication data  104  (e.g., a PKI) to locate a public key for Web service client  101  and use the public key to validate a signature on authentication request  111 .  
         [0051]     Method  200  includes an act of sending an authentication response including a symmetric session key (act  207 ). For example, security token service  102  can send authentication response  112  to Web service client  101 . Authentication response  112  includes proof token  113  and token granting token  116 . Both proof token  113  and token granting token  116  include an instance of client/STS session key  114  (a symmetric key) that can be used to secure communications between Web service client  101  and access granting service  106 . Proof token  113  includes secured client/STS session key  114 A that is encrypted over a secure channel or through the public key in an X.509 certificate.  
         [0052]     Token granting token  116  includes encrypted client/STS session key  114 B that was encrypted using secret symmetric key  161 . Token granting token  116  also includes time stamp  118  indicating when token granting token  118  was issued. To prevent tampering, token granting token  116  also includes signature  119  that was generated using secret symmetric key  161 . Alternately, a different secret symmetric key can be used to generate signature  119 .  
         [0053]     Authentication response  112  includes signature  121  that was generated using private key  163 Pr (security token service  102 &#39;s private key). Signature  121  indicates to a receiving component that security token service  102  created authentication response  112 .  
         [0054]     Method  200  includes an act of receiving an authentication response including the symmetric session key (act  202 ). For example, Web service client  101  can receive authentication response  112 . Web service  101  validate signature  121  (thereby validating authentication response  112 ) using public key  163 Pu. Web service client  101  can extract client/STS session key  114 A from proof token  113  and maintain a copy of client/STS session key  114 .  
         [0055]     Web service client  101  can derive other session keys, such as, for example, derived client/STS session key  114 Dr, from client/STS session key  114 . Subsequently, for example when Web service client  101  is to communicate with a Web service, Web service client  101  can utilize a (potentially derived) session key to secure communication with access granting service  106 . It may also be that security token service  102  derives other session keys from client/STS session key  114 .  
         [0056]     Web service client  101  and security token service  102  can utilize the same key derivation algorithms such that derived keys at Web service client  101  and security token service  102  continue to be symmetric after derivation. Thus, security token service  102  can also derive derived client/STS session key  114 Dr from client/STS session key  114 .  
         [0057]     Method  200  includes an act of sending an access request for access to a Web service (act  203 ). For example, Web service client  101  can send access granting request  122  to access granting service  106 . Access granting request  122  includes token granting token  116 . Access granting request  122  includes signature  127  that was generated using derived client/STS session key  114 Dr. Signature  122  indicates that access granting request  122  is included in an authentication session between Web service client  101  and security token service  102 .  
         [0058]     Method  200  includes an act of receiving the access request for access to the Web service (act  208 ). For example, access granting service  106  can receive access granting request  122  from Web service client  101 . Method  200  includes an act of verifying an authentication session (act  209 ). For example, access granting service  106  can verify that Web service client  101  has an authenticated session to security token service  102 . Subsequent to receipt of access granting request  122 , access granting service  106  can validate signature  127  (thereby validating access granting request  122 ) using derived client/STS session key  114 Dr.  
         [0059]     Access granting service  106  can then validate signature  119  (thereby validating token granting token  116 ) using secret symmetric key  161 . Access granting service  106  can also decrypt encrypted client/STS session key  114 B using secret symmetric key  116  to reveal client/STS session key  114 . Based on token granting token  116  containing an instance of client/STS session key  114 , access granting service determines that Web service client  101  has an authenticated session to security token service  102 .  
         [0060]     Method  200  includes an act of sending an access response (act  211 ). For example, access granting service  106  can send access granting response  128  to Web service client  101 . Access granting response  128  includes proof token  129  and service token  132 . Both proof token  128  and service token  132  include an instance of client-service session key  131  (a symmetric key) that can be used to secure communications between Web service client  101  and Web service  108 . Proof token  129  includes encrypted client-service session key  131 A that is encrypted using client/STS session key  114  (or a derivative thereof). Thus, Web service client  101  can decrypt encrypted client-service session key  131 A (using client/STS session key  114  or the derivative thereof) to reveal client-service session key  131 .  
         [0061]     Service token  132  includes encrypted client-service session key  131 B that was encrypted using public key  164 Pu (the public key for Web service  108 ). To indicate that service token  132  is from security token service  102 , service token  132  includes signature  134  that was generated using private key  163 Pr (the private key for security token service  102 ). Thus, Web service  108  can validate signature  134  using public key  163 Pu (the corresponding public key for security token service  102 ) to verify that service token  132  was sent from security token service  102 . Web service  108  can also decrypt encrypted client-service session key  131 B using private key  164 Pr (the corresponding private key for Web service  108 ).  
         [0062]     Accordingly, a client-service session key can be transferred to both a client and service in a secure manner.  
         [0063]     Method  200  includes an act of receiving an access response (act  204 ). For example, Web service client  101  can receive access granting response  128 . From proof token  129 , Web service client can decrypt encrypted client-service session key  131 A (Using client/STS session key  114  or a derivative thereof) to reveal client-service session key  131 . Web service client  101  can store client-service session key  131  to facilitate subsequent communication with Web service  108 . Web service client  101  can also store service token  132  for subsequent transfer to Web service  108 .  
         [0064]      FIG. 1C  illustrates an alternate depiction of Web service client  101 , security token service  102  and Web service  108  from computer architecture  100 .  FIG. 1B  also depicts a number of electronic messages that are exchanged (e.g., via network  105 ) between Web service client  101  and Web service  108 .  FIG. 3  illustrates an example flow chart of a method  300  for securing communication between a Web services component and a Web service. Method  300  will be described with respect to the components and data in  FIG. 1C .  
         [0065]     Method  300  includes an act of sending a security token request (act  301 ). For example, Web service client  101  can send security token request  136  to instance  108 A of Web service  108 . Security token request  136  includes service token  132  (issued from security token service  102 ). Security token request  136  includes signature  141  that was a generated using client-service session key  131 . Security token request  136  can also include identity information corresponding to Web service  101 .  
         [0066]     Method  300  includes an act of receiving the security token request (act  304 ). For example, instance  108 A can receive security token request  136  from Web service client  101 . Method  300  includes an act of using a private key to decrypt an encrypted session key (act  305 ). For example, instance  108 A can decrypt encrypted client-service session key  131 B using private key  164 Pr to reveal client-service session key  131 . Instance  108 A can also validate signature  134  using public key  163 Pu to verify that that service token  132  was sent from security token service  102 . Subsequently, instance  108 A can validate signature  141  using (the previously revealed) client-service session key  131 .  
         [0067]     Method  300  includes an act of authorizing the Web service component to access the Web service (act  306 ). For example, Web service  108  (based on specified policies) can authorize Web service client  101  to access Web service  108 . Method  300  includes an act of generating a master symmetric session key (act  307 ). For example, Web service  108  can generate master client-service session key  193  for securing communication between Web service client  101  and instances of Web service  108 .  
         [0068]     Method  300  includes an act of encrypting the master symmetric session key (act  308 ). For example, instance  108 A can encrypt master client-server session key  193  using client-service session key  131  to generate encrypted master client-server session key  193 A. Instance  108 A can include encrypted master client-server session key  193 A along with security context token  146  in security token response  142 . Security token context contains security context data for secure communication between Web service client  101  and instances of Web service  108 .  
         [0069]     In some embodiments, security context token  146  includes optional binary extension  147 . Web service instances that receive binary extension  147  can use data contained in binary extension  147  to reconstruct security states without having to refer to a service-side distributed cache. Accordingly, in embodiments that utilize binary extension  147 , Web services are relieved from having to maintain a service-side distributed cache. Further, representing security context information in a binary format facilitates security context token processing without having to perform, potentially resource intensive, XML canonicalization.  
         [0070]     Method  300  includes an act of sending a security token response (act  309 ). For example, instance  108 A can send security token response  142  to Web service client  101 . Method  300  includes an act of receiving the security token response. For example, Web service client  101  can receive security token response  142  from instance  108 A. Web service client  101  can decrypt encrypted master client-server session key  193 A using client-service session key  131  to reveal master client-server session key  193 . Accordingly, subsequent communication between Web service client  101  and instances of Web service  108  can be secured using master client-service session key or derivatives thereof.  
         [0071]     In accordance with a common key derivation algorithm, both Web service client  101  and Web service  108  can derive additional symmetric session keys, such as, for example, master client-server session keys  193 Dr 1 ,  193 Dr 2 ,  193 Dr 3 , and  193 Dr 4 , from master client-server session key  193 . Web service client  101  and Web service  108  can then use the derived keys for securing communication between one another.  
         [0072]     Method  300  includes acts of exchanging data using derived keys (act  303  and act  310 ). For example, Web service client  101  can use derived key  193 Dr 1  to generate encrypted service request  148 . Encrypted service request  148  includes security context token  146  and request data  194 . Encrypted service request  148  also includes signature  152  that was generated using derived key  193 Dr 3 .  
         [0073]     Instance  108 C can receive encrypted service request  148 . Instance  108 C can use derived key  193 Dr 1  to decrypt encrypted service request  148  revealing security context token  146  and request data  194 . Instance  108 C can also validate signature  152  using derived key  193 Dr 3  to verify that encrypted service request  148  is part of a secure communication between Web service client  1010  and Web service  108 . Instance  108 C can process security context token  146  and request data  104  to determine how to respond to Web service client  101 .  
         [0074]     Instance  108 C can use derived key  193 Dr 2  to generate encrypted service response  153 . Encrypted service response  153  includes response data  196  that is responsive to request data  194 . Encrypted service response  153  also includes signature  154  that was generated using derived key  193 Dr 4 .  
         [0075]     Web service client  101  can receive encrypted service response  153 . Web service client  101  can use derived key  193 Dr 2  to decrypt encrypted service response  153  revealing response data  196 . Web service  101  can also validate signature  154  using derived key  193 Dr 4  to verify that encrypted service response  153  is part of a secure communication between Web service client  101  and Web service  108 .  
         [0076]     Thus, embodiments of the present invention can initially use public/private key pairs (e.g., public key  163 Pu/ private key  163 Pr and public key  163 Pu/ private key  163 Pr) for secure communication taking advantage of existing key infrastructures, such as, for example, PKI. A subsequent transition to using symmetric session keys (e.g., master client-service session key  193  and derivatives thereof) for secure communication can be made. Accordingly, embodiments of the present invention can leverage the key management features of existing public key infrastructures and then subsequently transition to symmetric keys for efficiency.  
         [0077]     Token granting tokens (e.g., token granting token  116 ) and service tokens (e.g., service token  132 ) can be expressed as custom XML tokens. The following XML instructions are example description of a custom XML token in accordance with the principles of the present invention:  
                                   1.   &lt;contoso:IdentityTokenEx contoso:TokenId=... contoso:MajorVersion=...       contoso:MinorVersion=... contoso:Issuer=... contoso:IssueTime=... contoso:Purpose=...&gt;       2.   &lt;contoso:Conditions NotBefore=”...” NotOnOrAfter=”...” /&gt;       3.   &lt;wsp:AppliesTo&gt;       4.     &lt;wsa:EndpointReference&gt;       5.      &lt;wsa:Address&gt;...&lt;/wsa:Address&gt;       6.     &lt;/wsa:EndpointReference&gt;       7.    &lt;/wsp:AppliesTo&gt;       8.    &lt;contoso:TokenStatement contoso:AuthenticationMechanism=...           contoso:AuthenticationTime=... /&gt;       9.     &lt;contoso:SubjectName&gt;...&lt;/contoso:SubjectName&gt;       10.    &lt;ds:KeyInfo&gt;       11.   &lt;xenc:EncryptedKey Id=... &gt;       12.      &lt;xenc:EncryptionMethod Algorithm=... /&gt;       13.      &lt;ds:KeyInfo &gt;       14.        &lt;wsse:SecurityTokenReference&gt;       15.         &lt;wsse:KeyIdentifier ValueType=... EncodingType=... &gt;       16.     ...       17.         &lt;/wsse:KeyIdentifier&gt;       18.        &lt;/wsse:SecurityTokenReference&gt;       19.       &lt;/ds:KeyInfo&gt;       20.        &lt;xenc:CipherData&gt;       21.         &lt;xenc:CipherValue&gt;       22.         ...       23.        &lt;/xenc:CipherValue&gt;       24.        &lt;/xenc:CipherData       25.       &lt;/xenc:EncryptedKey&gt;       26.     &lt;/ds:KeyInfo&gt;       27.    &lt;/contoso:TokenStatement&gt;       28.    &lt;ds:Signature&gt;       29.     &lt;ds:SignedInfo&gt;       30.        &lt;ds:CanonicalizationMethod                  Algorithm=‘http://www.w3.org/2001/10/xml-exc-c14n#’ /&gt;       31.      &lt;ds:SignatureMethod Algorithm=... /&gt;       32.     &lt;ds:Reference URI=... &gt;       33.      &lt;ds:Transforms&gt;       34.       &lt;ds:Transform                Algorithm=’http://www.w3.org/2000/09/xmldsig#enveloped_signature’ /&gt;       35.       &lt;ds:Transform Algorithm=’http://www.w3.org/2001/10/xml-exc-c14n#’ /&gt;       36.         &lt;/ds:Transforms&gt;       37.         &lt;ds:DigestMethod Algorithm=... /&gt;       38.         &lt;ds:DigestValue&gt;...&lt;/ds:DigestValue&gt;       39.        &lt;/ds:Reference&gt;       40.     &lt;/ds:SignedInfo&gt;       41.     &lt;ds:SignatureValue&gt;...&lt;/ds:SignatureValue&gt;       42.     &lt;ds:KeyInfo&gt;       43.        &lt;wsse:SecurityTokenReference&gt;       44.         &lt;wsse:KeyIdentifier ValueType=... EncodingType=... &gt;...       45.         &lt;/wsse:KeyIdentifier&gt;       46.        &lt;/wsse:SecurityTokenReference&gt;       47.     &lt;/ds:KeyInfo&gt;       48.    &lt;/ds:Signature&gt;       49.  &lt;/contoso:IdentityTokenEx&gt;                  
 
         [0078]     At line 1, the IdentityTokenEx\@TokenId attribute identifies the security token using a URI. The data type is xsd:ID. Each security token URI can be unique to both the sender and recipient. URI values value be globally unique in time and space. Also at line 1, the IdentityTokenEx\@MajorVersion attribute identifies the major version of this custom token and the IdentityTokenEx\@MinorVersion attribute identifies the minor version of this custom token. Also at line 1, the IdentityTokenEx\@Issuer attribute identifies the issuer of this token using a URI. Also at line 1, the IdentityTokenEx\@IssueTime attribute represents the time (e.g, UTC format) the token is issued. The XML schema for this value is xsd:dateTime.  
         [0079]     Also at line 1, the IdentityTokenEx\@Purpose attribute identifies the purpose of this custom token, using a QName. Values can include:  
                                                   QName   Description                           contoso:TokenGrantingToken   Token that is used by an access               granting service to grant other               service token.           contoso:ServiceToken   Token that is used to access an               application Web service.                      
 
         [0080]     At line 2, the IdentityTokenEx\contoso:Conditions element specifies the conditions under which this token is valid. Also at line 2, the IdentityTokenEx\Conditions\@NotBefore attribute specifies the earliest time (e.g., UTC format) which this token becomes valid. The schema for this value is xsd:dateTime. Also at line 2, the IdentityToken\ExConditions\@NotOnOrAfter attribute specifies the earliest time (e.g., UTC format) which this token becomes invalid. The schema for this value is xsd:dateTime.  
         [0081]     At lines 3-7, the IdentityTokenExwsp:AppliesTo element specifies the endpoint for which this token is valid. At lines 4-6, the IdentityTokenEx\AppliesTo\wsa:EndpointReference element contains a reference to an endpoint for which the token is valid. At line 5, the IdentityTokenEx\AppliesTo\EndpointReference\wsa:Address element specifies the URI of the endpoint.  
         [0082]     At lines 8-27, the IdentityTokenEx\TokenStatement element contains authentication and identity information related to the authenticated session. Also at line 8, the IdentityTokenEx\TokenStatement\@AuthenticationMechanism attribute identifies the authentication mechanism that is used to authenticate the subject, using a QName. Values can include:  
                                                   QName   Description                           contoso:password   A username and password is used to               authenticate the subject.           contoso:x509certificate   An X509 certificate is used to authenticate               the subject.                      
 
 Also at line 8, the IdentityTokenEx\TokenStatement\@AuthenticationTime element identifies the time (e.g., UTC format) when the authentication take place. The XML schema for this value is xsd:dateTime. 
 
         [0083]     At line 9, the IdentityTokenEx\TokenStatement\SubjectName element identifies the party that has been authenticated. At lines 10-26, the IdentityTokenEx\TokenStatement\ds:KeyInf element contains a session key that is exchanged through this token. At lines 11-25, the IdentityTokenEx\TokenStatement\KeyInfo\xenc:EncryptedKey element contains an encrypted session key. At lines 28-48, the IdentityToken\Exds:Signature element contains an enveloped signature over the custom XML token.  
         [0084]     In some embodiments, Web service components and Web services can exchange extended security context tokens (e.g., security context token  146 ). The following XML instructions are example description of an extended security context token in accordance with the principles of the present invention:  
                                                   60.  &lt;wst:SecurityContextToken wsu:Id=... &gt;           61.   &lt;wsu:Identifier&gt;...&lt;/wsu:Identifier&gt;           62.    &lt;contoso:SctExtension&gt;           63.    MIIEZzCCA9CgAwIBAgIQEmtJZc0...           64.    &lt;/contoso:SctExtension&gt;           65.  &lt;/wst:SecurityContextToken&gt;                      
 
         [0085]     At lines 62-64, the SecurityContextToken\contoso:SctExtension element contains the SCT custom extensions encoded in base 64  binary format.  
         [0086]     XML instructions describing token granting tokens, service tokens, and extended security context tokens can be included in SOAP messages, such as, for example authentication response  112 , access granting response  128 , and security token response  142  that are exchanged between components of computer architecture  100 .  
         [0087]      FIG. 4  illustrates a suitable operating environment for the principles of the present invention.  FIG. 4  and the following discussion are intended to provide a brief, general description of a suitable computing environment in which the invention may be implemented. Although not required, the invention will be described in the general context of computer-executable instructions, such as program modules, being executed by computer systems. Generally, program modules include routines, programs, objects, components, data structures, and the like, which perform particular tasks or implement particular abstract data types. Computer-executable instructions, associated data structures, and program modules represent examples of the program code means for executing acts of the methods disclosed herein.  
         [0088]     With reference to  FIG. 4 , an example system for implementing the invention includes a general-purpose computing device in the form of computer system  420 , including a processing unit  421 , a system memory  422 , and a system bus  423  that couples various system components including the system memory  422  to the processing unit  421 . Processing unit  421  can execute computer-executable instructions designed to implement features of computer system  420 , including features of the present invention. The system bus  423  may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. The system memory includes read only memory (“ROM”)  424  and random access memory (“RAM”)  425 . A basic input/output system (“BIOS”)  426 , containing the basic routines that help transfer information between elements within computer, system  420 , such as during start-up, may be stored in ROM  424 .  
         [0089]     The computer system  420  may also include magnetic hard disk drive  427  for reading from and writing to magnetic hard disk  439 , magnetic disk drive  428  for reading from or writing to removable magnetic disk  429 , and optical disk drive  430  for reading from or writing to removable optical disk  431 , such as, or example, a CD-ROM or other optical media. The magnetic hard disk drive  427 , magnetic disk drive  428 , and optical disk drive  430  are connected to the system bus  423  by hard disk drive interface  432 , magnetic disk drive-interface  433 , and optical drive interface  434 , respectively. The drives and their associated computer-readable media provide nonvolatile storage of computer-executable instructions, data structures, program modules, and other data for the computer system  420 . Although the example environment described herein employs magnetic hard disk  439 , removable magnetic disk  429  and removable optical disk  431 , other types of computer readable media for storing data can be used, including magnetic cassettes, flash memory cards, digital versatile disks, Bernoulli cartridges, RAMs, ROMs, and the like.  
         [0090]     Program code means comprising one or more program modules may be stored on hard disk  439 , magnetic disk  429 , optical disk  431 , ROM  424  or RAM  425 , including an operating system  435 , one or more application programs  436 , other program modules  437 , and program data  438 . A user may enter commands and information into computer system  420  through keyboard  440 , pointing device  442 , or other input devices (not shown), such as, for example, a microphone, joy stick, game pad, scanner, or the like. These and other input devices can be connected to the processing unit  421  through input/output interface  446  coupled to system bus  423 . Input/output interface  446  logically represents any of a wide variety of different interfaces, such as, for example, a serial port interface, a PS/2 interface, a parallel port interface, a Universal Serial Bus (“USB”) interface, or an Institute of Electrical and Electronics Engineers (“IEEE”) 1394 interface (i.e., a FireWire interface), or may even logically represent a combination of different interfaces.  
         [0091]     A monitor  447  or other display device is also connected to system bus  423  via video interface  448 . Other peripheral output devices (not shown), such as, for example, speakers and printers, can also be connected to computer system  420 .  
         [0092]     Computer system  420  is connectable to networks, such as, for example, an office-wide or enterprise-wide computer network, a home network, an intranet, and/or the Internet. Computer system  420  can exchange data with external sources, such as, for example, remote computer systems, remote applications, and/or remote databases over such networks.  
         [0093]     Computer system  420  includes network interface  453 , through which computer system  420  receives data from external sources and/or transmits data to external sources. As depicted in  FIG. 4 , network interface  453  facilitates the exchange of data with remote computer system  483  via link  451 . Network interface  453  can logically represent one or more software and/or hardware modules, such as, for example, a network interface card and corresponding Network Driver Interface Specification (“NDIS”) stack. Link  451  represents a portion of a network (e.g., an Ethernet segment), and remote computer system  483  represents a node of the network.  
         [0094]     Likewise, computer system  420  includes input/output interface  446 , through which computer system  420  receives data from external sources and/or transmits data to external sources. Input/output interface  446  is coupled to modem  454  (e.g., a standard modem, a cable modem, or digital subscriber line (“DSL”) modem) via link  459 , through which computer system  420  receives data from and/or transmits data to external sources. As depicted in  FIG. 4 , input/output interface  446  and modem  454  facilitate the exchange of data with remote computer system  493  via link  452 . Link  452  represents a portion of a network and remote computer system  493  represents a node of the network.  
         [0095]     While  FIG. 4  represents a suitable operating environment for the present invention, the principles of the present invention may be employed in any system that is capable of, with suitable modification if necessary, implementing the principles of the present invention. The environment illustrated in  FIG. 4  is illustrative only and by no means represents even a small portion of the wide variety of environments in which the principles of the present invention may be implemented.  
         [0096]     In accordance with the present invention, modules including security token services, authentication services, access granting services, Web service clients, Web services, and Web service instances as well as associated data, including, authentication data, policy data, proof tokens, token granting tokens, service tokens, security context tokens, binary extensions, symmetric keys, public keys, private keys, and derived keys can be stored and accessed from any of the computer-readable media associated with computer system  420 . For example, portions of such modules and portions of associated program data may be included in operating system  435 , application programs  436 , program modules  437  and/or program data  438 , for storage in system memory  422 .  
         [0097]     When a mass storage device, such as, for example, magnetic hard disk  439 , is coupled to computer system  420 , such modules and associated program data may also be stored in the mass storage device. In a networked environment, program modules depicted relative to computer system  420 , or portions thereof, can be stored in remote memory storage devices, such as, system memory and/or mass storage devices associated with remote computer system  483  and/or remote computer system  493 . Execution of such modules may be performed in a distributed environment as previously described.  
         [0098]     The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.