配置策略集和绑定以便与 STS 通信
配置策略集和绑定文档以允许 Web Service 客户机从外部安全性令牌服务 (STS) 请求 SAML 声明。
开始之前
关于此任务
配置特定于应用程序的绑定以访问 STS 的过程更加复杂。管理控制台设计用来管理策略集连接以与 Web Service 提供程序通信。 该控制台未设计用来管理第二组策略集连接以与 STS 通信。但是,您可以使用管理控制台来管理策略集连接以访问 STS,如过程中所述。
使用管理控制台将用于访问 STS 的策略集连接到 Web Service 客户机,然后创建并修改特定于应用程序的绑定。完成绑定配置之后,将策略集和绑定与 Web Service 客户机拆离。因为下一步是要连接策略集和绑定以与目标 Web Service 提供程序通信,所以此过程是必需过程。已拆离的特定于应用程序的绑定不会从文件系统中删除,所以 Web Service 客户机绑定定制属性可以成功地引用已拆离的特定于应用程序的绑定。
该过程使用缺省应用程序策略集 Username WSHTTPS default 作为示例,以描述用于访问 STS 的配置步骤。这些步骤也适用于其他策略集。在该示例中,使用了 Web Service 应用程序 JaxWSServicesSamples。缺省情况下,未安装 JaxWSServicesSamples。
过程
结果
- 连接用于传播 SAML 令牌的策略集和绑定。例如,将 SAML11 Bearer WSHTTPS default 策略集和“Saml Bearer 客户机样本”常规绑定连接到 Web Service 客户机。
- Username WSHTTPS default 策略集和特定于应用程序的绑定 SamlTCSample 已在“Saml Bearer 客户机样本”绑定中进行引用,并且已设置成访问外部 STS。
- 已检索外部 STS SSL 证书并将该证书添加到 NodeDefaultTrustStore 信任库。
- 要确认已成功启用该功能,您可以配置跟踪设置 com.ibm.ws.wssecurity.*=all=enabled。
跟踪将显示由外部 STS 发布的 SAML 声明,例如:
[8/23/09 18:26:59:252 CDT] 0000001f TrustSecurity 3 Security Token Service response: [8/23/09 18:26:59:392 CDT] 0000001f TrustSecurity 3 <?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <s:Header> <a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal</a:Action> <a:RelatesTo>urn:uuid:663A7B27BA8EB2CF9D1251070029934</a:RelatesTo> <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1"> <u:Timestamp u:Id="_0"> <u:Created>2009-08-23T23:26:57.664Z</u:Created> <u:Expires>2009-08-23T23:31:57.664Z</u:Expires> </u:Timestamp> </o:Security> </s:Header> <s:Body> <trust:RequestSecurityTokenResponseCollection xmlns:trust="http://docs.oasis-open.org/ws-sx/ws-trust/200512"> <trust:RequestSecurityTokenResponse> <trust:Lifetime> <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2009-08-23T23:26:57.648Z</wsu:Created> <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2009-08-24T09:26:57.648Z</wsu:Expires> </trust:Lifetime> <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> <a:EndpointReference> <a:Address>https://taishan.austin.ibm.com:9443/WSSampleSei/EchoService12</a:Address> </a:EndpointReference> </wsp:AppliesTo> <trust:RequestedSecurityToken> <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" MajorVersion="1" MinorVersion="1" AssertionID="_3c656382-9916-4e5f-9a16-fe0287dfc409" Issuer="http://svt193.svt193domain.com/Trust" IssueInstant="2009-08-23T23:26:57.663Z"> <saml:Conditions NotBefore="2009-08-23T23:26:57.648Z" NotOnOrAfter="2009-08-24T09:26:57.648Z"> <saml:AudienceRestrictionCondition> <saml:Audience>https://taishan.austin.ibm.com:9443/WSSampleSei/EchoService12</saml:Audience> </saml:AudienceRestrictionCondition> </saml:Conditions> <saml:AuthenticationStatement AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password" AuthenticationInstant="2009-08-23T23:26:57.640Z"> <saml:Subject> <saml:SubjectConfirmation> <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod> </saml:SubjectConfirmation> </saml:Subject> </saml:AuthenticationStatement> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference URI="#_3c656382-9916-4e5f-9a16-fe0287dfc409"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue>YGySZX4VPv25R+oyzFpE0/T/tjs=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>eP68...Vr08=</ds:SignatureValue> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <X509Data> <X509Certificate>MII...ymqg3</X509Certificate> </X509Data> </KeyInfo> </ds:Signature> </saml:Assertion> </trust:RequestedSecurityToken> <trust:RequestedAttachedReference> <o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_3c656382-9916-4e5f-9a16-fe0287dfc409</o:KeyIdentifier> </o:SecurityTokenReference> </trust:RequestedAttachedReference> <trust:RequestedUnattachedReference> <o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_3c656382-9916-4e5f-9a16-fe0287dfc409</o:KeyIdentifier> </o:SecurityTokenReference> </trust:RequestedUnattachedReference> <trust:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</trust:TokenType> <trust:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</trust:RequestType> <trust:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</trust:KeyType> </trust:RequestSecurityTokenResponse> </trust:RequestSecurityTokenResponseCollection> </s:Body> </s:Envelope>