cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r897643 [5/8] - in /websites/production/cxf/content: ./ cache/ docs/
Date Wed, 12 Feb 2014 16:48:13 GMT
Modified: websites/production/cxf/content/docs/ws-securitypolicy.html
==============================================================================
--- websites/production/cxf/content/docs/ws-securitypolicy.html (original)
+++ websites/production/cxf/content/docs/ws-securitypolicy.html Wed Feb 12 16:48:12 2014
@@ -117,68 +117,8 @@ Apache CXF -- WS-SecurityPolicy
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><h1 id="WS-SecurityPolicy-WS-SecurityPolicy">WS-SecurityPolicy</h1>
-
-<p>CXF 2.2 introduced support for using <a shape="rect" class="external-link" href="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/v1.3/ws-securitypolicy.html" rel="nofollow">WS-SecurityPolicy</a> to configure WSS4J instead of the custom configuration documented on the <a shape="rect" href="ws-security.html">WS-Security</a> page.  However, all of the "background" material on the <a shape="rect" href="ws-security.html">WS-Security</a> page still applies and is important to know.   WS-SecurityPolicy just provides an easier and more standards based way to configure and control the security requirements.   With the security requirements documented in the WSDL as <a shape="rect" href="ws-policy.html">WS-Policy</a> fragments, other tools such as .NET can easily know how to configure themselves to inter-operate with CXF services.</p>
-
-
-<h3 id="WS-SecurityPolicy-EnablingWS-SecurityPolicy">Enabling WS-SecurityPolicy</h3>
-
-<p>In CXF 2.2, if the cxf-rt-ws-policy and cxf-rt-ws-security modules are available on the classpath, the WS-SecurityPolicy stuff is automatically enabled.   Since the entire security runtime is policy driven, the only requirement is that the policy engine and security policies be available.</p>
-
-<p>If you are using the full "bundle" jar, all the security and policy stuff is already included.</p>
-
-
-<h3 id="WS-SecurityPolicy-Policydescription">Policy description</h3>
-
-<p>With WS-SecurityPolicy, the binding and/or operation in the wsdl references a <a shape="rect" href="ws-policy.html">WS-Policy</a> fragment that describes the basic security requirements for interacting with that service.   The <a shape="rect" class="external-link" href="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/v1.3/ws-securitypolicy.html" rel="nofollow">WS-SecurityPolicy specification</a> allows for specifying things like asymmetric/symmetric keys, using transports (https) for encryption, which parts/headers to encrypt or sign, whether to sign then encrypt or encrypt then sign, whether to include timestamps, whether to use derived keys, etc...   Basically, it describes what actions are necessary to securely interact with the service described in the WSDL.</p>
-
-<p>However, the WS-SecurityPolicy fragment does not include "everything" that is required for a runtime to be able to able to create the messages.  It does not describe things such as locations of key stores, user names and passwords, etc...  Those need to be configured in at runtime to augment the WS-SecurityPolicy fragment.</p>
-
-
-<h3 id="WS-SecurityPolicy-Configuringtheextraproperties">Configuring the extra properties</h3>
-
-<p>There are several extra properties that may need to be set to provide the additional bits of information to the runtime. Note that you should check that a particular property is supported in the version of CXF you are using.</p>
-
-<h4 id="WS-SecurityPolicy-Userproperties">User properties</h4>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.username </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The user's name. It is used differently by each of the WS-Security functions, see <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#USERNAME">here</a> for more information. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.password </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The user's password when "ws-security.callback-handler" is not defined. It is currently only used for the case of adding a password to a UsernameToken. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.signature.username </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The user's name for signature. It is used as the alias name in the keystore to get the user's
  cert and private key for signature. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SIGNATURE_USERNAME">here</a> for more information. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.encryption.username </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The user's name for encryption. It is used as the alias name in the keystore to get the user's public key for encryption. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENCRYPT_USERNAME">here</a> for more information.</p></td></tr></tbody></table></div>
-
-
-<h4 id="WS-SecurityPolicy-CallbackClassandCryptoproperties">Callback Class and Crypto properties</h4>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.callback-handler </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The CallbackHandler <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#CALLBACK_HANDLER">implementation</a> class used to obtain passwords.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.saml-callback-handler </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The SAML CallbackHandler <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SAML_CALLBACK_HANDLER">implementation</a> class used to construct SAML Assertions.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.signature.properties </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The Crypto property <a shape="rect" href=
 "http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SIGNATURE_PROPERTIES">configuration</a> to use for signature, if "ws-security.signature.crypto" is not set instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.encryption.properties </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The Crypto property <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENCRYPT_PROPERTIES">configuration</a> to use for encryption, if "ws-security.encryption.crypto" is not set instead. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.signature.crypto </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A Crypto <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/components/crypto/Crypto.html">object</a> to be used for signature. If this is not defined then "ws-security.
 signature.properties" is used instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.encryption.crypto </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A Crypto <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/components/crypto/Crypto.html">object</a> to be used for encryption. If this is not defined then "ws-security.encryption.properties" is used instead.</p></td></tr></tbody></table></div>
-
-
-<p><strong>Note:</strong> for Symmetric bindings that specify a protection token, the ws-security-encryption properties are used.</p>
-
-<h4 id="WS-SecurityPolicy-BooleanWS-Securityconfigurationtags,e.g.thevalueshouldbe&quot;true&quot;or&quot;false&quot;.">Boolean WS-Security configuration tags, e.g. the value should be "true" or "false".</h4>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> constant </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> default </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> definition</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.validate.token </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether to validate the password of a received UsernameToken or not.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.enableRevocation </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether to enable Certificate Revocation List (CRL) checking or not when verifying trust in a certificate.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.username-toke
 n.always.encrypted </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether to always encrypt UsernameTokens that are defined as a SupportingToken. This should not be set to false in a production environment, as it exposes the password (or the digest of the password) on the wire.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.is-bsp-compliant </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether to ensure compliance with the Basic Security Profile (BSP) 1.1 or not.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.self-sign-saml-assertion </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether to self-sign a SAML Assertion or not. If this is set to true, then an enveloped sign
 ature will be generated when the SAML Assertion is constructed. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.enable.nonce.cache </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> (varies) </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether to cache UsernameToken nonces. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENABLE_NONCE_CACHE">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.enable.timestamp.cache </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> (varies) </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>  Whether to cache Timestamp Created Strings. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENABLE_TIMESTAMP_CACHE">here</a> for more information.</p></td></tr></tbody></table></div>
