cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r949042 [2/2] - in /websites/production/cxf/content: cache/ docs/
Date Fri, 24 Apr 2015 14:46:56 GMT
Added: websites/production/cxf/content/docs/security-configuration.html
==============================================================================
--- websites/production/cxf/content/docs/security-configuration.html (added)
+++ websites/production/cxf/content/docs/security-configuration.html Fri Apr 24 14:46:55 2015
@@ -0,0 +1,157 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+  <head>
+
+<link type="text/css" rel="stylesheet" href="/resources/site.css">
+<script src='/resources/space.js'></script>
+
+<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+<meta name="keywords" content="business integration, EAI, SOA, Service Oriented Architecture, web services, SOAP, JBI, JMS, WSDL, XML, EDI, Electronic Data Interchange, standards support, integration standards, application integration, middleware, software, solutions, services, CXF, open source">
+<meta name="description" content="Apache CXF, Services Framework - Security Configuration">
+
+
+
+
+    <title>
+Apache CXF -- Security Configuration
+    </title>
+  </head>
+<body onload="init()">
+
+
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr>
+    <td id="cell-0-0" colspan="2">&nbsp;</td>
+    <td id="cell-0-1">&nbsp;</td>
+    <td id="cell-0-2" colspan="2">&nbsp;</td>
+  </tr>
+  <tr>
+    <td id="cell-1-0">&nbsp;</td>
+    <td id="cell-1-1">&nbsp;</td>
+    <td id="cell-1-2">
+      <!-- Banner -->
+<div class="banner" id="banner"><div><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" colspan="1" nowrap>
+<a shape="rect" href="http://cxf.apache.org/" title="Apache CXF"><span style="font-weight: bold; font-size: 170%; color: white">Apache CXF</span></a>
+</td><td align="right" colspan="1" nowrap>
+<a shape="rect" href="http://www.apache.org/" title="The Apache Sofware Foundation"><img border="0" alt="ASF Logo" src="http://cxf.apache.org/images/asf-logo.png"></a>
+</td></tr></table></div></div>
+      <!-- Banner -->
+      <div id="top-menu">
+        <table border="0" cellpadding="1" cellspacing="0" width="100%">
+          <tr>
+            <td>
+              <div align="left">
+                <!-- Breadcrumbs -->
+<a href="index.html">Index</a>&nbsp;&gt;&nbsp;<a href="security.html">Security</a>&nbsp;&gt;&nbsp;<a href="security-configuration.html">Security Configuration</a>
+                <!-- Breadcrumbs -->
+              </div>
+            </td>
+            <td>
+              <div align="right">
+                <!-- Quicklinks -->
+<div id="quicklinks"><p><a shape="rect" href="http://cxf.apache.org/download.html">Download</a> | <a shape="rect" href="http://cxf.apache.org/docs/index.html">Documentation</a></p></div>
+                <!-- Quicklinks -->
+              </div>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </td>
+    <td id="cell-1-3">&nbsp;</td>
+    <td id="cell-1-4">&nbsp;</td>
+  </tr>
+  <tr>
+    <td id="cell-2-0" colspan="2">&nbsp;</td>
+    <td id="cell-2-1">
+      <table>
+        <tr valign="top">
+          <td height="100%">
+            <div id="wrapper-menu-page-right">
+              <div id="wrapper-menu-page-top">
+                <div id="wrapper-menu-page-bottom">
+                  <div id="menu-page">
+                    <!-- NavigationBar -->
+<div id="navigation"><ul class="alternate"><li><a shape="rect" href="overview.html">Overview</a></li><li><a shape="rect" href="how-tos.html">How-Tos</a></li><li><a shape="rect" href="frontends.html">Frontends</a></li><li><a shape="rect" href="databindings.html">DataBindings</a></li><li><a shape="rect" href="transports.html">Transports</a></li><li><a shape="rect" href="configuration.html">Configuration</a></li><li><a shape="rect" href="debugging-and-logging.html">Debugging and Logging</a></li><li><a shape="rect" href="tools.html">Tools</a></li><li><a shape="rect" href="restful-services.html">RESTful Services</a></li><li><a shape="rect" href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect" href="service-routing.html">Service Routing</a></li><li><a shape="rect" href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect" href="ws-support.html">WS-* Support</a></li><li><a shape="rect" href="advanced-integration.html">Advanced Integration</a></li><li><a shape
 ="rect" href="deployment.html">Deployment</a></li><li><a shape="rect" href="schemas-and-namespaces.html">Use of Schemas and Namespaces</a></li></ul><hr><ul class="alternate"><li><p>Search</p></li></ul><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
