<TokenInfo> Element
Specifies the requirements for security tokens used to sign SOAP messages.
<policyDocument> Element
<policies> Element
<Policy> Element (WSE for Microsoft .NET) (1)
<Integrity> Element
<TokenInfo>
<SecurityToken>
</SecurityToken>
</TokenInfo>
Attributes and Elements
Attributes
None.
Child Elements
Element | Description |
---|---|
Required element. Specifies a supported security token. |
Parent Elements
Element | Description |
---|---|
Specifies the digital signature requirements for a SOAP message. |
Remarks
The <TokenInfo> element also supports the <wsp:OneOrMore> element that allows a policy assertion state that a SOAP message can be signed by using one of a specified set of security tokens.
Example
The following code example defines a policy assertion named signed-body-x509-or-Kerberos
that requires the digital signing of the <Body> element, timestamp header, and all addressing headers by an X509SecurityToken or a KerberosToken and that SOAP messages sent the http://www.cohowinery.com/Service2.asmx
endpoint adhere to the policy assertion.
Note
This code example is designed to demonstrate WSE features and is not intended for production use.
<?xml version="1.0" encoding="utf-8"?>
<policyDocument xmlns="https://schemas.microsoft.com/wse/2003/06/Policy">
<mappings>
<endpoint uri="http://www.cohowinery.com/Service2.asmx">
<defaultOperation>
<request policy="#signed-body-x509-or-Kerberos" />
<response policy="" />
<fault policy="" />
</defaultOperation>
</endpoint>
</mappings>
<policies xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wse="https://schemas.microsoft.com/wse/2003/06/Policy"
xmlns:wsa="https://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wssp="https://schemas.xmlsoap.org/ws/2002/12/secext"
xmlns:wsp="https://schemas.xmlsoap.org/ws/2002/12/policy"
xmlns:wssc="https://schemas.xmlsoap.org/ws/2004/04/sc"
xmlns:rp="https://schemas.xmlsoap.org/rp">
<!--This policy requires that the body be digitally signed by either
an X509 or a Kerberos security token.-->
<wsp:Policy wsu:Id="signed-body-x509-or-Kerberos">
<wssp:Integrity wsp:Usage="wsp:Required">
<wssp:TokenInfo>
<wsp:OneOrMore>
<wssp:SecurityToken>
<wssp:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3</wssp:TokenType>
</wssp:SecurityToken>
<wssp:SecurityToken>
<wssp:TokenType>https://schemas.xmlsoap.org/ws/2003/12/kerberos/Kerberosv5ST</wssp:TokenType>
</wssp:SecurityToken>
</wsp:OneOrMore>
</wssp:TokenInfo>
<wssp:MessageParts xmlns:rp="https://schemas.xmlsoap.org/rp" Dialect="https://schemas.xmlsoap.org/2002/12/wsse#part">wsp:Body() wse:Timestamp() wse:Addressing()</wssp:MessageParts>
</wssp:Integrity>
</wsp:Policy>
</policies>
</policyDocument>