-
-
-<h4 id="WS-SecurityPolicy-Non-booleanWS-SecurityConfigurationparameters">Non-boolean WS-Security Configuration parameters</h4>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.timestamp.timeToLive </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The time in seconds to append to the Creation value of an incoming Timestamp to determine whether to accept the Timestamp as valid or not. The default value is 300 seconds (5 minutes).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.timestamp.futureTimeToLive </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The time in seconds in the future within which the Created time of an incoming Timestamp is valid. The default value is "60". See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#TIMESTAMP_FUTURE_TTL">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.saml-role-attributename </p></td><td colspan="1" rows
 pan="1" class="confluenceTd"><p> The attribute URI of the SAML AttributeStatement where the role information is stored. The default is "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.kerberos.client </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A reference to the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/kerberos/KerberosClient.java?view=markup">KerberosClient</a> class used to obtain a service ticket.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.spnego.client.action </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/spnego/SpnegoClientAction.html">SpnegoClientAction</a> implementation to use for SPNEGO. This allows the user t
 o plug in a different implementation to obtain a service ticket.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.kerberos.jaas.context </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The JAAS Context name to use for Kerberos. This is currently only supported for SPNEGO.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.kerberos.spn </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The Kerberos Service Provider Name (spn) to use. This is currently only supported for SPNEGO.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.nonce.cache.instance </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> This holds a reference to a <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/cache/ReplayCache.html">ReplayCache</a> instance used to cache UsernameToken nonces. The default instance that is used is the <a sha
 pe="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java?view=markup">EHCacheReplayCache</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.timestamp.cache.instance </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> This holds a reference to a <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/cache/ReplayCache.html">ReplayCache</a> instance used to cache Timestamp Created Strings. The default instance that is used is the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java?view=markup">EHCacheReplayCache</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.cache.config.file </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
  Set this property to point to a configuration file for the underlying caching implementation. The default configuration file that is used is <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/resources/cxf-ehcache.xml?view=markup">cxf-ehcache.xml</a> in the cxf-rt-ws-security module.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> org.apache.cxf.ws.security.tokenstore.TokenStore </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>  The <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/TokenStore.java?view=markup">TokenStore</a> instance to use to cache security tokens. By default this uses the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java?view=markup">EHCacheTokenStore</a> 
 if EhCache is available. Otherwise it uses the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/MemoryTokenStore.java?view=markup">MemoryTokenStore</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.subject.cert.constraints </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A comma separated String of regular expressions which will be applied to the subject DN of the certificate used for signature validation, after trust verification of the certificate chain associated with the certificate. These constraints are not used when the certificate is contained in the keystore (direct trust). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.role.classifier </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If one of the WSS4J Validators returns a JAAS Subject from Validation, then the WSS4JInIntercep
 tor will attempt to create a SecurityContext based on this Subject. If this value is not specified, then it tries to get roles using the DefaultSecurityContext in cxf-rt-core. Otherwise it uses this value in combination with the SUBJECT_ROLE_CLASSIFIER_TYPE to get the roles from the Subject. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.role.classifier.type </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If one of the WSS4J Validators returns a JAAS Subject from Validation, then the WSS4JInInterceptor will attempt to create a SecurityContext based on this Subject. Currently accepted values are "prefix" or "classname". Must be used in conjunction with the SUBJECT_ROLE_CLASSIFIER. The default value is "prefix". </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.asymmetric.signature.algorithm </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> This configuration tag overrides the default Asymme
 tric Signature algorithm (RSA-SHA1) for use in WS-SecurityPolicy, as the WS-SecurityPolicy specification does not allow the use of other algorithms at present. </p></td></tr></tbody></table></div>
-
-
-<h4 id="WS-SecurityPolicy-Validatorimplementationsforvalidatingreceivedsecuritytokens">Validator implementations for validating received security tokens</h4>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.ut.validator </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The WSS4J Validator instance to use to validate UsernameTokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/UsernameTokenValidator.html">UsernameTokenValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.saml1.validator </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The WSS4J Validator instance to use to validate SAML 1.1 Tokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/SamlAssertionValidator.html">SamlAssertionValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.saml2.validator </p></td><td colsp
 an="1" rowspan="1" class="confluenceTd"><p> The WSS4J Validator instance to use to validate SAML 2.0 Tokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/SamlAssertionValidator.html">SamlAssertionValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.timestamp.validator </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The WSS4J Validator instance to use to validate Timestamps. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/TimestampValidator.html">TimestampValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.signature.validator </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The WSS4J Validator instance to use to validate trust in credentials used in Signature verification. The default value is 
 the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/SignatureTrustValidator.html">SignatureTrustValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.bst.validator </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The WSS4J Validator instance to use to validate BinarySecurityTokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/NoOpValidator.html">NoOpValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sct.validator </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The WSS4J Validator instance to use to validate SecurityContextTokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/NoOpValidator.html">NoOpValidator</a>.</p></td></tr></t
 body></table></div>
-
-
-<h4 id="WS-SecurityPolicy-STSClientConfigurationtags">STS Client Configuration tags</h4>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.client </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> A reference to the STSClient class used to communicate with the STS.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.applies-to </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The "AppliesTo" address to send to the STS. The default is the endpoint address of the service provider.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.token.usecert </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If true, writes out an X509Certificate structure in UseKey/KeyInfo.  If false (the default), writes out a KeyValue structure instead. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.token.do.cancel </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
  Whether to cancel a token when using SecureConversation after successful invocation. The default is "false".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.cache.issued.token.in.endpoint </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Set this to "false" to not cache a SecurityToken per proxy object in the IssuedTokenInterceptorProvider. This should be done if a token is being retrieved from an STS in an intermediary. The default value is "true". </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.disable-wsmex-call-using-epr-address </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>  Whether to avoid STS client trying send WS-MetadataExchange call using STS EPR WSA address when the endpoint contract contains no WS-MetadataExchange info. The default value is "false".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.token.crypto </p></td><td colspan="1"
  rowspan="1" class="confluenceTd"><p> A Crypto object to be used for the STS. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#STS_TOKEN_CRYPTO">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.token.properties </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The Crypto property configuration to use for the STS. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#STS_TOKEN_PROPERTIES">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.token.username </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The alias name in the keystore to get the user's public key to send to the STS for the PublicKey KeyType case.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.token.act-as
  </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The token to be sent to the STS in an "ActAs" field. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#STS_TOKEN_ACT_AS">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ws-security.sts.token.on-behalf-of </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The token to be sent to the STS in an "OnBehalfOf" field. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#STS_TOKEN_ON_BEHALF_OF">here</a> for more information.</p></td></tr></tbody></table></div>
