WSSecurity ポリシー・プロパティーおよびバインディング・プロパティー
setPolicyType および setBinding コマンドで attributes パラメーターを使用して、WSSecurity ポリシーおよびバインディングの構成に追加の構成情報を指定します。 アプリケーションおよびシステム・ポリシー・セットで、WSSecurity ポリシーおよびバインディングの構成を使用することができます。
このトピックのコマンドを使用する前に、ご使用の wsadmin ツールが最新のものであることを確認してください。プロパティー・オブジェクトを attributes または bindingLocation パラメーターの値として受け入れるポリシー・セット管理コマンドは、以前のバージョンの wsadmin ツールではサポートされていません。例えば、 これらのコマンドは、バージョン 6.1.0.x ノードでは実行できません。
- ポリシーおよびバインディング構成のプロパティーを表示するには、getPolicyType コマンドおよび getBinding コマンドの -attributes パラメーターを使用します。属性を取得するには、プロパティー名を getPolicyType コマンドまたは getBinding コマンドに渡します。
- ポリシーおよびバインディング構成にプロパティーを追加したり、更新したり、プロパティーを除去するには、setPolicyType コマンドおよび setBinding コマンドの -attributes パラメーターを使用します。属性を追加したり、更新したりするには、プロパティーの名前と値を指定します。 setPolicyType コマンドおよび setBinding コマンドは、その属性が存在する場合は値を更新します。また、その属性が存在しない場合は属性と値を追加します。 属性を除去するには、空ストリング ("") で値を指定します。-attributes パラメーターがプロパティー・オブジェクトを受け入れます。