+  <div>
+    <input type="hidden" name="cx" value="002890367768291051730:o99qiwa09y4">
+    <input type="hidden" name="ie" value="UTF-8">
+    <input type="text" name="q" size="21">
+    <input type="submit" name="sa" value="Search">
+  </div>
+</form>
+<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script><hr><ul class="alternate"><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest/">API 2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.0.x/">API 3.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul></div>
+                    <!-- NavigationBar -->
+                  </div>
+              </div>
+            </div>
+          </div>
+         </td>
+         <td height="100%">
+           <!-- Content -->
+           <div class="wiki-content">
+<div id="ConfluenceContent"><h2 id="SecurityConfiguration-Backgroundtocommonsecurityconfiguration">Background to common security configuration</h2><p>From Apache CXF 3.1.0, the <a shape="rect" href="ws-securitypolicy.html">WS-SecurityPolicy</a> and the <a shape="rect" href="jax-rs-xml-security.html">XML Security</a> (JAX-RS) components in CXF share a common set of configuration tags. Previously, the configuration tags were all defined in the SecurityConstants class in the cxf-rt-ws-security module. The JAX-RS XML Security component then referenced these configuration tags directly, which meant that the XML Security component had to have a dependency on a SOAP module, which was not ideal.</p><h2 id="SecurityConfiguration-NewconfigurationtagsinApacheCXF3.1.0">New configuration tags in Apache CXF 3.1.0</h2><p>From Apache CXF 3.1.0, the cxf-rt-security module is now shared between both the WS-Security and JAX-RS XML Security modules, and contains a SecurityConstants class that defines s
 ecurity constants used by both stacks. These configuration tags are exactly the same as a set of previous configuration tags found in the WS-Security SecurityConstants class in previous releases, except that the prefix is now "security" (was "ws-security"). Here are the new set of configuration tags:</p><h4 id="SecurityConfiguration-Userproperties">User properties</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>security.username</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The user's name. It is used differently by each of the 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>security.password</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The user's password when "security.callback-handler" i
 s 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>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>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="SecurityConfiguration-CallbackClassandCryptoproperties">Callback Class and Crypto properties</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>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>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>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 "security.signature.crypto" is not set instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>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 "security.encryption.crypto" is not set instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>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/cryp
 to/Crypto.html">object</a> to be used for signature. If this is not defined then "security.signature.properties" is used instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>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 "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 security-encryption properties are used.</p><h4 id="SecurityConfiguration-BooleanSecurityconfigurationtags,e.g.thevalueshouldbe&quot;true&quot;or&quot;false&quot;.">Boolean 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>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">security.enable.unsigned-saml-assertion.principal</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to allow unsigned saml assertions as SecurityContext Principals. The default is false.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">security.validate.saml.subject.conf</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><t
 d colspan="1" rowspan="1" class="confluenceTd">Whether to validate the SubjectConfirmation requirements of a received SAML Token.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">security.sc.jaas-subject</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd">Set this to "false" if security context must not be created from JAAS Subject.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">security.validate.audience-restriction</td><td colspan="1" rowspan="1" class="confluenceTd">(varies)</td><td colspan="1" rowspan="1" class="confluenceTd"><p>If this is set to "true", then IF the SAML Token contains Audience Restriction URIs, one of them must match either the request URL or the Service QName. The default is "true" for CXF 3.0.x, and "false" for 2.7.x.</p></td></tr></tbody></table></div><h4 id="SecurityConfiguration-Non-booleanSecurityConfigurationparameters">Non-boolean Security Configuration parameters</h4
 ><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>security.saml-role-attributename</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The attribute URI of the SAML AttributeStatement where the role information is stored. The default is "<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role" rel="nofollow">http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role</a>".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>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></tb
 ody></table></div><h2 id="SecurityConfiguration-Backwardscompatibility">Backwards compatibility</h2><p>Users of Apache CXF prior to 3.1.0 do not need to make any adjustment to their code or spring files. The older "ws-" prefix associated with the configuration tags above will continue to be accepted.</p></div>