-
-
-<h4 id="WS-SecurityPolicy-ConfiguringviaSpring">Configuring via Spring</h4>
-
-<p>The properties are easily configured as client or endpoint properties--use the former for the SOAP client, the latter for the web service provider.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
+<div id="ConfluenceContent"><h1 id="WS-SecurityPolicy-WS-SecurityPolicy">WS-SecurityPolicy</h1><p>CXF 2.2 introduced support for using <a shape="rect" class="external-link" href="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/v1.3/ws-securitypolicy.html" rel="nofollow">WS-SecurityPolicy</a> to configure WSS4J instead of the custom configuration documented on the <a shape="rect" href="ws-security.html">WS-Security</a> page. However, all of the "background" material on the <a shape="rect" href="ws-security.html">WS-Security</a> page still applies and is important to know. WS-SecurityPolicy just provides an easier and more standards based way to configure and control the security requirements. With the security requirements documented in the WSDL as <a shape="rect" href="ws-policy.html">WS-Policy</a> fragments, other tools such as .NET can easily know how to configure themselves to inter-operate with CXF services.</p><h3 id="WS-SecurityPolicy-EnablingWS-SecurityPolicy">Enabling WS-
 SecurityPolicy</h3><p>In CXF 2.2, if the cxf-rt-ws-policy and cxf-rt-ws-security modules are available on the classpath, the WS-SecurityPolicy stuff is automatically enabled. Since the entire security runtime is policy driven, the only requirement is that the policy engine and security policies be available.</p><p>If you are using the full "bundle" jar, all the security and policy stuff is already included.</p><h3 id="WS-SecurityPolicy-Policydescription">Policy description</h3><p>With WS-SecurityPolicy, the binding and/or operation in the wsdl references a <a shape="rect" href="ws-policy.html">WS-Policy</a> fragment that describes the basic security requirements for interacting with that service. The <a shape="rect" class="external-link" href="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/v1.3/ws-securitypolicy.html" rel="nofollow">WS-SecurityPolicy specification</a> allows for specifying things like asymmetric/symmetric keys, using transports (https) for encryption, which part
 s/headers to encrypt or sign, whether to sign then encrypt or encrypt then sign, whether to include timestamps, whether to use derived keys, etc... Basically, it describes what actions are necessary to securely interact with the service described in the WSDL.</p><p>However, the WS-SecurityPolicy fragment does not include "everything" that is required for a runtime to be able to able to create the messages. It does not describe things such as locations of key stores, user names and passwords, etc... Those need to be configured in at runtime to augment the WS-SecurityPolicy fragment.</p><h3 id="WS-SecurityPolicy-Configuringtheextraproperties">Configuring the extra properties</h3><p>There are several extra properties that may need to be set to provide the additional bits of information to the runtime. Note that you should check that a particular property is supported in the version of CXF you are using.</p><h4 id="WS-SecurityPolicy-Userproperties">User properties</h4><div class="table-
 wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.username</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The user's name. It is used differently by each of the WS-Security functions, see <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#USERNAME">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.password</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The user's password when "ws-security.callback-handler" is not defined. It is currently only used for the case of adding a password to a UsernameToken.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.signature.username</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The user's name for signature. It is used as the alias name in the keystore to get the user's cert and private key for sig
 nature. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SIGNATURE_USERNAME">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.encryption.username</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The user's name for encryption. It is used as the alias name in the keystore to get the user's public key for encryption. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENCRYPT_USERNAME">here</a> for more information.</p></td></tr></tbody></table></div><h4 id="WS-SecurityPolicy-CallbackClassandCryptoproperties">Callback Class and Crypto properties</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.callback-handler</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The CallbackHandler <a shape="rect" h
 ref="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#CALLBACK_HANDLER">implementation</a> class used to obtain passwords.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.saml-callback-handler</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The SAML CallbackHandler <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SAML_CALLBACK_HANDLER">implementation</a> class used to construct SAML Assertions.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.signature.properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Crypto property <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#SIGNATURE_PROPERTIES">configuration</a> to use for signature, if "ws-security.signature.crypto" is not set instead.</p></td></tr><tr><td colspan="1" rowspan="1" clas
 s="confluenceTd"><p>ws-security.encryption.properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Crypto property <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENCRYPT_PROPERTIES">configuration</a> to use for encryption, if "ws-security.encryption.crypto" is not set instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.signature.crypto</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A Crypto <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/components/crypto/Crypto.html">object</a> to be used for signature. If this is not defined then "ws-security.signature.properties" is used instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.encryption.crypto</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A Crypto <a shape="rect" class="external-link" href="http://ws
 .apache.org/wss4j/apidocs/org/apache/ws/security/components/crypto/Crypto.html">object</a> to be used for encryption. If this is not defined then "ws-security.encryption.properties" is used instead.</p></td></tr></tbody></table></div><p><strong>Note:</strong> for Symmetric bindings that specify a protection token, the ws-security-encryption properties are used.</p><h4 id="WS-SecurityPolicy-BooleanWS-Securityconfigurationtags,e.g.thevalueshouldbe&quot;true&quot;or&quot;false&quot;.">Boolean WS-Security configuration tags, e.g. the value should be "true" or "false".</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>constant</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>default</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>definition</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.validate.token</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
 true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to validate the password of a received UsernameToken or not.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.enableRevocation</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to enable Certificate Revocation List (CRL) checking or not when verifying trust in a certificate.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.username-token.always.encrypted</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to always encrypt UsernameTokens that are defined as a SupportingToken. This should not be set to false in a production environment, as it exposes the password (or the digest of the password) on the wire.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.
 is-bsp-compliant</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to ensure compliance with the Basic Security Profile (BSP) 1.1 or not.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.self-sign-saml-assertion</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to self-sign a SAML Assertion or not. If this is set to true, then an enveloped signature will be generated when the SAML Assertion is constructed.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.enable.nonce.cache</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>(varies)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to cache UsernameToken nonces. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENABLE_
 NONCE_CACHE">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.enable.timestamp.cache</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>(varies)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to cache Timestamp Created Strings. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#ENABLE_TIMESTAMP_CACHE">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.enable.saml.cache</td><td colspan="1" rowspan="1" class="confluenceTd">(varies)</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to cache SAML2 Token Identifiers, if the token contains a "OneTimeUse" Condition.</td></tr></tbody></table></div><h4 id="WS-SecurityPolicy-Non-booleanWS-SecurityConfigurationparameters">Non-boolean WS-Security Configuration parameters</h4><div class="table-wrap"><table class="confluenceTa
 ble"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.timestamp.timeToLive</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The time in seconds to append to the Creation value of an incoming Timestamp to determine whether to accept the Timestamp as valid or not. The default value is 300 seconds (5 minutes).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.timestamp.futureTimeToLive</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The time in seconds in the future within which the Created time of an incoming Timestamp is valid. The default value is "60". See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#TIMESTAMP_FUTURE_TTL">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.saml-role-attributename</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The attribute URI of the S
 AML AttributeStatement where the role information is stored. The default is "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.kerberos.client</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A reference to the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/kerberos/KerberosClient.java?view=markup">KerberosClient</a> class used to obtain a service ticket.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.spnego.client.action</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/spnego/SpnegoClientAction.html">SpnegoClientAction</a> implementation to use for SPNEGO. This allows the user to plug in a different implementation to obtain a service ticket.<
 /p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.kerberos.jaas.context</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JAAS Context name to use for Kerberos. This is currently only supported for SPNEGO.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.kerberos.spn</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Kerberos Service Provider Name (spn) to use. This is currently only supported for SPNEGO.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.nonce.cache.instance</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>This holds a reference to a <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/cache/ReplayCache.html">ReplayCache</a> instance used to cache UsernameToken nonces. The default instance that is used is the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/tru
 nk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java?view=markup">EHCacheReplayCache</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.timestamp.cache.instance</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>This holds a reference to a <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/cache/ReplayCache.html">ReplayCache</a> instance used to cache Timestamp Created Strings. The default instance that is used is the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java?view=markup">EHCacheReplayCache</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.saml.cache.instance</td><td colspan="1" rowspan="1" class="confluenceTd">This holds a reference to a <a shape="rect" class="external-link" href="http://ws.apach
 e.org/wss4j/apidocs/org/apache/ws/security/cache/ReplayCache.html">ReplayCache</a> instance used to cache SAML2 Token Identifiers, when the token has a "OneTimeUse" Condition. The default instance that is used is the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java?view=markup">EHCacheReplayCache</a>.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.cache.config.file</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Set this property to point to a configuration file for the underlying caching implementation. The default configuration file that is used is <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/resources/cxf-ehcache.xml?view=markup">cxf-ehcache.xml</a> in the cxf-rt-ws-security module.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apach
 e.cxf.ws.security.tokenstore.TokenStore</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/TokenStore.java?view=markup">TokenStore</a> instance to use to cache security tokens. By default this uses the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java?view=markup">EHCacheTokenStore</a> if EhCache is available. Otherwise it uses the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/MemoryTokenStore.java?view=markup">MemoryTokenStore</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.subject.cert.constraints</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A co
 mma separated String of regular expressions which will be applied to the subject DN of the certificate used for signature validation, after trust verification of the certificate chain associated with the certificate. These constraints are not used when the certificate is contained in the keystore (direct trust).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.role.classifier</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If one of the WSS4J Validators returns a JAAS Subject from Validation, then the WSS4JInInterceptor will attempt to create a SecurityContext based on this Subject. If this value is not specified, then it tries to get roles using the DefaultSecurityContext in cxf-rt-core. Otherwise it uses this value in combination with the SUBJECT_ROLE_CLASSIFIER_TYPE to get the roles from the Subject.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.role.classifier.type</p></td><td colspan="1" rowspan="1" 
 class="confluenceTd"><p>If one of the WSS4J Validators returns a JAAS Subject from Validation, then the WSS4JInInterceptor will attempt to create a SecurityContext based on this Subject. Currently accepted values are "prefix" or "classname". Must be used in conjunction with the SUBJECT_ROLE_CLASSIFIER. The default value is "prefix".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.asymmetric.signature.algorithm</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>This configuration tag overrides the default Asymmetric Signature algorithm (RSA-SHA1) for use in WS-SecurityPolicy, as the WS-SecurityPolicy specification does not allow the use of other algorithms at present.</p></td></tr></tbody></table></div><h4 id="WS-SecurityPolicy-Validatorimplementationsforvalidatingreceivedsecuritytokens">Validator implementations for validating received security tokens</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowsp
 an="1" class="confluenceTd"><p>ws-security.ut.validator</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The WSS4J Validator instance to use to validate UsernameTokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/UsernameTokenValidator.html">UsernameTokenValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.saml1.validator</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The WSS4J Validator instance to use to validate SAML 1.1 Tokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/SamlAssertionValidator.html">SamlAssertionValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.saml2.validator</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The WSS4J Validator instance to use to validate SAML
  2.0 Tokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/SamlAssertionValidator.html">SamlAssertionValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.timestamp.validator</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The WSS4J Validator instance to use to validate Timestamps. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/TimestampValidator.html">TimestampValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.signature.validator</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The WSS4J Validator instance to use to validate trust in credentials used in Signature verification. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/secur
 ity/validate/SignatureTrustValidator.html">SignatureTrustValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.bst.validator</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The WSS4J Validator instance to use to validate BinarySecurityTokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/NoOpValidator.html">NoOpValidator</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sct.validator</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The WSS4J Validator instance to use to validate SecurityContextTokens. The default value is the <a shape="rect" class="external-link" href="http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/validate/NoOpValidator.html">NoOpValidator</a>.</p></td></tr></tbody></table></div><h4 id="WS-SecurityPolicy-STSClientConfigurationtags">STS Client Configuration tags</h4><
 div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.client</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A reference to the STSClient class used to communicate with the STS.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.applies-to</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The "AppliesTo" address to send to the STS. The default is the endpoint address of the service provider.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.token.usecert</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If true, writes out an X509Certificate structure in UseKey/KeyInfo. If false (the default), writes out a KeyValue structure instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.token.do.cancel</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to can
 cel a token when using SecureConversation after successful invocation. The default is "false".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.cache.issued.token.in.endpoint</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Set this to "false" to not cache a SecurityToken per proxy object in the IssuedTokenInterceptorProvider. This should be done if a token is being retrieved from an STS in an intermediary. The default value is "true".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.disable-wsmex-call-using-epr-address</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to avoid STS client trying send WS-MetadataExchange call using STS EPR WSA address when the endpoint contract contains no WS-MetadataExchange info. The default value is "false".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.token.crypto</p></td><td colspan="1" rowspan="1" class="confl
 uenceTd"><p>A Crypto object to be used for the STS. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#STS_TOKEN_CRYPTO">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.token.properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Crypto property configuration to use for the STS. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#STS_TOKEN_PROPERTIES">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.token.username</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The alias name in the keystore to get the user's public key to send to the STS for the PublicKey KeyType case.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.token.act-as</p></td><td colspan="1" rowspan=
 "1" class="confluenceTd"><p>The token to be sent to the STS in an "ActAs" field. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#STS_TOKEN_ACT_AS">here</a> for more information.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>ws-security.sts.token.on-behalf-of</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The token to be sent to the STS in an "OnBehalfOf" field. See <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/ws/security/SecurityConstants.html#STS_TOKEN_ON_BEHALF_OF">here</a> for more information.</p></td></tr></tbody></table></div><h4 id="WS-SecurityPolicy-ConfiguringviaSpring">Configuring via Spring</h4><p>The properties are easily configured as client or endpoint properties--use the former for the SOAP client, the latter for the web service provider.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xmlns:jaxws=&quot;http://cxf.apache.org/jaxws&quot;
    xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