複合セル環境をサポートするために、WebSphere Application Server は、バージョン 7.0 およびバージョン 6.1 のバインディングをサポートします。セル・レベルの 汎用バインディングは、バージョン 7.0 以降に特化したものですが、アプリケーション固有のバインディングは、そのアプリケーションに必要なバージョンのままです。 ユーザーがアプリケーション固有のバインディングを作成すると、 アプリケーション・サーバーは、そのアプリケーションで使用する必要があるバインディング・バージョンを 判別します。
SignatureProtection.response:
int_body.SignedParts.Body,SignatureProtection.response:int_body.SignedParts.Header_0.Name
および SignatureProtection.response:int_body.SignedParts.Header_0.Namespace
WSSecurity ポリシー・プロパティー
- AsymmetricBinding
- ゼロまたは 1 つのバインディング表明を指定できます。
- SymmetricBinding
- ゼロまたは 1 つのバインディング表明を指定できます。同じセキュリティー・ポリシー・ファイルに AsymmetricBinding と SymmetricBinding の両方を組み込むことはできません。
- Wss11
- ゼロまたは 1 つの Wss11 表明を指定できます。
- Wss10
- ゼロまたは 1 つの Wss10 表明を指定できます。
- Trust10
- ゼロまたは 1 つの Trust10 表明を指定できます。
- SignatureProtection
- ゼロまたは任意の数のシグニチャー保護表明を指定できます。
- EncryptionProtection
- ゼロまたは任意の数の暗号化保護表明を指定できます。
- SupportingTokens
- ゼロまたは任意の数のサポート・トークン表明を指定できます。
<sp:AsymmetricBinding>
<wsp:Policy>
<sp:InitiatorSignatureToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy
/200512/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorSignatureToken>
<sp:RecipientSignatureToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy
/200512/IncludeToken/AlwaysToInitiator">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientSignatureToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict/>
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:AsymmetricBinding><sp:AsymmetricBinding>
<wsp:Policy>
<sp:InitiatorSignatureToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy
/200512/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorSignatureToken>
<sp:RecipientSignatureToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy
/200512/IncludeToken/AlwaysToInitiator">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientSignatureToken>
</wsp:Policy>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict/>
</wsp:Policy>
</sp:Layout>
</sp:AsymmetricBinding>
AsymmetricBinding.Layout = Strict
AsymmetricBinding.AlgorithmSuite.Basic256 = true
AsymmetricBinding.RecipientSignatureToken.X509Token_0.IncludeToken = http://docs.oasis-open.org
/ws-sx/ws-securitypolicy/200512/IncludeToken/AlwaysToInitiator
AsymmetricBinding.InitiatorSignatureToken.X509Token_0.WssX509V3Token10 = true
AsymmetricBinding.InitiatorSignatureToken.X509Token_0.IncludeToken = http://docs.oasis-open.org
/ws-sx/ws-securitypolicy/200512/IncludeToken/AlwaysToRecipient
AsymmetricBinding.RecipientSignatureToken.X509Token_0.WssX509V3Token10 = true
<sp:SupportingTokens>
<wsp:Policy wsu:Id="request:custom_auth">
<spe:CustomToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/
ws-securitypolicy/200512/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<spe:WssCustomToken uri=http://bar.com/MyCustomToken localname="tokenv1">
</spe:WssCustomToken>
</wsp:Policy>
</spe:CustomToken>
</wsp:Policy>
</sp:SupportingTokens
SupportingTokens.request:custom_auth.CustomToken_0.WssCustomToken.uri=http://bar.com
/MyCustomToken
SupportingTokens.request:custom_auth.CustomToken_0.IncludeToken=http://docs.oasis-open.org
/ws-sx/ws-securitypolicy/200512/IncludeToken/AlwaysToRecipient
SupportingTokens.request:custom_auth.CustomToken_0.WssCustomToken.localname=tokenv1
- wsu:Id エレメントこのエレメントは、Id を属性名として使用する代わりに、実際の値を ID で使用します。 以下のポリシー・ファイルはプロパティーの例を示しています。
前の wsu:Id の例により、以下のプロパティーが戻されます。<wsp:Policy wsu:Id="response:int_body"> <sp:SignedParts> <sp:Body/> </sp:SignedParts> </wsp:Policy>
SignatureProtection.response:int_body.SignedParts.Body = true
- ヘッダー要素複数のヘッダー要素がある場合があるので、Header_n 表記を使用してこのプロパティーを表します。 以下のポリシー・ファイルの例を参照してください。
前のヘッダーの例により、以下のプロパティーが戻されます。<wsp:Policy wsu:Id="request:conf_body"> <sp:EncryptedParts> <sp:Body/> <sp:Header Name="MyElement" Namespace="http://foo.com/MyNamespace" /> </sp:EncryptedParts> </wsp:Policy>
EncryptionProtection.request:conf_body.EncryptedParts.Header_0.Name=MyElement EncryptionProtection.request:conf_body.EncryptedParts.Header_0.Namespace=http:// foo.com/MyNamespace
- XPath エレメント複数の XPath エレメントがある場合があるので、XPath_n 表記を使用してこのプロパティーを表します。 以下のポリシー・ファイルの例を参照してください。
前の XPath の例により、以下のプロパティーが戻されます。<wsp:Policy wsu:Id="request:int_body"> <sp:SignedElements> <sp:XPath>SomeXPathExpression</sp:XPath> <sp:XPath>SomeOtherXPathExpression</sp:XPath> </sp:EncryptedElements> </wsp:Policy>
SignatureProtection.request:int_body.SignedElements.XPath_0=SomeXPathExpression SignatureProtection.request:int_body.SignedElements.XPath_1=SomeOtherXPathExpression
- X509Token エレメント
複数の X509Token エレメントがある場合があるので、X509Token_n 表記を使用してこのプロパティーを表します。 例として、AsymmetricBinding 表明を参照してください。
- CustomToken エレメント
複数の CustomToken エレメントがある場合があるので、CustomToken_n 表記を使用してこのプロパティーを表します。 例として、SupportingTokens 表明を参照してください。
WSSecurity バインディング・プロパティー
getBinding は、現在の WSSecurity バインディング構成で構成されているプロパティーを使用するプロパティー・オブジェクトを検討する場合に使用するコマンドです。 また、管理コンソールを使用して、WSSecurity バインディングを構成することが可能です。 詳細情報については、インフォメーション・センターで管理コンソールを使用した WSSecurity バインディングの構成に関するトピックを参照してください。
このセクションで定義されているプロパティーは、バインディング・スキーマの階層を反映しています。 プロパティー名の各部は、スキーマ・タイプの小文字バージョンです。 例えば、application.securityinboundbindingconfig.tokenconsumer_0.jaasconfig.configname プロパティーは、この階層フォーマットに従っています。 属性は application または bootstrap で始まります。 application で始まる属性は、メイン WS-Security ポリシーに関連付けられたバインディングを表します。 bootstrap で始まる属性は、WS-Security ブートストラップ・ポリシーに関連付けられたバインディングを表しており、そこでは WS-Security ポリシーがセキュアな会話を使用します。
application.securityinboundbindingconfig.tokenconsumer_0.callbackhandler.
certpathsettings.certstoreref.reference
application.securityinboundbindingconfig.tokenconsumer_0.callbackhandler.
certpathsettings.trustanchorref.reference
application.securityinboundbindingconfig.tokenconsumer_0.callbackhandler.classname
application.securityinboundbindingconfig.tokenconsumer_0.classname
application.securityinboundbindingconfig.tokenconsumer_0.jaasconfig.configname
application.securityinboundbindingconfig.tokenconsumer_0.name
application.securityinboundbindingconfig.tokenconsumer_0.valuetype.localname
application.securityinboundbindingconfig.tokenconsumer_0.valuetype.uri
また、セキュリティー・バインディング・ファイル内のプロパティーによっては、照会時に true の値が戻る場合があります。これらのプロパティーを設定する場合、プロパティーを組み込むには値を true に設定し、プロパティーを除去するには値を空ストリング ("") に設定します。例えば、タイム・スタンプ、nonce、および trustAnyCertificate プロパティーはこのパターンに従います。
- プロパティーを追加するには、setBinding コマンドを使用して、ゼロ以外の長さのストリング値を持つプロパティー名を渡します。リスト項目を追加するには、_n 表記を使用して、現在プロパティーで使用されている数値よりも大きい数値が反映されるようにします。例えば、tokenconsumer_0 および tokenconsumer_1 プロパティーが構成内に存在する場合、新規の tokenconsumer プロパティーを tokenconsumer_2 に指定してください。プロパティーの追加後、getBinding コマンドを使用すると、構成されたプロパティーの最新リストが表示されます。
- プロパティーを除去するには、setBinding コマンドを使用して、プロパティー名を空ストリング ("") で渡します。例えば、すべての tokenconsumer_0 プロパティーを除去するには、以下のプロパティーを attributes パラメーターで指定します。
前の例により、application.securityinboundbindingconfig.tokenconsumer_0 プロパティー名で始まるすべてのプロパティーが除去されます。application.securityinboundbindingconfig.tokenconsumer_0=""
以下の例では、バインディング構成用のいくつかのプロパティー・セットを示しています。このリストには、WSSecurity バインディング構成用のすべてのプロパティーが含まれているわけではありません。この情報を参照して、特定のプロパティー名の書式を決定します。
- signinginfo エレメント
- このプロパティーを使用して、署名情報を構成します。カスタム・バインディングの場合、securityoutboundbindingconfig および securityinboundbindingconfig 表明に対して指定できる signinginfo エレメントの数に制限はありません。デフォルトのバインディングでは、システムは最大で 2 つの signinginfo エレメントを securityoutboundbindingconfig および securityinboundbindingconfig 表明で許可します。以下の例は、2 つの signinginfo エレメントのフォーマットを示しています。
application.securityinboundbindingconfig.signinginfo_0.signingkeyinfo_0 .reference=con_signkeyinfo application.securityinboundbindingconfig.signinginfo_0.signingpartreference_0 .reference=request:int_body application.securityoutboundbindingconfig.signinginfo_0.signingpartreference_0 .reference=response:int_body application.securityoutboundbindingconfig.signinginfo_0.signingpartreference_0.timestamp=true
- encryptioninfo エレメント
- このプロパティーを使用して、暗号化情報を構成します。カスタム・バインディングの場合、securityoutboundbindingconfig および securityinboundbindingconfig 表明に対して指定できる encryptioninfo エレメントの数に制限はありません。デフォルトのバインディングでは、システムは securityoutboundbindingconfig および securityinboundbindingconfig 表明に最大で 2 つの encryptioninfo エレメントを受け入れます。以下の例は、2 つの encryptioninfo プロパティーのフォーマットを示しています。
application.securityinboundbindingconfig.encryptioninfo_0.encryptionpartreference .nonce=true application.securityinboundbindingconfig.encryptioninfo_0.encryptionpartreference .reference=request:conf_body application.securityoutboundbindingconfig.encryptioninfo_0.encryptionpartreference .nonce=true application.securityoutboundbindingconfig.encryptioninfo_0.encryptionpartreference .timestamp=true
- tokengenerator エレメント
- デフォルトのバインディングでは、signinginfo または encryptioninfo エレメントが参照しない tokengenerator エレメントは、認証トークン生成プログラムであると考えられます。
各認証トークン生成プログラムの valuetype エレメントは、固有のものでなければなりません。
以下に、X.509 保護トークン生成プログラムの例を示します。
application.securityoutboundbindingconfig.tokengenerator_0.name=gen_signtgen application.securityoutboundbindingconfig.tokengenerator_0.classname=com.ibm.ws.wssecurity.wssapi.token .impl.CommonTokenGenerator application.securityoutboundbindingconfig.tokengenerator_0.valuetype.uri= application.securityoutboundbindingconfig.tokengenerator_0.valuetype.localname=http://docs.oasis-open.org /wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3 application.securityoutboundbindingconfig.tokengenerator_0.callbackhandler.classname=com.ibm.websphere.wssecurity .callbackhandler.X509GenerateCallbackHandler application.securityoutboundbindingconfig.tokengenerator_0.callbackhandler.key.alias=soaprequester application.securityoutboundbindingconfig.tokengenerator_0.callbackhandler.key.keypass={xor}PDM2OjEr application.securityoutboundbindingconfig.tokengenerator_0.callbackhandler.key.name=CN=SOAPRequester, OU=TRL, O=IBM, ST=Kanagawa, C=JP application.securityoutboundbindingconfig.tokengenerator_0.callbackhandler.keystore.path=${USER_INSTALL_ROOT} /etc/ws-security/samples/dsig-sender.ks application.securityoutboundbindingconfig.tokengenerator_0.callbackhandler.keystore.storepass={xor}PDM2OjEr application.securityoutboundbindingconfig.tokengenerator_0.callbackhandler.keystore.type=JKS application.securityoutboundbindingconfig.tokengenerator_0.jaasconfig.configname=system.wss.generate.x509
以下に、ユーザー名認証トークン生成プログラムの例を示しています。application.securityoutboundbindingconfig.tokengenerator_1.name=gen_usernametoken application.securityoutboundbindingconfig.tokengenerator_1.classname=com.ibm.ws.wssecurity .wssapi.token.impl.CommonTokenGenerator application.securityoutboundbindingconfig.tokengenerator_1.valuetype.uri= application.securityoutboundbindingconfig.tokengenerator_1.valuetype.localname=http://docs .oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken application.securityoutboundbindingconfig.tokengenerator_1.callbackhandler.classname=com.ibm .websphere.wssecurity.callbackhandler.UNTGenerateCallbackHandler application.securityoutboundbindingconfig.tokengenerator_1.callbackhandler.basicAuth.userid=user1 application.securityoutboundbindingconfig.tokengenerator_1.callbackhandler.basicAuth.password=myPassword application.securityoutboundbindingconfig.tokengenerator_1.securityTokenReference.reference=request:uname_token application.securityoutboundbindingconfig.tokengenerator_1.jaasconfig.configname=system.wss.generate.unt
- tokenconsumer エレメント
- デフォルトのバインディングでは、signinginfo または encryptioninfo エレメントが参照しない tokenconsumer エレメントは、認証トークン・コンシューマーです。各認証トークン・コンシューマーの valuetype エレメントは、固有のものでなければなりません。以下の例は、tokenconsumer エレメントセットのフォーマットを示しています。
application.securityinboundbindingconfig.tokenconsumer_0.name=con_unametoken application.securityinboundbindingconfig.tokenconsumer_0.classname=com.ibm.ws.wssecurity.wssapi .token.impl.CommonTokenConsumer application.securityinboundbindingconfig.tokenconsumer_0.valuetype.localname=http://docs.oasis-open.org /wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken application.securityinboundbindingconfig.tokenconsumer_0.valuetype.uri= application.securityinboundbindingconfig.tokenconsumer_0.callbackhandler.classname=com.ibm.websphere .wssecurity.callbackhandler.UNTConsumeCallbackHandler application.securityinboundbindingconfig.tokenconsumer_0.jaasconfig.configname=system.wss.consume.unt application.securityinboundbindingconfig.tokenconsumer_0.securitytokenreference.reference=request:uname_token
- actor エレメント
- 以下の例に示すように、生成済みメッセージの WSSecurity ヘッダーに組み込むアクター URI を定義します。
application.securityinboundbindingconfig.actor=http://myActor.com application.securityoutboundbindingconfig.actor=http://myActor.com
- certstorelist エレメント
- 以下の例に示すように、証明書ストア構成および署名情報を定義します。
application.securityinboundbindingconfig.certstorelist.collectioncertstores_0 .name=DigSigCertStore application.securityinboundbindingconfig.certstorelist.collectioncertstores_0 .provider=IBMCertPath application.securityinboundbindingconfig.certstorelist.collectioncertstores_0 .x509certificates_0.path=${USER_INSTALL_ROOT}/etc/ws-security/samples/intca2.cer
- keyinfo エレメント
- 以下の例に示すように、署名および暗号化の構成の鍵情報を定義します。
application.securityinboundbindingconfig.keyinfo_0.classname=com.ibm.ws.wssecurity.wssapi .CommonContentConsumer application.securityinboundbindingconfig.keyinfo_0.name=con_signkeyinfo application.securityinboundbindingconfig.keyinfo_0.tokenreference.reference=con_tcon application.securityinboundbindingconfig.keyinfo_0.type=STRREF
- trustanchor プロパティー
- 以下の例に示すように、署名者証明のトラストの検証を行うために使用する構成情報を定義します。
application.securityinboundbindingconfig.trustanchor_0.keystore.path=${USER_INSTALL_ROOT} /etc/ws-security/samples/dsig-receiver.ks application.securityinboundbindingconfig.trustanchor_0.keystore.storepass={xor}LDotKTot application.securityinboundbindingconfig.trustanchor_0.keystore.type=JKS application.securityinboundbindingconfig.trustanchor_0.name=DigSigTrustAnchor
- timestampexpires エレメント
- 以下の例に示すように、構成の有効期限を定義します。
application.securityoutboundbindingconfig.timestampexpires.expires=5
- application.securityinboundbindingconfig.caller_X.order
- wsadmin スクリプトを使用するときの呼び出し元の順序を指定します。この中で X は、呼び出し元のインスタンスを識別する、固有のストリングです。
-attributes [[application.securityinboundbindingconfig.caller_0.order 2]]
setPolicyType および setBinding コマンドの例
setPolicyType および setBinding コマンドに関する前の参照情報を使用して、ポリシーおよびバインディングの構成データを変更します。