+           </div>
+           <!-- Content -->
+         </td>
+        </tr>
+      </table>
+   </td>
+   <td id="cell-2-2" colspan="2">&nbsp;</td>
+  </tr>
+  <tr>
+   <td id="cell-3-0">&nbsp;</td>
+   <td id="cell-3-1">&nbsp;</td>
+   <td id="cell-3-2">
+     <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+         <a href="http://cxf.apache.org/privacy-policy.html">Privacy Policy</a> - 
+         (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=56066405">edit page</a>) 
+	 (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=56066405&amp;showComments=true&amp;showCommentArea=true#addcomment">add comment</a>)<br>
+	Apache CXF, CXF, Apache, the Apache feather logo are trademarks of The Apache Software Foundation.<br>
+        All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+       </div>
+       <!-- Footer -->
+     </div>
+   </td>
+   <td id="cell-3-3">&nbsp;</td>
+   <td id="cell-3-4">&nbsp;</td>
+  </tr>
+  <tr>
+    <td id="cell-4-0" colspan="2">&nbsp;</td>
+    <td id="cell-4-1">&nbsp;</td>
+    <td id="cell-4-2" colspan="2">&nbsp;</td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-4458903-1");
+pageTracker._trackPageview();
+} catch(err) {}</script>
+
+</body>
+</html>
+

Modified: websites/production/cxf/content/docs/security.html
==============================================================================
--- websites/production/cxf/content/docs/security.html (original)
+++ websites/production/cxf/content/docs/security.html Fri Apr 24 14:46:55 2015
@@ -117,19 +117,19 @@ Apache CXF -- Security
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><h1 id="Security-SecuringCXFServices">Securing CXF Services</h1><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1419015810660 {padding: 0px;}
-div.rbtoc1419015810660 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1419015810660 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1429886791246 {padding: 0px;}
+div.rbtoc1429886791246 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1429886791246 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1419015810660">
+/*]]>*/</style></p><div class="toc-macro rbtoc1429886791246">
 <ul class="toc-indentation"><li><a shape="rect" href="#Security-SecuringCXFServices">Securing CXF Services</a></li><li><a shape="rect" href="#Security-Securetransports">Secure transports</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Security-HTTPS">HTTPS</a></li></ul>
-</li><li><a shape="rect" href="#Security-WS-*Security(includingUsernameTokenandX.509Tokenprofiles)">WS-* Security (including UsernameToken and X.509 Token profiles)</a></li><li><a shape="rect" href="#Security-WS-Trust,STS">WS-Trust, STS</a></li><li><a shape="rect" href="#Security-SAMLWebSSO">SAML Web SSO</a></li><li><a shape="rect" href="#Security-OAuth">OAuth</a></li><li><a shape="rect" href="#Security-Authentication">Authentication</a>
+</li><li><a shape="rect" href="#Security-SecurityConfiguration">Security Configuration</a></li><li><a shape="rect" href="#Security-WS-*Security(includingUsernameTokenandX.509Tokenprofiles)">WS-* Security (including UsernameToken and X.509 Token profiles)</a></li><li><a shape="rect" href="#Security-WS-Trust,STS">WS-Trust, STS</a></li><li><a shape="rect" href="#Security-SAMLWebSSO">SAML Web SSO</a></li><li><a shape="rect" href="#Security-JAX-RSXMLSecurity">JAX-RS XML Security</a></li><li><a shape="rect" href="#Security-JAX-RSSAML">JAX-RS SAML</a></li><li><a shape="rect" href="#Security-OAuth">OAuth</a></li><li><a shape="rect" href="#Security-Authentication">Authentication</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Security-JAASLoginInterceptor">JAASLoginInterceptor</a></li><li><a shape="rect" href="#Security-Kerberos">Kerberos</a></li></ul>
 </li><li><a shape="rect" href="#Security-Authorization">Authorization</a></li><li><a shape="rect" href="#Security-ControllingLargeRequestPayloads">Controlling Large Request Payloads</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Security-XML">XML</a></li><li><a shape="rect" href="#Security-XML-CXFversionspriorto2.7.4">XML - CXF versions prior to 2.7.4</a></li><li><a shape="rect" href="#Security-Multiparts">Multiparts</a></li></ul>
 </li><li><a shape="rect" href="#Security-Largedatastreamcaching">Large data stream caching</a></li></ul>
-</div><h1 id="Security-Securetransports">Secure transports</h1><h2 id="Security-HTTPS">HTTPS</h2><p>Please see the <a shape="rect" href="http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html">Configuring SSL Support</a> page for more information.</p><h1 id="Security-WS-*Security(includingUsernameTokenandX.509Tokenprofiles)">WS-* Security (including UsernameToken and X.509 Token profiles)</h1><p>Please see the <a shape="rect" href="http://cxf.apache.org/docs/ws-support.html">WS-* Support</a> page for more information.</p><h1 id="Security-WS-Trust,STS">WS-Trust, STS</h1><p>Please see the <a shape="rect" class="external-link" href="https://cwiki.apache.org/CXF20DOC/ws-trust.html">WS-Trust</a> page for more information.</p><h1 id="Security-SAMLWebSSO">SAML Web SSO</h1><p>Please see <a shape="rect" class="external-link" href="http://coheigea.blogspot.ie/2012/06/saml-web-sso-profile-support-in-apache.html" rel="nofollow">this blog entry</a> announcing the support for
  SAML Web SSO profile and the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/SAML+Web+SSO">SAML Web SSO</a> page for more information.</p><h1 id="Security-OAuth">OAuth</h1><p>Please check <a shape="rect" href="http://cxf.apache.org/docs/jax-rs-oauth2.html">OAuth2.0</a> and <a shape="rect" href="http://cxf.apache.org/docs/jax-rs-oauth.html">OAuth1.0</a> pages for the information about the support for OAuth 2.0 and OAuth 1.0 in CXF.</p><h1 id="Security-Authentication">Authentication</h1><h2 id="Security-JAASLoginInterceptor">JAASLoginInterceptor</h2><p>Container or Spring Security managed authentication as well as the custom authentication are all the viable options used by CXF developers.</p><p>Starting from CXF 2.3.2 and 2.4.0 it is possible to use an org.apache.cxf.interceptor.security.JAASLoginInterceptor in order to authenticate a current user and populate a CXF SecurityContext.</p><p>Example :</p><div class="code panel pdl" style="border-width: 1px;">
 <div class="codeContent panelContent pdl">
+</div><h1 id="Security-Securetransports">Secure transports</h1><h2 id="Security-HTTPS">HTTPS</h2><p>Please see the <a shape="rect" href="http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html">Configuring SSL Support</a> page for more information.</p><h1 id="Security-SecurityConfiguration">Security Configuration</h1><p>The WS-Security layer and the XML-Security layer in Apache CXF share a common set of security configuration tags from CXF 3.1.0. The <a shape="rect" href="security-configuration.html">Security Configuration</a> page details these tags and values. The WS-Security layer also has some additional configuration tags that are only used for when security is configured via WS-SecurityPolicy, see the following <a shape="rect" href="ws-securitypolicy.html">page</a> for more information.</p><h1 id="Security-WS-*Security(includingUsernameTokenandX.509Tokenprofiles)">WS-* Security (including UsernameToken and X.509 Token profiles)</h1><p>Please see the <a shap
 e="rect" href="http://cxf.apache.org/docs/ws-support.html">WS-* Support</a> page for more information.</p><h1 id="Security-WS-Trust,STS">WS-Trust, STS</h1><p>Please see the <a shape="rect" class="external-link" href="https://cwiki.apache.org/CXF20DOC/ws-trust.html">WS-Trust</a> page for more information.</p><h1 id="Security-SAMLWebSSO">SAML Web SSO</h1><p>Please see <a shape="rect" class="external-link" href="http://coheigea.blogspot.ie/2012/06/saml-web-sso-profile-support-in-apache.html" rel="nofollow">this blog entry</a> announcing the support for SAML Web SSO profile and the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/SAML+Web+SSO">SAML Web SSO</a> page for more information.</p><h1 id="Security-JAX-RSXMLSecurity">JAX-RS XML Security</h1><p>It is possible to secure XML based JAX-RS requests (and responses) using XML Signature and Encryption. See the <a shape="rect" href="jax-rs-xml-security.html">JAX-RS XML Security</a> page for more information.</p>
 <h1 id="Security-JAX-RSSAML">JAX-RS SAML</h1><p>See the <a shape="rect" href="jax-rs-saml.html">JAX-RS SAML</a> page on creating SAML Assertions and adding them to a JAX-RS request, as well as how to validate them on the receiving side.</p><h1 id="Security-OAuth">OAuth</h1><p>Please check <a shape="rect" href="http://cxf.apache.org/docs/jax-rs-oauth2.html">OAuth2.0</a> and <a shape="rect" href="http://cxf.apache.org/docs/jax-rs-oauth.html">OAuth1.0</a> pages for the information about the support for OAuth 2.0 and OAuth 1.0 in CXF.</p><h1 id="Security-Authentication">Authentication</h1><h2 id="Security-JAASLoginInterceptor">JAASLoginInterceptor</h2><p>Container or Spring Security managed authentication as well as the custom authentication are all the viable options used by CXF developers.</p><p>Starting from CXF 2.3.2 and 2.4.0 it is possible to use an org.apache.cxf.interceptor.security.JAASLoginInterceptor in order to authenticate a current user and populate a CXF SecurityContext.<
 /p><p>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;jaxws:endpoint address=&quot;/soapService&quot;&gt;
  &lt;jaxws:inInterceptors&gt;
    &lt;ref bean=&quot;authenticationInterceptor&quot;/&gt;

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 Fri Apr 24 14:46:55 2015
@@ -117,7 +117,7 @@ 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><p>CXF supports WS-SecurityPolicy versions 1.1 and later. It does
  not support WS-SecurityPolicy 1.0.</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 f
 or 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 o
 f 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 fo
 r 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-h
 andler</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 colspa
 n="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. Only applies up to CXF 2.7.x.</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 Username
 Token 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><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security
 .validate.saml.subject.conf</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to validate the SubjectConfirmation requirements of a received SAML Token.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.enable.streaming</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to enable streaming WS-Security.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.return.security.error</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to return the security error message to the client, and not one of the default error QNames.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.must-understand</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Set this to
  "false" in order to remove the SOAP mustUnderstand header from security headers generated based on a WS-SecurityPolicy.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.sc.jaas-subject</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd">Set this to "false" if security context must not be created from JAAS Subject.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.validate.audience-restriction</td><td colspan="1" rowspan="1" class="confluenceTd">(varies)</td><td colspan="1" rowspan="1" class="confluenceTd"><p>If this is set to "true", then IF the SAML Token contains Audience Restriction URIs, one of them must match either the request URL or the Service QName. The default is "true" for CXF 3.0.x, and "false" for 2.7.x.</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" rowspan=
 "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.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.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 Userna
 meToken nonces. 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.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.apache.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=mar
 kup">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">ws-security.cache.identifier</td><td colspan="1" rowspan="1" class="confluenceTd">The Cache Identifier to use with the TokenStore. CXF uses the following key to retrieve a token store: "org.apache.cxf.ws.security.tokenstore.TokenStore-&lt;identifier&gt;". This key can be used to configure service-specific cache configuration. If the identifier does not match, then it falls back to a cache configuration with key "org.apache.cxf.ws.security.tokenstore.TokenStore". The default "&lt;identifier&gt;" is the QName of the service in question.</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 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><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.password.encryptor.instance</td><td colspan="1" rowspan="1" class="confluenceTd"><p>A PasswordEncryptor instance, which is used to encrypt or decrypt passwords in the Merlin Crypto implementation</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.delegated.credential</td><td colspan="1" rowspan="1" class="confluenceTd">A delegated credential to use for WS-Security. Currently only a Kerberos GSSCredential Object is supported. Th
 is is used to retrieve a service ticket instead of using the client credentials.</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 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/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 Vali
 dator 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 cancel a token when using SecureConversation after successful invocation. The default is "false".</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.issue.after.failed.renew</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to fall back to calling "issue" after failing to renew an expired token. The default is "true".</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 s
 hould 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>Th
 e 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><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.issue.after.failed.renew</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to call "Issue" if a token "Renew" fails. Some STSs do not support the renew binding. Defaults to "true".</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.sts.token.imminent-expiry-value</td><td colspan="1" rowspan="1" class="confluenceTd">The value in seconds within which a token is considered to be expired by the client, i.e. it is considered to be expired if it will expire in a time less than the value specified by this tag. The default value is "10" for CXF 3.0.2+, and "0" for CXF 2.7.13+.</td></tr></tbody></table></div><h4 id="WS-SecurityPoli
 cy-KerberosConfigurationtags">Kerberos Configuration tags</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">ws-security.kerberos.request.credential.delegation</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to request credential delegation or not in the KerberosClient.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.kerberos.use.credential.delegation</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to use credential delegation or not in the KerberosClient.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.kerbero
 s.is.username.in.servicename.form</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether the Kerberos username is in servicename form or not.</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>n/a</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.kerberos.jaas.context</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>n/a</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JAAS Context name to use for Kerberos.</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>n/a</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Kerberos Service Provider Name (spn) to use.</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">
+<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><p>CXF supports WS-SecurityPolicy versions 1.1 and later. It does
  not support WS-SecurityPolicy 1.0.</p><h3 id="WS-SecurityPolicy-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</h3><p>From Apache CXF 3.1.0, some of the WS-Security based configuration tags have been changed to just start with "security-". This is so that they can be shared with the <a shape="rect" href="jax-rs-xml-security.html">JAX-RS XML Security</a> component. Apart from the prefix change, the tags are exactly the same. Older "ws-security-" values continue to be accepted in CXF 3.1.0. See the <a shape="rect" href="security-configuration.html">Security Configuration</a> page for information on the new shared configuration tags.</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 t
 hat 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 th
 e 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. First, see the <a shape="rect" href="security-configuration.html">Security Configuration</a> page for information on the configuration tags that are shared with the JAX-RS XML Security component. Here are configuration tags that only apply to the WS-SecurityPolicy layer, and hence all start with "ws-security" (as opposed to the commo
 n tags which now start with "security-").</p><p>&#160;</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.username-token.always.encrypted</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>tr
 ue</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. Only applies up to CXF 2.7.x.</
 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" rowsp
 an="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><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.enable.streaming</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to enable streaming WS-Security.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.return.security.error</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to return the security error message to the client, and not one of the default error QNames.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.must-understand</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Set this to "false" in order to remove the SOAP mustU
 nderstand header from security headers generated based on a WS-SecurityPolicy.</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.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.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/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">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.apache.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" r
 owspan="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">ws-security.cache.identifier</td><td colspan="1" rowspan="1"
  class="confluenceTd">The Cache Identifier to use with the TokenStore. CXF uses the following key to retrieve a token store: "org.apache.cxf.ws.security.tokenstore.TokenStore-&lt;identifier&gt;". This key can be used to configure service-specific cache configuration. If the identifier does not match, then it falls back to a cache configuration with key "org.apache.cxf.ws.security.tokenstore.TokenStore". The default "&lt;identifier&gt;" is the QName of the service in question.</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><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.password.encryptor.instance</td><td co
 lspan="1" rowspan="1" class="confluenceTd"><p>A PasswordEncryptor instance, which is used to encrypt or decrypt passwords in the Merlin Crypto implementation</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.delegated.credential</td><td colspan="1" rowspan="1" class="confluenceTd">A delegated credential to use for WS-Security. Currently only a Kerberos GSSCredential Object is supported. This is used to retrieve a service ticket instead of using the client credentials.</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 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><t
 r><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="confluenceT
 d"><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 ST
 SClient 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">ws-security.issue.after.failed.renew</td><td colspan="1" row
 span="1" class="confluenceTd"><p>Whether to fall back to calling "issue" after failing to renew an expired token. The default is "true".</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></t
 d><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.tok
 en.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><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.issue.after.failed.renew</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to call "Issue" if a token "Renew" fails. Some STSs do not support the renew binding. Defaults to "true".</td></tr><tr><td colspan="1" rowspan="1" class="conf
 luenceTd">ws-security.sts.token.imminent-expiry-value</td><td colspan="1" rowspan="1" class="confluenceTd">The value in seconds within which a token is considered to be expired by the client, i.e. it is considered to be expired if it will expire in a time less than the value specified by this tag. The default value is "10" for CXF 3.0.2+, and "0" for CXF 2.7.13+.</td></tr></tbody></table></div><h4 id="WS-SecurityPolicy-KerberosConfigurationtags">Kerberos Configuration tags</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">ws-security.kerberos.request.credential.delegation</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to request c
 redential delegation or not in the KerberosClient.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.kerberos.use.credential.delegation</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether to use credential delegation or not in the KerberosClient.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">ws-security.kerberos.is.username.in.servicename.form</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">Whether the Kerberos username is in servicename form or not.</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>n/a</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/secu
 rity/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.kerberos.jaas.context</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>n/a</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The JAAS Context name to use for Kerberos.</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>n/a</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Kerberos Service Provider Name (spn) to use.</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;
@@ -129,13 +129,13 @@ Apache CXF -- WS-SecurityPolicy
    &lt;jaxws:client name=&quot;{http://cxf.apache.org}MyPortName&quot;
       createdFromAPI=&quot;true&quot;&gt;
       &lt;jaxws:properties&gt;
-         &lt;entry key=&quot;ws-security.callback-handler&quot;
+         &lt;entry key=&quot;security.callback-handler&quot;
              value=&quot;interop.client.KeystorePasswordCallback&quot;/&gt;
-         &lt;entry key=&quot;ws-security.signature.properties&quot;
+         &lt;entry key=&quot;security.signature.properties&quot;
              value=&quot;etc/client.properties&quot;/&gt;
-         &lt;entry key=&quot;ws-security.encryption.properties&quot;
+         &lt;entry key=&quot;security.encryption.properties&quot;
              value=&quot;etc/service.properties&quot;/&gt;
-         &lt;entry key=&quot;ws-security.encryption.username&quot;
+         &lt;entry key=&quot;security.encryption.username&quot;
              value=&quot;servicekeyalias&quot;/&gt;
       &lt;/jaxws:properties&gt;
    &lt;/jaxws:client&gt;
@@ -159,13 +159,13 @@ Apache CXF -- WS-SecurityPolicy
       implementor=&quot;com.foo.MyService&quot;&gt;
 
       &lt;jaxws:properties&gt;
-         &lt;entry key=&quot;ws-security.callback-handler&quot;
+         &lt;entry key=&quot;security.callback-handler&quot;
              value=&quot;interop.client.UTPasswordCallback&quot;/&gt;
-         &lt;entry key=&quot;ws-security.signature.properties&quot;
+         &lt;entry key=&quot;security.signature.properties&quot;
              value=&quot;etc/keystore.properties&quot;/&gt;
-         &lt;entry key=&quot;ws-security.encryption.properties&quot;
+         &lt;entry key=&quot;security.encryption.properties&quot;
              value=&quot;etc/truststore.properties&quot;/&gt;
-         &lt;entry key=&quot;ws-security.encryption.username&quot;
+         &lt;entry key=&quot;security.encryption.username&quot;
              value=&quot;useReqSigCert&quot;/&gt;
       &lt;/jaxws:properties&gt;
 
@@ -174,7 +174,7 @@ Apache CXF -- WS-SecurityPolicy
 ]]></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();
-ctx.put(&quot;ws-security.encryption.properties&quot;, properties);
+ctx.put(&quot;security.encryption.properties&quot;, properties);
 port.echoString(&quot;hello&quot;);
 ]]></script>
 </div></div></div>



Mime
View raw message