@@ -202,13 +142,8 @@ Apache CXF -- WS-SecurityPolicy
 
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>For the jaxws:client's <em>name</em> attribute above, use the namespace of the WSDL along with the <em>name</em> attribute of the desired wsdl:port element under the WSDL's service section. (See <a shape="rect" class="external-link" href="http://tinyurl.com/yatskw4" rel="nofollow">here</a> and <a shape="rect" class="external-link" href="http://tinyurl.com/y9e7rjf" rel="nofollow">here</a> for an example.)</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
+</div></div><p>For the jaxws:client's <em>name</em> attribute above, use the namespace of the WSDL along with the <em>name</em> attribute of the desired wsdl:port element under the WSDL's service section. (See <a shape="rect" class="external-link" href="http://tinyurl.com/yatskw4" rel="nofollow">here</a> and <a shape="rect" class="external-link" href="http://tinyurl.com/y9e7rjf" rel="nofollow">here</a> for an example.)</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xmlns:jaxws=&quot;http://cxf.apache.org/jaxws&quot;
    xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
@@ -237,16 +172,8 @@ Apache CXF -- WS-SecurityPolicy
    &lt;/jaxws:endpoint&gt;
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>See this <a shape="rect" class="external-link" href="http://www.jroller.com/gmazza/entry/cxf_x509_profile" rel="nofollow">blog entry</a> for a more end-to-end example of using WS-SecurityPolicy with X.509 keys.</p>
-
-<h4 id="WS-SecurityPolicy-ConfiguringviaAPI's">Configuring via API's</h4>
-
-<p>Configuring the properties for the client just involves setting the properties in the client's RequestContext:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-Map&lt;String, Object&gt; ctx = ((BindingProvider)port).getRequestContext();
+</div></div><p>See this <a shape="rect" class="external-link" href="http://www.jroller.com/gmazza/entry/cxf_x509_profile" rel="nofollow">blog entry</a> for a more end-to-end example of using WS-SecurityPolicy with X.509 keys.</p><h4 id="WS-SecurityPolicy-ConfiguringviaAPI's">Configuring via API's</h4><p>Configuring the properties for the client just involves setting the properties in the client's RequestContext:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[Map&lt;String, Object&gt; ctx = ((BindingProvider)port).getRequestContext();
 ctx.put(&quot;ws-security.encryption.properties&quot;, properties);
 port.echoString(&quot;hello&quot;);
 ]]></script>