AdminTask.setBinding('[-bindingLocation "" -bindingName cellWideBinding2 -policyType
WSSecurity
-attributes [[application.securityinboundbindingconfig.caller_0.order 2][inResponsewithSSL:configAlias
NodeDefaultSSLSettings]
[inResponsewithSSL:config properties_directory/ssl.client.props]
[outAsyncResponsewithSSL:configFile properties_directory/ssl.client.props]
[outAsyncResponsewithSSL:configAlias NodeDefaultSSLSetings]
[outRequestwithSSL:configFile properties_directory/ssl.client.props]
[outRequestwithSSL:configAlias NodeDefaultSSLSettings]]]')
AdminTask.setPolicyType('-policySet myPolicySet -policyType WSSecurity -attributes
"[[enabled true][provides
Some_amount_of_security][SignatureProtection.request:app_signparts.SignedElements.XPath_0
SignatureProtectionV2]]"')
AdminTask.setBinding('-policyType WSSecurity -bindingLocation "[[server server1][node
node01]]"
-attributes "[[application.securityinboundbindingconfig.keyinfo_0.name dec_server_keyinfo]
[application.securityinboundbindingconfig.keyinfo_0.classname
com.ibm.ws.wssecurity.wssapi.CommonContentGenerator]
[application.securityinboundbindingconfig.keyinfo_0.type STRREF]]"')
AdminTask.setBinding('-policyType WSSecurity -bindingLocation "[[application PolicySet]
[attachmentId 999]]"
-attributes "[[application.securityinboundbindingconfig.keyinfo_0.name dec_app_keyinfo]
[application.securityinboundbindingconfig.keyinfo_0.classname com.ibm.ws.wssecurity.wssapi.CommonContentGenerator]
[application.securityinboundbindingconfig.keyinfo_0.type STRREF]]" -attachmentType application
-bindingName myBindingName')
AdminTask.setBinding('-policyType WSSecurity -bindingLocation "" -attributes
"[application.securityinboundbindingconfig.trustanchor_0.name DigSigTrustAnchor2]"')