STS との通信のためのポリシー・セットおよびバインディングの構成
Web サービス・クライアントが外部 Security Token Service (STS) から SAML アサーションを要求できるように、ポリシー・セットおよびバインディング文書を構成します。
始める前に
このタスクについて
STS にアクセスするためのアプリケーション固有の バインディングを構成する手順は、もう少し複雑です。管理コンソールは、Web サービス・プロバイダーとの通信のためのポリシー・セットの関連付けを管理するよう設計されています。管理コンソールは、STS との通信のための 2 組目のポリシー・セットの関連付けを管理する ようには設計されていません。ただし、手順で説明するように、管理コンソールを 使用して、STS にアクセスするためのポリシー・セットの関連付けを管理 することができます。
管理コンソールを使用して、STS にアクセスするために使用されるポリシー・セットを Web サービス・クライアントに関連付けし、その後、アプリケーション固有のバインディングを作成および変更します。バインディング構成が完了したら、ポリシー・セットおよびバインディングを Web サービス・クライアントから切り離します。この手順が必要なのは、次のステップで、ターゲット Web サービス・プロバイダーとの通信のためのポリシー・セットおよびバインディングを関連付けるためです。切り離されたアプリケーション固有バインディングはファイル・システムから削除されないので、Web サービス・クライアント・バインディングのカスタム・プロパティーは、切り離されたアプリケーション固有バインディングを正常に参照できます。
この手順では、 例としてデフォルト・アプリケーション・ポリシー・セット Username WSHTTPS default を使用して、 STS にアクセスするための構成ステップを説明します。これらのステップ は、他のポリシー・セットにも適用できます。この例では、Web サービス・アプリケーション JaxWSServicesSamples が使用されます。JaxWSServicesSamples はデフォルトでは インストールされません。
手順
タスクの結果
- SAML トークンを伝搬するポリシー・セットおよびバインディングを関連付けします。例えば、SAML11 Bearer WSHTTPS default ポリシー・セットおよび Saml Bearer Client sample 汎用バインディングを Web サービス・クライアントに関連付けます。
- Username WSHTTPS default ポリシー・セットおよび アプリケーション固有のバインディング SamlTCSample は、Saml Bearer Client sample バインディング 内で参照されていて、外部 STS にアクセスするようセットアップされています。
- 外部 STS SSL 証明書が取得され、 NodeDefaultTrustStore トラストストアに追加されました。
- 正常に機能を使用可能にしたことを確認するため、
トレース設定 com.ibm.ws.wssecurity.*=all=enabled を構成できます。
トレースは、以下の例のように、SAML アサーションが外部 STS によって
発行されたことを示します。
[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>