Modified: websites/production/cxf/content/docs/ws-trust.html
==============================================================================
--- websites/production/cxf/content/docs/ws-trust.html (original)
+++ websites/production/cxf/content/docs/ws-trust.html Wed Feb 12 16:48:12 2014
@@ -117,32 +117,8 @@ Apache CXF -- WS-Trust
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><h1 id="WS-Trust-WS-Trust">WS-Trust</h1>
-
-<p>WS-Trust support in CXF builds upon the <a shape="rect" href="ws-securitypolicy.html">WS-SecurityPolicy</a> implementation to handle the IssuedToken policy assertions that could be found in the WS-SecurityPolicy fragment.  </p>
-
-<p><strong>Note:</strong> Because the WS-IssuedToken support builds on the WS-SecurityPolicy support, this is currently only available to "wsdl first" projects.</p>
-
-
-<p>WS-Trust extends the WS-Security specification to allow issuing, renewing, and validation of security tokens.  A lot of what WS-Trust does centers around the use of a "Security Token Service", or STS.   The STS is contacted to obtain security tokens that are used to create messages to talk to the services.    The primary use of the STS is to acquire SAML tokens used to talk to the service.   Why is this interesting?</p>
-
-<p>When using "straight" WS-Security, the client and server need to have keys exchanged in advance.   If the client and server are both in the same security domain, that isn't usually a problem, but for larger, complex applications spanning multiple domains, that can be a burden.  Also, if multiple services require the same security credentials, updating all the services when those credentials change can by a major operation.   </p>
-
-<p>WS-Trust solves this by using security tokens that are obtained from a trusted Security Token Service.   A client authenticates itself with the STS based on policies and requirements defined by the STS.   The STS then provides a security token (example: a SAML token) that the client then uses to talk to the target service.  The service can validate that token to make sure it really came from the trusted STS.  </p>
-
-
-<p>When the WS-SecurityPolicy runtime in CXF encounters an IssuedToken assertion in the policy, the runtime requires an instance of  org.apache.cxf.ws.security.trust.STSClient to talk to the STS to obtain the required token.    Since the STSClient is a WS-SecurityPolicy client, it will need configuration items to be able to create its secure SOAP messages to talk to the STS.  </p>
-
-<h2 id="WS-Trust-GeneralConfiguration">General Configuration</h2>
-
-<p>There are several ways to configure the STSClient:</p>
-
-<p><strong>Direct configuration of an STSClient bean in the properties:</strong><br clear="none">
-In this scenario, a STSClient object is created directly as a property of the client object.   The wsdlLocation, service/endpoint names, etc... are all configured in line for that client.  </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;jaxws:client name=&quot;{http://cxf.apache.org/}MyService&quot; createdFromAPI=&quot;true&quot;&gt;
+<div id="ConfluenceContent"><h1 id="WS-Trust-WS-Trust">WS-Trust</h1><p>WS-Trust support in CXF builds upon the <a shape="rect" href="ws-securitypolicy.html">WS-SecurityPolicy</a> implementation to handle the IssuedToken policy assertions that could be found in the WS-SecurityPolicy fragment.</p><p><strong>Note:</strong> Because the WS-IssuedToken support builds on the WS-SecurityPolicy support, this is currently only available to "wsdl first" projects.</p><p>WS-Trust extends the WS-Security specification to allow issuing, renewing, and validation of security tokens. A lot of what WS-Trust does centers around the use of a "Security Token Service", or STS. The STS is contacted to obtain security tokens that are used to create messages to talk to the services. The primary use of the STS is to acquire SAML tokens used to talk to the service. Why is this interesting?</p><p>When using "straight" WS-Security, the client and server need to have keys exchanged in advance. If the client and s
 erver are both in the same security domain, that isn't usually a problem, but for larger, complex applications spanning multiple domains, that can be a burden. Also, if multiple services require the same security credentials, updating all the services when those credentials change can by a major operation.</p><p>WS-Trust solves this by using security tokens that are obtained from a trusted Security Token Service. A client authenticates itself with the STS based on policies and requirements defined by the STS. The STS then provides a security token (example: a SAML token) that the client then uses to talk to the target service. The service can validate that token to make sure it really came from the trusted STS.</p><p>When the WS-SecurityPolicy runtime in CXF encounters an IssuedToken assertion in the policy, the runtime requires an instance of org.apache.cxf.ws.security.trust.STSClient to talk to the STS to obtain the required token. Since the STSClient is a WS-SecurityPolicy client
 , it will need configuration items to be able to create its secure SOAP messages to talk to the STS.</p><h2 id="WS-Trust-GeneralConfiguration">General Configuration</h2><p>There are several ways to configure the STSClient:</p><p><strong>Direct configuration of an STSClient bean in the properties:</strong><br clear="none"> In this scenario, a STSClient object is created directly as a property of the client object. The wsdlLocation, service/endpoint names, etc... are all configured in line for that client.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;jaxws:client name=&quot;{http://cxf.apache.org/}MyService&quot; createdFromAPI=&quot;true&quot;&gt;
     &lt;jaxws:properties&gt;
         &lt;entry key=&quot;ws-security.sts.client&quot;&gt;
             &lt;!-- direct STSClient config and creation --&gt;
@@ -172,40 +148,21 @@ In this scenario, a STSClient object is 
     &lt;/jaxws:properties&gt;
 &lt;/jaxws:client&gt;
 ]]></script>
-</div></div>
-
-<p>The above example shows a configuration where the STS uses the UsernameToken profile to validate the client.  It is assumed the keystore identified within clientKeystore.properties contains both the private key of the client and the public key (identified above as mystskey) of the STS; if not, create separate property files for the signature properties and the encryption properties, pointing to the keystore and truststore respectively.</p>
-
-<p>Remember the jaxws:client createdFromAPI attribute needs to be set to true (as shown above) if you created the client programmatically via the CXF API's--i.e., Endpoint.publish() or Service.getPort().</p>
-
-<p>This also works for "code first" cases as you can do:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-STSClient sts = new STSClient(...);
+</div></div><p>The above example shows a configuration where the STS uses the UsernameToken profile to validate the client. It is assumed the keystore identified within clientKeystore.properties contains both the private key of the client and the public key (identified above as mystskey) of the STS; if not, create separate property files for the signature properties and the encryption properties, pointing to the keystore and truststore respectively.</p><p>Remember the jaxws:client createdFromAPI attribute needs to be set to true (as shown above) if you created the client programmatically via the CXF API's--i.e., Endpoint.publish() or Service.getPort().</p><p>This also works for "code first" cases as you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[STSClient sts = new STSClient(...);
 sts.setXXXX(....)
 .....
 ((BindingProvider)port).getRequestContext().put(&quot;ws-security.sts.client&quot;, sts);
 ]]></script>
-</div></div>
-
-<p>Sample clientKeystore.properties format:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+</div></div><p>Sample clientKeystore.properties format:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
 org.apache.ws.security.crypto.merlin.keystore.type=jks
 org.apache.ws.security.crypto.merlin.keystore.password=KeystorePasswordHere
 org.apache.ws.security.crypto.merlin.keystore.alias=ClientKeyAlias
 org.apache.ws.security.crypto.merlin.keystore.file=NameOfKeystore.jks 
 ]]></script>
-</div></div>
-
-<p><strong>Indirect configuration based on endpoint name:</strong><br clear="none">
-If the runtime does not find a STSClient bean configured directly on the client, it checks the configuration for a STSClient bean with the name of the endpoint appended with ".sts-client".   For example, if the endpoint name for your client is "{<a shape="rect" href="http://cxf.apache.org/">http://cxf.apache.org/</a>}TestEndpoint", then it can be configured as:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;bean name=&quot;{http://cxf.apache.org/}TestEndpoint.sts-client&quot; 
+</div></div><p><strong>Indirect configuration based on endpoint name:</strong><br clear="none"> If the runtime does not find a STSClient bean configured directly on the client, it checks the configuration for a STSClient bean with the name of the endpoint appended with ".sts-client". For example, if the endpoint name for your client is "{<a shape="rect" href="http://cxf.apache.org/">http://cxf.apache.org/</a>}TestEndpoint", then it can be configured as:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;bean name=&quot;{http://cxf.apache.org/}TestEndpoint.sts-client&quot; 
     class=&quot;org.apache.cxf.ws.security.trust.STSClient&quot; abstract=&quot;true&quot;&gt;
     &lt;property name=&quot;wsdlLocation&quot; value=&quot;WSDL/wsdl/trust.wsdl&quot;/&gt;
     &lt;property name=&quot;serviceName&quot; 
@@ -223,35 +180,8 @@ If the runtime does not find a STSClient
     &lt;/property&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>This properties configured in this example demonstrate STS validation of the client using the X.509 token profile.  The abstract="true" setting for the bean defers creation of the STSClient object until it is actually needed.  When that occurs, the CXF runtime will instantiate a new STSClient using the values configured for this bean.</p>
-
-<p><strong>Default configuration:</strong><br clear="none">
-If an STSClient is not found from the above methods, it then tries to find one configured like the indirect, but with the name "default.sts-client".   This can be used to configure sts-clients for multiple services.</p>
-
-<h2 id="WS-Trust-WS-Trust1.4Support">WS-Trust 1.4 Support</h2>
-
-<p>CXF supports some of the new functionality defined in the WS-Trust 1.4 specification.  The currently supported features are listed below.</p>
-
-<h3 id="WS-Trust-ActAs">ActAs</h3>
-<p>The ActAs capability allows an initiator to request a security token that allows it to act as if it were somebody else.  This capability becomes important in composite services where intermediate services make additional requests on-behalf of the true initiator.  In this scenario, the relying party (the final destination of an indirect service request) may require information about the true origin of the request.  The ActAs capability allows an intermediary to request a token that can convey this information.</p>
-
-<p>The content of the ActAs element to be sent in the STS RequestSecurityToken call can be set in one of two ways:</p>
-
-<ol><li>By specifying a value for the JAX-WS property SecurityConstants.STS_TOKEN_ACT_AS ("ws-security.sts.token.act-as")</li><li>By specifying a value for the STSClient.actAs property.</li></ol>
-
-
-<p>For either case, the value can be one of the following:</p>
-
-<ul><li>A String</li><li>A DOM Element</li><li>A CallbackHandler object to use to obtain the token</li></ul>
-
-
-<p>For example, the following code fragment demonstrates how to use an interceptor to dynamically set the content of the ActAs element in the STS RST, by specifying a value for SecurityConstants.STS_TOKEN_ACT_AS. Note that this interceptor is applied to the secured client, the initiator, and not to the STSClient's interceptor chain.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-public class ActAsOutInterceptor extends AbstractPhaseInterceptor&lt;Message&gt; {
+</div></div><p>This properties configured in this example demonstrate STS validation of the client using the X.509 token profile. The abstract="true" setting for the bean defers creation of the STSClient object until it is actually needed. When that occurs, the CXF runtime will instantiate a new STSClient using the values configured for this bean.</p><p><strong>Default configuration:</strong><br clear="none"> If an STSClient is not found from the above methods, it then tries to find one configured like the indirect, but with the name "default.sts-client". This can be used to configure sts-clients for multiple services.</p><h2 id="WS-Trust-WS-Trust1.4Support">WS-Trust 1.4 Support</h2><p>CXF supports some of the new functionality defined in the WS-Trust 1.4 specification. The currently supported features are listed below.</p><h3 id="WS-Trust-ActAs">ActAs</h3><p>The ActAs capability allows an initiator to request a security token that allows it to act as if it were somebody else. This 
 capability becomes important in composite services where intermediate services make additional requests on-behalf of the true initiator. In this scenario, the relying party (the final destination of an indirect service request) may require information about the true origin of the request. The ActAs capability allows an intermediary to request a token that can convey this information.</p><p>The content of the ActAs element to be sent in the STS RequestSecurityToken call can be set in one of two ways:</p><ol><li>By specifying a value for the JAX-WS property SecurityConstants.STS_TOKEN_ACT_AS ("ws-security.sts.token.act-as")</li><li>By specifying a value for the STSClient.actAs property.</li></ol><p>For either case, the value can be one of the following:</p><ul><li>A String</li><li>A DOM Element</li><li>A CallbackHandler object to use to obtain the token</li></ul><p>For example, the following code fragment demonstrates how to use an interceptor to dynamically set the content of the Act
 As element in the STS RST, by specifying a value for SecurityConstants.STS_TOKEN_ACT_AS. Note that this interceptor is applied to the secured client, the initiator, and not to the STSClient's interceptor chain.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class ActAsOutInterceptor extends AbstractPhaseInterceptor&lt;Message&gt; {
    
     ActAsOutInterceptor () {
         // This can be in any stage before the WS-SP interceptors
@@ -265,13 +195,8 @@ public class ActAsOutInterceptor extends
     }
 }
 ]]></script>
-</div></div>
-
-<p>Alternatively, the ActAs content may be set directly on the STS as shown below.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;bean name=&quot;{http://cxf.apache.org/}TestEndpoint.sts-client&quot; 
+</div></div><p>Alternatively, the ActAs content may be set directly on the STS as shown below.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;bean name=&quot;{http://cxf.apache.org/}TestEndpoint.sts-client&quot; 
     class=&quot;org.apache.cxf.ws.security.trust.STSClient&quot; abstract=&quot;true&quot;&gt;
     &lt;property name=&quot;wsdlLocation&quot; value=&quot;WSDL/wsdl/trust.wsdl&quot;/&gt;
     &lt;property name=&quot;serviceName&quot; 
@@ -286,28 +211,7 @@ public class ActAsOutInterceptor extends
     &lt;/property&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<h3 id="WS-Trust-OnBehalfOf">OnBehalfOf</h3>
-<p>The OnBehalfOf capability allows an initiator to request a security token on behalf of somebody else. The content of the OnBehalfOf element to be sent in the STS RequestSecurityToken call can be set in one of two ways:</p>
-
-<ol><li>By specifying a value for the JAX-WS property SecurityConstants.STS_TOKEN_ON_BEHALF_OF ("ws-security.sts.token.on-behalf-of")</li><li>By specifying a value for the STSClient.onBehalfOf property.</li></ol>
-
-
-<p>For either case, the value can be one of the following:</p>
-
-<ul><li>A String</li><li>A DOM Element</li><li>A CallbackHandler object to use to obtain the token</li></ul>
-
-
-<h2 id="WS-Trust-WS-TrustusingSPNego">WS-Trust using SPNego</h2>
-
-<p>As of CXF 2.4.7 and 2.5.3, CXF contains (client) support for WS-Trust using SPNego. See the following <a shape="rect" class="external-link" href="http://coheigea.blogspot.com/2012/02/ws-trust-spnego-support-in-apache-cxf.html" rel="nofollow">blog</a> for an explanation of what this entails, and how to run some system tests in CXF for this feature. </p>
-
-<h2 id="WS-Trust-BlogsonWS-TrustinCXF">Blogs on WS-Trust in CXF</h2>
-
-<p>Some blogs for up-to-date information about WS-Trust and other security topics in CXF:<br clear="none">
-<a shape="rect" class="external-link" href="http://coheigea.blogspot.com/" rel="nofollow">http://coheigea.blogspot.com/</a><br clear="none">
-<a shape="rect" class="external-link" href="http://owulff.blogspot.com/" rel="nofollow">http://owulff.blogspot.com/</a></p></div>
+</div></div><h3 id="WS-Trust-OnBehalfOf">OnBehalfOf</h3><p>The OnBehalfOf capability allows an initiator to request a security token on behalf of somebody else. The content of the OnBehalfOf element to be sent in the STS RequestSecurityToken call can be set in one of two ways:</p><ol><li>By specifying a value for the JAX-WS property SecurityConstants.STS_TOKEN_ON_BEHALF_OF ("ws-security.sts.token.on-behalf-of")</li><li>By specifying a value for the STSClient.onBehalfOf property.</li></ol><p>For either case, the value can be one of the following:</p><ul><li>A String</li><li>A DOM Element</li><li>A CallbackHandler object to use to obtain the token</li></ul><h2 id="WS-Trust-WS-TrustusingSPNego">WS-Trust using SPNego</h2><p>As of CXF 2.4.7 and 2.5.3, CXF contains (client) support for WS-Trust using SPNego. See the following <a shape="rect" class="external-link" href="http://coheigea.blogspot.com/2012/02/ws-trust-spnego-support-in-apache-cxf.html" rel="nofollow">blog</a> for an explanati
 on of what this entails, and how to run some system tests in CXF for this feature.</p><h2 id="WS-Trust-WS-TrustusingXKMS">WS-Trust using XKMS</h2><p>Since CXF 2.7.7 Security Token Service (STS) can be configured to use <a shape="rect" href="xml-key-management-service-xkms.html">XKMS </a>Crypto provider. In this case X509 certificates can be located centrally and managed using standard XKMS interface. STS will automatically invoke XKMS client for locate or validate corresponded X509 certificate. See the following <a shape="rect" class="external-link" href="http://ashakirin.blogspot.de/2013/07/cxf-security-integrate-pki-to-security.html" rel="nofollow">blog</a> for the details and sample.</p><p>This feature can be especially useful for STS scenario with SymmetricKey. With this scenario, the STS and the WS consumer negotiate a symmetric key:</p><ol><li>The WS-Client authenticates himself to STS and contributes material to the creation of symmetric key.</li><li>The STS verifies WS-Clien
 t authentication and generates symmetric key using material received from WS-Client</li><li>The STS encrypts symmetric key using WS-Service public key and inserts the encrypted key together with security token into SAML assertion</li><li>The STS signs SAML assertion and sends it together with key material for generation symmetric key to the WS-Client.</li><li>The WS-Client generates short-lived symmetric key from own material and the key material from the STS.</li><li>The WS-Client inserts the SAML token, into the message header. It encrypts the message texts or/and signs the message with the generated symmetric key. It then sends the user's message to the WS-Service.</li><li>The WS-Service checks the signature in the SAML token and uses its private key to decrypt the symmetric key contained in the SAML token.</li><li>The WS-Service verifies the signature of the WS-Client (Holder-of-Key) with the decrypted symmetric key. In this way, the STS confirms that the Holder-of-Key is the su
 bject (the user) in the assertion.</li><li>The WS-Service uses the symmetric key to decrypt the message text.</li></ol><p>On the step (3) STS needs the public key (certificate) of target WS-Service. Normally STS servers not only one, but multiple services (restricted by url patterns in TokenServiceProvider). This can be a serious drawback to manage public certificates of all services into STS local keystore.</p><p>XKMS Crypto provider provides elegant solution of this using following configuration:</p><ul><li>encryptionUsername (in StaticSTSProperties or jaxws:endpoint properties) should be set into special value: <em>useEndpointAsCertAlias</em> (STSConstants.USE_ENDPOINT_AS_CERT_ALIAS)</li><li>encryptionCrypto should be set to XKMS Crypto implementation</li><li>Service certificates should be saved into XKMS under service endpoint (use Application <a shape="rect" class="external-link" href="http://urnapachecxfservice:endpoint" rel="nofollow">"<em>urn:apache:cxf:service:endpoint</em>
 </a>" and service endpoint as identifier)</li></ul><p>In this case STS recognizes encryptionName constant and will ask XKMS Crypto for the service certificate using AppliesTo endpoint address.&#160;XKMS will locate service certificate using this endpoint address.</p><p>STS can server multiple WS-Services and doesn't care about services certificates locally - they are stored and managed in central XKMS repository.</p><p>The following <a shape="rect" class="external-link" href="http://ashakirin.blogspot.de/2013/07/cxf-security-integrate-pki-to-security.html" rel="nofollow">blog</a> explains the details and contains the sample code.</p><h2 id="WS-Trust-BlogsonWS-TrustinCXF">Blogs on WS-Trust in CXF</h2><p>Some blogs for up-to-date information about WS-Trust and other security topics in CXF:<br clear="none"> <a shape="rect" class="external-link" href="http://coheigea.blogspot.com/" rel="nofollow">http://coheigea.blogspot.com/</a><br clear="none"> <a shape="rect" class="external-link" hr
 ef="http://owulff.blogspot.com/" rel="nofollow">http://owulff.blogspot.com/</a></p></div>
            </div>
            <!-- Content -->
          </td>



Mime
View raw message