You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2021/12/22 21:03:41 UTC

svn commit: r1077671 [25/44] - in /websites/production/cxf/content: ./ cache/ docs/ docs/custom-transport.data/ docs/how-it-works.data/ docs/ws-policy.data/ docs/xml-key-management-service-xkms.data/

Modified: websites/production/cxf/content/docs/jax-rs-token-authorization.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-token-authorization.html (original)
+++ websites/production/cxf/content/docs/jax-rs-token-authorization.html Wed Dec 22 21:03:39 2021
@@ -58,11 +58,7 @@ Apache CXF -- JAX-RS Token Authorization
     <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>
+<div class="banner" id="banner"><img class="wysiwyg-unknown-macro" src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&amp;locale=en_GB&amp;version=2"></div>
       <!-- Banner -->
       <div id="top-menu">
         <table border="0" cellpadding="1" cellspacing="0" width="100%">
@@ -99,15 +95,7 @@ Apache CXF -- JAX-RS Token Authorization
                 <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 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p>&#160;</p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
+<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><p><img class="wysiwyg-unknown-macro" src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&amp;locale=en_GB&amp;version=2"></p><hr><ul class="alternate"><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.5.x/">API 3.5.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.2.x/">API 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p><br clear="none"></p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-exte
 rnal-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
                     <!-- NavigationBar -->
                   </div>
               </div>
@@ -121,24 +109,24 @@ Apache CXF -- JAX-RS Token Authorization
 
 
 <br clear="none"></p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1537289834919 {padding: 0px;}
-div.rbtoc1537289834919 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1537289834919 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style></p><div class="toc-macro rbtoc1537289834919">
-<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSTokenAuthorization-Introduction">Introduction</a></li><li><a shape="rect" href="#JAX-RSTokenAuthorization-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</a></li><li><a shape="rect" href="#JAX-RSTokenAuthorization-Mavendependencies">Maven dependencies</a></li><li><a shape="rect" href="#JAX-RSTokenAuthorization-Claimsbasedaccesscontrol">Claims based access control</a>
-<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSTokenAuthorization-Claimsannotations">Claims annotations</a></li><li><a shape="rect" href="#JAX-RSTokenAuthorization-EnforcingClaimsauthorization">Enforcing Claims authorization</a></li></ul>
-</li><li><a shape="rect" href="#JAX-RSTokenAuthorization-Rolebasedaccesscontrol">Role based access control</a>
-<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSTokenAuthorization-SimpleAuthorizingInterceptor">SimpleAuthorizingInterceptor</a></li><li><a shape="rect" href="#JAX-RSTokenAuthorization-Usingannotations">Using annotations</a></li></ul>
+div.rbtoc1640206697622 {padding: 0px;}
+div.rbtoc1640206697622 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1640206697622 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1640206697622">
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSTokenAuthorization-Introduction">Introduction</a></li><li><a shape="rect" href="#JAXRSTokenAuthorization-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</a></li><li><a shape="rect" href="#JAXRSTokenAuthorization-Mavendependencies">Maven dependencies</a></li><li><a shape="rect" href="#JAXRSTokenAuthorization-Claimsbasedaccesscontrol">Claims based access control</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSTokenAuthorization-Claimsannotations">Claims annotations</a></li><li><a shape="rect" href="#JAXRSTokenAuthorization-EnforcingClaimsauthorization">Enforcing Claims authorization</a></li></ul>
+</li><li><a shape="rect" href="#JAXRSTokenAuthorization-Rolebasedaccesscontrol">Role based access control</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSTokenAuthorization-SimpleAuthorizingInterceptor">SimpleAuthorizingInterceptor</a></li><li><a shape="rect" href="#JAXRSTokenAuthorization-Usingannotations">Using annotations</a></li></ul>
 </li></ul>
-</div><h1 id="JAX-RSTokenAuthorization-Introduction">Introduction</h1><p>CXF JAX-RS offers an extension letting users to enforce a new fine-grained Claims Based Access Control (CBAC) based on <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/security/claims/authorization/Claim.java" rel="nofollow">Claim</a> and <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/security/claims/authorization/Claims.java" rel="nofollow">Claims</a> annotations as well as <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/security/claims/authorization/ClaimMode.java" rel="nofollow">ClaimMode</a> enum class. It works with SAML tokens and with JWT tokens (from the 3.3.0 release onwards).</p><p>See also <a shape="rect" href="jax-rs-xml-security.html">JAX-RS XML Security</a>, <a shape="rect" href="jax-r
 s-saml.html">JAX-RS SAML</a> and <a shape="rect" href="jax-rs-jose.html">JAX-RS JOSE</a>.</p><h1 id="JAX-RSTokenAuthorization-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</h1><p>From Apache CXF 3.1.0, the WS-Security based configuration tags used to configure XML Signature or Encryption ("ws-security-*") have been changed to just start with "security-". Apart from this they are exactly the same. Older "ws-security-" values continue to be accepted in CXF 3.1.0. To use any of the configuration examples in this page with an older version of CXF, simply add a "ws-" prefix to the configuration tag.</p><p>The package for Claim, Claims and ClaimMode annotations has changed from "org.apache.cxf.rs.security.saml.authorization" to "org.apache.cxf.security.claims.authorization". Starting from CXF 2.7.1, the default name format for claims is "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified" instead of "<a shape="rect" class="external-link" href="ht
 tp://schemas.xmlsoap.org/ws/2005/05/identity/claims" rel="nofollow">http://schemas.xmlsoap.org/ws/2005/05/identity/claims</a>".</p><p>From the 3.3.0 release, the Claims access control annotations/interceptors <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CXF-6727">now work</a> with JWT tokens (as well as SAML tokens). This resulted in the following package changes:</p><ul><li>ClaimsAuthorizingInterceptor has moved from the cxf-rt-security-saml module to the cxf-rt-security module. The package name of the ClaimsAuthorizingInterceptor has changed: from org.apache.cxf.rt.security.saml.interceptor.ClaimsAuthorizingInterceptor to org.apache.cxf.rt.security.claims.interceptor.ClaimsAuthorizingInterceptor.</li><li>ClaimsAuthorizingFilter has moved from the cxf-rt-rs-security-xml module to the cxf-rt-frontend-jaxrs module. The package name of the ClaimsAuthorizingFilter&#160; has changed: from org.apache.cxf.rs.security.saml.authorization.ClaimsAuthorizin
 gFilter to&#160;org.apache.cxf.jaxrs.security.ClaimsAuthorizingFilter</li></ul><h1 id="JAX-RSTokenAuthorization-Mavendependencies">Maven dependencies</h1><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div><h1 id="JAXRSTokenAuthorization-Introduction">Introduction</h1><p>CXF JAX-RS offers an extension letting users to enforce a new fine-grained Claims Based Access Control (CBAC) based on <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/security/claims/authorization/Claim.java" rel="nofollow">Claim</a> and <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/security/claims/authorization/Claims.java" rel="nofollow">Claims</a> annotations as well as <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/security/claims/authorization/ClaimMode.java" rel="nofollow">ClaimMode</a> enum class. It works with SAML tokens and with JWT tokens (from the 3.3.0 release onwards).</p><p>See also <a shape="rect" href="jax-rs-xml-security.html">JAX-RS XML Security</a>, <a shape="rect" href="jax-rs
 -saml.html">JAX-RS SAML</a> and <a shape="rect" href="jax-rs-jose.html">JAX-RS JOSE</a>.</p><h1 id="JAXRSTokenAuthorization-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</h1><p>From Apache CXF 3.1.0, the WS-Security based configuration tags used to configure XML Signature or Encryption ("ws-security-*") have been changed to just start with "security-". Apart from this they are exactly the same. Older "ws-security-" values continue to be accepted in CXF 3.1.0. To use any of the configuration examples in this page with an older version of CXF, simply add a "ws-" prefix to the configuration tag.</p><p>The package for Claim, Claims and ClaimMode annotations has changed from "org.apache.cxf.rs.security.saml.authorization" to "org.apache.cxf.security.claims.authorization". Starting from CXF 2.7.1, the default name format for claims is "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified" instead of "<a shape="rect" class="external-link" href="http
 ://schemas.xmlsoap.org/ws/2005/05/identity/claims" rel="nofollow">http://schemas.xmlsoap.org/ws/2005/05/identity/claims</a>".</p><p>From the 3.3.0 release, the Claims access control annotations/interceptors <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/CXF-6727">now work</a> with JWT tokens (as well as SAML tokens). This resulted in the following package changes:</p><ul><li>ClaimsAuthorizingInterceptor has moved from the cxf-rt-security-saml module to the cxf-rt-security module. The package name of the ClaimsAuthorizingInterceptor has changed: from org.apache.cxf.rt.security.saml.interceptor.ClaimsAuthorizingInterceptor to org.apache.cxf.rt.security.claims.interceptor.ClaimsAuthorizingInterceptor.</li><li>ClaimsAuthorizingFilter has moved from the cxf-rt-rs-security-xml module to the cxf-rt-frontend-jaxrs module. The package name of the ClaimsAuthorizingFilter&#160; has changed: from org.apache.cxf.rs.security.saml.authorization.ClaimsAuthorizingF
 ilter to&#160;org.apache.cxf.jaxrs.security.ClaimsAuthorizingFilter</li></ul><h1 id="JAXRSTokenAuthorization-Mavendependencies">Maven dependencies</h1><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;dependency&gt;
   &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
   &lt;artifactId&gt;cxf-rt-security&lt;/artifactId&gt;
   &lt;version&gt;3.3.0&lt;/version&gt;
 &lt;/dependency&gt;
 </pre>
-</div></div><p>In addition, cxf-rt-rs-security-xml is required if you are working with SAML tokens, and cxf-rt-rs-security-jose-jaxrs is required if you are working with JWT tokens.</p><h1 id="JAX-RSTokenAuthorization-Claimsbasedaccesscontrol">Claims based access control</h1><h2 id="JAX-RSTokenAuthorization-Claimsannotations">Claims annotations</h2><p>Here is a simple code fragment to secure a service object using Claims annotations:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>In addition, cxf-rt-rs-security-xml is required if you are working with SAML tokens, and cxf-rt-rs-security-jose-jaxrs is required if you are working with JWT tokens.</p><h1 id="JAXRSTokenAuthorization-Claimsbasedaccesscontrol">Claims based access control</h1><h2 id="JAXRSTokenAuthorization-Claimsannotations">Claims annotations</h2><p>Here is a simple code fragment to secure a service object using Claims annotations:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">import org.apache.cxf.security.claims.authorization.Claim;
 import org.apache.cxf.security.claims.authorization.Claims;
 
@@ -228,7 +216,7 @@ public class SecureClaimBookStore {
 </div></div><p>In the above example, getBookList() can be invoked if Subject has a Claim with the value "user"; addBook() has it overridden - "admin" is expected and the authentication format Claim too; getBook() can be invoked if Subject has a Claim with the value "user" and it also must have the authentication format Claim with the value "password" - or no such Claim at all.</p><p>org.apache.cxf.rt.security.claims.interceptor.ClaimsAuthorizingInterceptor ("org.apache.cxf.rt.security.saml.interceptor.ClaimsAuthorizingInterceptor" before CXF 3.3.0) enforces the CBAC rules. This filter can be overridden and configured with the rules directly which can be useful if no Claim-related annotations are expected in the code. Map nameAliases and formatAliases properties are supported to make @Claim annotations look a bit simpler, for example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">@Claim(name = "auth-format", format = "authentication", value = {"password" })
 </pre>
-</div></div><p>where "auth-format" and "authentication" are aliases for "http://claims/authentication-format" and "http://claims/authentication" respectively.</p><h2 id="JAX-RSTokenAuthorization-EnforcingClaimsauthorization">Enforcing Claims authorization</h2><p>Simply adding Claims annotations are per the examples above is not sufficient to enforce claims based authorization.</p><p>First we need to configure the appropriate interceptors/filters to authenticate the type of token we are interested in extracting claims from. See the <a shape="rect" href="jax-rs-saml.html">JAX-RS SAML</a> page for information on how to configure SAML, and the <a shape="rect" href="jax-rs-jose.html">JAX-RS JOSE</a> page for information on how to configure JWT.</p><p>For both SAML and JWT, once the incoming token is validated, a <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/security/src/main/java/org/apache/cxf/rt/security/claims/ClaimsSecurityContext.java" rel=
 "nofollow">ClaimsSecurityContext</a> security context will be created containing the claims contained in the token, as well as the authenticated subject and role (claims).</p><p>To enforce claims authorization, a <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/security/src/main/java/org/apache/cxf/rt/security/claims/interceptor/ClaimsAuthorizingInterceptor.java" rel="nofollow">ClaimsAuthorizingInterceptor</a> must be set as an "inInterceptor", passing it a reference to the secured object. There is also a JAX-RS filter wrapper around ClaimsAuthorizingInterceptor available, which is called <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/ClaimsAuthorizingFilter.java" rel="nofollow">ClaimsAuthorizingFilter</a>.</p><p>An instance of org.apache.cxf.rs.security.saml.authorization.ClaimsAuthorizingFilter (note org.apache.cxf.rs.security.claims.ClaimsAu
 thorizingFilter from CXF 3.3.0) is used to enforce CBAC. It's a simple JAX-RS filter wrapper around ClaimsAuthorizingInterceptor.</p><p>Here is an example of enforcing Claims authorization against a JWT token. BookStoreAuthn is the service object which is annotated with Claims annotations. The ClaimsAuthorizingFilter is added as a JAX-RS provider to the endpoint, wrapping the serviceBean. A JwtAuthenticationFilter instance is also added to validate the received JWT token and to set up the ClaimsSecurityContext. The <a shape="rect" class="external-link" href="http://rs.security.signature.in" rel="nofollow">rs.security.signature.in</a>.properties property is used to verify the signature on the received token.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>where "auth-format" and "authentication" are aliases for "http://claims/authentication-format" and "http://claims/authentication" respectively.</p><h2 id="JAXRSTokenAuthorization-EnforcingClaimsauthorization">Enforcing Claims authorization</h2><p>Simply adding Claims annotations are per the examples above is not sufficient to enforce claims based authorization.</p><p>First we need to configure the appropriate interceptors/filters to authenticate the type of token we are interested in extracting claims from. See the <a shape="rect" href="jax-rs-saml.html">JAX-RS SAML</a> page for information on how to configure SAML, and the <a shape="rect" href="jax-rs-jose.html">JAX-RS JOSE</a> page for information on how to configure JWT.</p><p>For both SAML and JWT, once the incoming token is validated, a <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/security/src/main/java/org/apache/cxf/rt/security/claims/ClaimsSecurityContext.java" rel="
 nofollow">ClaimsSecurityContext</a> security context will be created containing the claims contained in the token, as well as the authenticated subject and role (claims).</p><p>To enforce claims authorization, a <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/security/src/main/java/org/apache/cxf/rt/security/claims/interceptor/ClaimsAuthorizingInterceptor.java" rel="nofollow">ClaimsAuthorizingInterceptor</a> must be set as an "inInterceptor", passing it a reference to the secured object. There is also a JAX-RS filter wrapper around ClaimsAuthorizingInterceptor available, which is called <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/ClaimsAuthorizingFilter.java" rel="nofollow">ClaimsAuthorizingFilter</a>.</p><p>An instance of org.apache.cxf.rs.security.saml.authorization.ClaimsAuthorizingFilter (note org.apache.cxf.rs.security.claims.ClaimsAut
 horizingFilter from CXF 3.3.0) is used to enforce CBAC. It's a simple JAX-RS filter wrapper around ClaimsAuthorizingInterceptor.</p><p>Here is an example of enforcing Claims authorization against a JWT token. BookStoreAuthn is the service object which is annotated with Claims annotations. The ClaimsAuthorizingFilter is added as a JAX-RS provider to the endpoint, wrapping the serviceBean. A JwtAuthenticationFilter instance is also added to validate the received JWT token and to set up the ClaimsSecurityContext. The <a shape="rect" class="external-link" href="http://rs.security.signature.in" rel="nofollow">rs.security.signature.in</a>.properties property is used to verify the signature on the received token.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;bean id="serviceBean" class="org.apache.cxf.systest.jaxrs.security.jose.jwt.BookStoreAuthn"/&gt;
 
 &lt;bean id="claimsHandler" class="org.apache.cxf.jaxrs.security.ClaimsAuthorizingFilter"&gt;
@@ -252,7 +240,7 @@ public class SecureClaimBookStore {
                    value="org/apache/cxf/systest/jaxrs/security/bob.jwk.properties"/&gt;
         &lt;/jaxrs:properties&gt;
 &lt;/jaxrs:server&gt;</pre>
-</div></div><h1 id="JAX-RSTokenAuthorization-Rolebasedaccesscontrol">Role based access control</h1><p>If we have a SAML Assertion or JWT token with claims that are known to represent roles, then making those claims work with an RBAC system can be achieved easily.</p><h2 id="JAX-RSTokenAuthorization-SimpleAuthorizingInterceptor">SimpleAuthorizingInterceptor</h2><p>One option is to enforce that only users in a given role can access a method in the service bean is to use CXF's SimpleAuthorizingInterceptor. It has a "methodRolesMap" property can maps method names to roles. This interceptor must then be added to the inInterceptor chain of the service endpoint. For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h1 id="JAXRSTokenAuthorization-Rolebasedaccesscontrol">Role based access control</h1><p>If we have a SAML Assertion or JWT token with claims that are known to represent roles, then making those claims work with an RBAC system can be achieved easily.</p><h2 id="JAXRSTokenAuthorization-SimpleAuthorizingInterceptor">SimpleAuthorizingInterceptor</h2><p>One option is to enforce that only users in a given role can access a method in the service bean is to use CXF's SimpleAuthorizingInterceptor. It has a "methodRolesMap" property can maps method names to roles. This interceptor must then be added to the inInterceptor chain of the service endpoint. For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;bean id="serviceBean" class="org.apache.cxf.systest.jaxrs.security.jose.jwt.BookStoreAuthn"/&gt;
 
 &lt;bean id="jwtAuthzFilter" class="org.apache.cxf.rs.security.jose.jaxrs.JwtAuthenticationFilter"&gt;
@@ -284,7 +272,7 @@ public class SecureClaimBookStore {
                    value="org/apache/cxf/systest/jaxrs/security/bob.jwk.properties"/&gt;
         &lt;/jaxrs:properties&gt;
 &lt;/jaxrs:server&gt;</pre>
-</div></div><h2 id="JAX-RSTokenAuthorization-Usingannotations">Using annotations</h2><p>Instead of mapping method names to roles using the SimpleAuthorizingInterceptor, we can instead annotate them in the service bean with javax.annotation.security.RolesAllowed or org.springframework.security.annotation.Secured annotations. For example:</p><div class="table-wrap"><table class="wrapped confluenceTable"><colgroup span="1"><col span="1"></colgroup><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code class="java keyword">import</code> <code class="java plain"><a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.springframework.security.annotation.Secured;">org.springframework.security.annotation.Secured;</a></code><br clear="none">&#160;<br clear="none"><code class="java color1">@Path</code><code class="java plain">(</code><code class="java string">"/bookstore"</code><code class="java plain">)</code><br clear="none"><code class="java keyword">pu
 blic</code> <code class="java keyword">class</code> <code class="java plain">SecureBookStore {</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code>&#160;<br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java color1">@POST</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java color1">@Secured</code><code class="java plain">(</code><code class="java string">"admin"</code><code class="java plain">)</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java keyword">public</code> <code class="java plain">Book addBook(Book book) {</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java keyword">return</code> <code class="java plain">book;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">}</code><br clear="none"><code class
 ="java plain">}</code></p></td></tr></tbody></table></div><p>where @Secured can be replaced with @RoledAllowed if needed, the following configuration will do it:</p><div class="table-wrap"><table class="wrapped confluenceTable"><colgroup span="1"><col span="1"></colgroup><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code class="java plain">&lt;bean id=</code><code class="java string">"serviceBeanRoles"</code> <code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.systest.jaxrs.security.saml.SecureBookStore">org.apache.cxf.systest.jaxrs.security.saml.SecureBookStore</a>"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java plain">&lt;bean id=</code><code class="java string">"samlEnvHandler"</code> <code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect"
  href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.rs.security.saml.SamlEnvelopedInHandler">org.apache.cxf.rs.security.saml.SamlEnvelopedInHandler</a>"</code><code class="java plain">&gt;</code><br clear="none"><code class="java spaces">&#160;</code><code class="java plain">&lt;property name=</code><code class="java string">"securityContextProvider"</code><code class="java plain">&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;bean </code><code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.systest.jaxrs.security.saml.CustomSecurityContextProvider">org.apache.cxf.systest.jaxrs.security.saml.CustomSecurityContextProvider</a>"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;</code><code class="java plain">&lt;/property&
 gt;</code><br clear="none"><code class="java plain">&lt;/bean&gt;</code><br clear="none">&#160;<br clear="none"><code class="java plain">&lt;bean id=</code><code class="java string">"authorizationInterceptor"</code> <code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.interceptor.security.SecureAnnotationsInterceptor">org.apache.cxf.interceptor.security.SecureAnnotationsInterceptor</a>"</code><code class="java plain">&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;property name=</code><code class="java string">"securedObject"</code> <code class="java plain">ref=</code><code class="java string">"serviceBean"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;property name=</code><code class="
 java string">"annotationClassName"</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">value=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.springframework.security.annotation.Secured">org.springframework.security.annotation.Secured</a>"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java plain">&lt;/bean&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code>&#160;<br clear="none"><code class="java plain">&lt;bean id=</code><code class="java string">"rolesHandler"</code> <code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.jaxrs.security.SimpleAuthorizingFilter">org.apache.cxf.jaxrs.security.SimpleAuthorizingFilter</a>
 "</code><code class="java plain">&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;property name=</code><code class="java string">"interceptor"</code> <code class="java plain">ref=</code><code class="java string">"authorizationInterceptor"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java plain">&lt;/bean&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code>&#160;<br clear="none"><code class="java plain">&lt;jaxrs:server address=</code><code class="java string">"/saml-roles"</code><code class="java plain">&gt; </code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;jaxrs:serviceBeans&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;ref bean=</code><code class="java string">"serviceBeanRoles"</code><code class="java plain">/&gt;</code><br clear="none"><
 code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;/jaxrs:serviceBeans&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;jaxrs:providers&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;ref bean=</code><code class="java string">"samlEnvHandler"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;ref bean=</code><code class="java string">"rolesHandler"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;/jaxrs:providers&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code>&#160;<br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;!-- If </code><code class="java keyword">default</code> <code class=
 "java plain">role qualifier and format are not supported: </code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code>&#160;<br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;jaxrs:properties&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;entry key=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.saml.claims.role.nameformat">org.apache.cxf.saml.claims.role.nameformat</a>"</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">value=</code><code class="java string">"urn:oasis:names:tc:SAML:<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/2.0:attrname-format:uri">2.0:attrname-format:uri</a>"</code><code class="java pl
 ain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;entry key=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.saml.claims.role.qualifier">org.apache.cxf.saml.claims.role.qualifier</a>"</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">value=</code><code class="java string">"urn:oid:<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/1.3.6.1.4.1.5923.1.1.1.1">1.3.6.1.4.1.5923.1.1.1.1</a>"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;/jaxrs:properties&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">--&gt;</code><br clear="none"><code class="java plain">&l
 t;/jaxrs:server&gt;</code></p></td></tr></tbody></table></div><p>That is all what is needed. Note that in order to help the default SAML SecurityContextProvider figure out which claims are roles, one can set the two properties as shown above - this not needed if it's known that claims identifying roles have NameFormat and Name values with the default values, which are "<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/ws/2005/05/identity/claims" rel="nofollow">http://schemas.xmlsoap.org/ws/2005/05/identity/claims</a>" and "<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>" respectively at the moment.</p><p>Note that you can have RBAC and CBAC combined for a more sophisticated access control rules be enforced while still keeping the existing code relying on @RolesAllowed or @Secured intact. Override ClaimsAuthorizingFilter and config
 ure it with the Claims rules directly and register it alongside SimpleAuthorizingFilter and here you go.</p><p>Also note how SecureAnnotationsInterceptor can handle different types of role annotations, with @RolesAllowed being supported by default.</p></div>
+</div></div><h2 id="JAXRSTokenAuthorization-Usingannotations">Using annotations</h2><p>Instead of mapping method names to roles using the SimpleAuthorizingInterceptor, we can instead annotate them in the service bean with javax.annotation.security.RolesAllowed or org.springframework.security.annotation.Secured annotations. For example:</p><div class="table-wrap"><table class="wrapped confluenceTable"><colgroup span="1"><col span="1"></colgroup><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code class="java keyword">import</code> <code class="java plain"><a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.springframework.security.annotation.Secured;">org.springframework.security.annotation.Secured;</a></code><br clear="none">&#160;<br clear="none"><code class="java color1">@Path</code><code class="java plain">(</code><code class="java string">"/bookstore"</code><code class="java plain">)</code><br clear="none"><code class="java keyword">pub
 lic</code> <code class="java keyword">class</code> <code class="java plain">SecureBookStore {</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code>&#160;<br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java color1">@POST</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java color1">@Secured</code><code class="java plain">(</code><code class="java string">"admin"</code><code class="java plain">)</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java keyword">public</code> <code class="java plain">Book addBook(Book book) {</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java keyword">return</code> <code class="java plain">book;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">}</code><br clear="none"><code class=
 "java plain">}</code></p></td></tr></tbody></table></div><p>where @Secured can be replaced with @RoledAllowed if needed, the following configuration will do it:</p><div class="table-wrap"><table class="wrapped confluenceTable"><colgroup span="1"><col span="1"></colgroup><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code class="java plain">&lt;bean id=</code><code class="java string">"serviceBeanRoles"</code> <code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.systest.jaxrs.security.saml.SecureBookStore">org.apache.cxf.systest.jaxrs.security.saml.SecureBookStore</a>"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java plain">&lt;bean id=</code><code class="java string">"samlEnvHandler"</code> <code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" 
 href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.rs.security.saml.SamlEnvelopedInHandler">org.apache.cxf.rs.security.saml.SamlEnvelopedInHandler</a>"</code><code class="java plain">&gt;</code><br clear="none"><code class="java spaces">&#160;</code><code class="java plain">&lt;property name=</code><code class="java string">"securityContextProvider"</code><code class="java plain">&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;bean </code><code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.systest.jaxrs.security.saml.CustomSecurityContextProvider">org.apache.cxf.systest.jaxrs.security.saml.CustomSecurityContextProvider</a>"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;</code><code class="java plain">&lt;/property&g
 t;</code><br clear="none"><code class="java plain">&lt;/bean&gt;</code><br clear="none">&#160;<br clear="none"><code class="java plain">&lt;bean id=</code><code class="java string">"authorizationInterceptor"</code> <code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.interceptor.security.SecureAnnotationsInterceptor">org.apache.cxf.interceptor.security.SecureAnnotationsInterceptor</a>"</code><code class="java plain">&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;property name=</code><code class="java string">"securedObject"</code> <code class="java plain">ref=</code><code class="java string">"serviceBean"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;property name=</code><code class="j
 ava string">"annotationClassName"</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">value=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.springframework.security.annotation.Secured">org.springframework.security.annotation.Secured</a>"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java plain">&lt;/bean&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code>&#160;<br clear="none"><code class="java plain">&lt;bean id=</code><code class="java string">"rolesHandler"</code> <code class="java keyword">class</code><code class="java plain">=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.jaxrs.security.SimpleAuthorizingFilter">org.apache.cxf.jaxrs.security.SimpleAuthorizingFilter</a>"
 </code><code class="java plain">&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;property name=</code><code class="java string">"interceptor"</code> <code class="java plain">ref=</code><code class="java string">"authorizationInterceptor"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java plain">&lt;/bean&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;</code>&#160;<br clear="none"><code class="java plain">&lt;jaxrs:server address=</code><code class="java string">"/saml-roles"</code><code class="java plain">&gt; </code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;jaxrs:serviceBeans&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;ref bean=</code><code class="java string">"serviceBeanRoles"</code><code class="java plain">/&gt;</code><br clear="none"><c
 ode class="java spaces">&#160;&#160;</code><code class="java plain">&lt;/jaxrs:serviceBeans&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;jaxrs:providers&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;ref bean=</code><code class="java string">"samlEnvHandler"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;ref bean=</code><code class="java string">"rolesHandler"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;/jaxrs:providers&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code>&#160;<br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;!-- If </code><code class="java keyword">default</code> <code class="
 java plain">role qualifier and format are not supported: </code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code>&#160;<br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;jaxrs:properties&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;entry key=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.saml.claims.role.nameformat">org.apache.cxf.saml.claims.role.nameformat</a>"</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">value=</code><code class="java string">"urn:oasis:names:tc:SAML:<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/2.0:attrname-format:uri">2.0:attrname-format:uri</a>"</code><code class="java pla
 in">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">&lt;entry key=</code><code class="java string">"<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/org.apache.cxf.saml.claims.role.qualifier">org.apache.cxf.saml.claims.role.qualifier</a>"</code><br clear="none"><code class="java spaces">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</code><code class="java plain">value=</code><code class="java string">"urn:oid:<a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/1.3.6.1.4.1.5923.1.1.1.1">1.3.6.1.4.1.5923.1.1.1.1</a>"</code><code class="java plain">/&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">&lt;/jaxrs:properties&gt;</code><br clear="none"><code class="java spaces">&#160;&#160;</code><code class="java plain">--&gt;</code><br clear="none"><code class="java plain">&lt
 ;/jaxrs:server&gt;</code></p></td></tr></tbody></table></div><p>That is all what is needed. Note that in order to help the default SAML SecurityContextProvider figure out which claims are roles, one can set the two properties as shown above - this not needed if it's known that claims identifying roles have NameFormat and Name values with the default values, which are "<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/ws/2005/05/identity/claims" rel="nofollow">http://schemas.xmlsoap.org/ws/2005/05/identity/claims</a>" and "<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>" respectively at the moment.</p><p>Note that you can have RBAC and CBAC combined for a more sophisticated access control rules be enforced while still keeping the existing code relying on @RolesAllowed or @Secured intact. Override ClaimsAuthorizingFilter and configu
 re it with the Claims rules directly and register it alongside SimpleAuthorizingFilter and here you go.</p><p>Also note how SecureAnnotationsInterceptor can handle different types of role annotations, with @RolesAllowed being supported by default.</p></div>
            </div>
            <!-- Content -->
          </td>

Modified: websites/production/cxf/content/docs/jax-rs-validation.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-validation.html (original)
+++ websites/production/cxf/content/docs/jax-rs-validation.html Wed Dec 22 21:03:39 2021
@@ -48,11 +48,7 @@ Apache CXF -- JAX-RS Validation
     <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>
+<div class="banner" id="banner"><img class="wysiwyg-unknown-macro" src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&amp;locale=en_GB&amp;version=2"></div>
       <!-- Banner -->
       <div id="top-menu">
         <table border="0" cellpadding="1" cellspacing="0" width="100%">
@@ -89,15 +85,7 @@ Apache CXF -- JAX-RS Validation
                 <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 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p>&#160;</p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
+<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><p><img class="wysiwyg-unknown-macro" src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&amp;locale=en_GB&amp;version=2"></p><hr><ul class="alternate"><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.5.x/">API 3.5.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.2.x/">API 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p><br clear="none"></p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-exte
 rnal-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
                     <!-- NavigationBar -->
                   </div>
               </div>
@@ -107,13 +95,13 @@ Apache CXF -- JAX-RS Validation
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><h1 id="JAX-RSValidation-JAX-RSBeanValidation">JAX-RS Bean Validation</h1><p>&#160;</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1524513423050 {padding: 0px;}
-div.rbtoc1524513423050 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1524513423050 li {margin-left: 0px;padding-left: 0px;}
+<div id="ConfluenceContent"><h1 id="JAXRSValidation-JAX-RSBeanValidation">JAX-RS Bean Validation</h1><p>&#160;</p><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1640206861525 {padding: 0px;}
+div.rbtoc1640206861525 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1640206861525 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1524513423050">
-<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSValidation-JAX-RSBeanValidation">JAX-RS Bean Validation</a></li></ul>
+/*]]>*/</style></p><div class="toc-macro rbtoc1640206861525">
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSValidation-JAX-RSBeanValidation">JAX-RS Bean Validation</a></li></ul>
 </div></div>
            </div>
            <!-- Content -->

Modified: websites/production/cxf/content/docs/jax-rs-xml-security.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-xml-security.html (original)
+++ websites/production/cxf/content/docs/jax-rs-xml-security.html Wed Dec 22 21:03:39 2021
@@ -58,11 +58,7 @@ Apache CXF -- JAX-RS XML Security
     <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>
+<div class="banner" id="banner"><img class="wysiwyg-unknown-macro" src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&amp;locale=en_GB&amp;version=2"></div>
       <!-- Banner -->
       <div id="top-menu">
         <table border="0" cellpadding="1" cellspacing="0" width="100%">
@@ -99,15 +95,7 @@ Apache CXF -- JAX-RS XML Security
                 <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 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p>&#160;</p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
+<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><p><img class="wysiwyg-unknown-macro" src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&amp;locale=en_GB&amp;version=2"></p><hr><ul class="alternate"><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.5.x/">API 3.5.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.2.x/">API 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p><br clear="none"></p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-exte
 rnal-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
                     <!-- NavigationBar -->
                   </div>
               </div>
@@ -121,24 +109,24 @@ Apache CXF -- JAX-RS XML Security
 
 
 <br clear="none"></p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1553637436591 {padding: 0px;}
-div.rbtoc1553637436591 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1553637436591 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style></p><div class="toc-macro rbtoc1553637436591">
-<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSXMLSecurity-Introduction">Introduction</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-Mavendependencies">Maven dependencies</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-XMLSignature">XML Signature</a>
-<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSXMLSecurity-Envelopedsignatures">Enveloped signatures</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-Envelopingsignatures">Enveloping signatures</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-Detachedsignatures">Detached signatures</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-Customizingthesignature">Customizing the signature</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-SignatureKeyInfoValidation">Signature Key Info Validation</a></li></ul>
-</li><li><a shape="rect" href="#JAX-RSXMLSecurity-XMLEncryption">XML Encryption</a>
-<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSXMLSecurity-Usingtherequestsignaturecertificatesfortheencryption">Using the request signature certificates for the encryption</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-Customizingtheencryption">Customizing the encryption</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-GCMAlgorithmandBouncyCastleprovider">GCM Algorithm and BouncyCastle provider</a></li></ul>
-</li><li><a shape="rect" href="#JAX-RSXMLSecurity-Restrictingencryptionandsignaturealgorithms">Restricting encryption and signature algorithms</a></li><li><a shape="rect" href="#JAX-RSXMLSecurity-Interoperability">Interoperability</a></li></ul>
-</div><h1 id="JAX-RSXMLSecurity-Introduction">Introduction</h1><p>CXF 2.5.0 introduces an initial support for securing JAX-RS clients and endpoints with <a shape="rect" class="external-link" href="http://www.w3.org/TR/xmldsig-core/" rel="nofollow">XML Signature</a> and <a shape="rect" class="external-link" href="http://www.w3.org/TR/xmlenc-core/" rel="nofollow">XML Encryption</a>. <br clear="none">This is a work in progress and the enhancements will be applied regularly. Support for the alternative signature and encryption technologies will also be provided in due time.</p><h1 id="JAX-RSXMLSecurity-Mavendependencies">Maven dependencies</h1><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+div.rbtoc1640206829685 {padding: 0px;}
+div.rbtoc1640206829685 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1640206829685 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1640206829685">
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSXMLSecurity-Introduction">Introduction</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-Mavendependencies">Maven dependencies</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-XMLSignature">XML Signature</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSXMLSecurity-Envelopedsignatures">Enveloped signatures</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-Envelopingsignatures">Enveloping signatures</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-Detachedsignatures">Detached signatures</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-Customizingthesignature">Customizing the signature</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-SignatureKeyInfoValidation">Signature Key Info Validation</a></li></ul>
+</li><li><a shape="rect" href="#JAXRSXMLSecurity-XMLEncryption">XML Encryption</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSXMLSecurity-Usingtherequestsignaturecertificatesfortheencryption">Using the request signature certificates for the encryption</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-Customizingtheencryption">Customizing the encryption</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-GCMAlgorithmandBouncyCastleprovider">GCM Algorithm and BouncyCastle provider</a></li></ul>
+</li><li><a shape="rect" href="#JAXRSXMLSecurity-Restrictingencryptionandsignaturealgorithms">Restricting encryption and signature algorithms</a></li><li><a shape="rect" href="#JAXRSXMLSecurity-Interoperability">Interoperability</a></li></ul>
+</div><h1 id="JAXRSXMLSecurity-Introduction">Introduction</h1><p>CXF 2.5.0 introduces an initial support for securing JAX-RS clients and endpoints with <a shape="rect" class="external-link" href="http://www.w3.org/TR/xmldsig-core/" rel="nofollow">XML Signature</a> and <a shape="rect" class="external-link" href="http://www.w3.org/TR/xmlenc-core/" rel="nofollow">XML Encryption</a>. <br clear="none">This is a work in progress and the enhancements will be applied regularly. Support for the alternative signature and encryption technologies will also be provided in due time.</p><h1 id="JAXRSXMLSecurity-Mavendependencies">Maven dependencies</h1><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;dependency&gt;
   &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
   &lt;artifactId&gt;cxf-rt-rs-security-xml&lt;/artifactId&gt;
   &lt;version&gt;2.5.2&lt;/version&gt;
 &lt;/dependency&gt;
 </pre>
-</div></div><h1 id="JAX-RSXMLSecurity-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</h1><p>From Apache CXF 3.1.0, the WS-Security based configuration tags used to configure XML Signature or Encryption ("ws-security-*") have been changed to just start with "security-". Apart from this they are exactly the same. Older "ws-security-" values continue to be accepted in CXF 3.1.0. To use any of the configuration examples in this page with an older version of CXF, simply add a "ws-" prefix to the configuration tag.</p><h1 id="JAX-RSXMLSecurity-XMLSignature">XML Signature</h1><p><a shape="rect" class="external-link" href="http://www.w3.org/TR/xmldsig-core/" rel="nofollow">XML Signature</a> defines 3 types of signatures: enveloped, enveloping and detached. All the three types are supported by CXF JAX-RS.</p><p><strong>New</strong> Starting from CXF 2.5.2 it is also possible to add XML Signatures on the server side and get them validated on the client sid
 e.</p><h2 id="JAX-RSXMLSecurity-Envelopedsignatures">Enveloped signatures</h2><p>Payload:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h1 id="JAXRSXMLSecurity-Backwardscompatibilityconfigurationnote">Backwards compatibility configuration note</h1><p>From Apache CXF 3.1.0, the WS-Security based configuration tags used to configure XML Signature or Encryption ("ws-security-*") have been changed to just start with "security-". Apart from this they are exactly the same. Older "ws-security-" values continue to be accepted in CXF 3.1.0. To use any of the configuration examples in this page with an older version of CXF, simply add a "ws-" prefix to the configuration tag.</p><h1 id="JAXRSXMLSecurity-XMLSignature">XML Signature</h1><p><a shape="rect" class="external-link" href="http://www.w3.org/TR/xmldsig-core/" rel="nofollow">XML Signature</a> defines 3 types of signatures: enveloped, enveloping and detached. All the three types are supported by CXF JAX-RS.</p><p><strong>New</strong> Starting from CXF 2.5.2 it is also possible to add XML Signatures on the server side and get them validated on the client side.
 </p><h2 id="JAXRSXMLSecurity-Envelopedsignatures">Enveloped signatures</h2><p>Payload:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;Book ID="4bd59819-7b78-47a5-bb61-cc08348e9d48"&gt;
    &lt;id&gt;126&lt;/id&gt;
    &lt;name&gt;CXF&lt;/name&gt;
@@ -245,7 +233,7 @@ bean.setBus(bus);
 WebClient wc = bean.createWebClient();
 Book book = wc.post(new Book("CXF", 126L), Book.class);
 </pre>
-</div></div><p>Spring configuration can also be used.<br clear="none">Please also check <a shape="rect" href="secure-jax-rs-services.html">Secure JAX-RS Services</a> on how HTTPS can be configured from Spring.</p><h2 id="JAX-RSXMLSecurity-Envelopingsignatures">Enveloping signatures</h2><p>Payload:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Spring configuration can also be used.<br clear="none">Please also check <a shape="rect" href="secure-jax-rs-services.html">Secure JAX-RS Services</a> on how HTTPS can be configured from Spring.</p><h2 id="JAXRSXMLSecurity-Envelopingsignatures">Enveloping signatures</h2><p>Payload:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"&gt;
    &lt;ds:SignedInfo&gt;
       &lt;ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/&gt;
@@ -285,7 +273,7 @@ XmlSigOutInterceptor sigInterceptor = ne
 sigInterceptor.setStyle("enveloping");
 
 </pre>
-</div></div><h2 id="JAX-RSXMLSecurity-Detachedsignatures">Detached signatures</h2><p>Payload:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h2 id="JAXRSXMLSecurity-Detachedsignatures">Detached signatures</h2><p>Payload:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;env:Envelope xmlns:env="http://org.apache.cxf/rs/env"&gt;
 
   &lt;Book ID="e9836bc2-cb5a-453f-b967-a9ddbaf9a6de"&gt;
@@ -342,7 +330,7 @@ XmlSigOutInterceptor sigInterceptor = ne
 sigInterceptor.setStyle("detached");
 
 </pre>
-</div></div><h2 id="JAX-RSXMLSecurity-Customizingthesignature">Customizing the signature</h2><p>org.apache.cxf.rs.security.xml.XmlSigOutInterceptor manages the creation of the signature on the client side.<br clear="none">The following properties can be set on it at the moment:</p><p>"style": possible values are "enveloped" (default), "enveloping" and "detached"<br clear="none">"envelopedName": only used with the "detached" style, default is "{<a shape="rect" class="external-link" rel="nofollow" href="http://org.apache.cxf/rs/env">http://org.apache.cxf/rs/env</a>}Envelope"<br clear="none">"signatureAlgorithm": default is "http://www.w3.org/2000/09/xmldsig#rsa-sha1"<br clear="none">"digestAlgorithm": default is "http://www.w3.org/2000/09/xmldsig#sha1"</p><h2 id="JAX-RSXMLSecurity-SignatureKeyInfoValidation">Signature Key Info Validation</h2><p>By default ds:Signature is expected to contain ds:KeyInfo element.</p><p>Setting a "keyInfoMustBeAvailable" property to false on the out inter
 ceptors will lead to KeyInfo not included.</p><p>If the same property is set to false on the in interceptors then either an authenticated Principal name or a default store alias will be used to load the certificate for validating the signature.</p><h1 id="JAX-RSXMLSecurity-XMLEncryption">XML Encryption</h1><p>Encrypting XML payloads makes it possible to drop a requirement for HTTPS.</p><p>Here is a payload example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h2 id="JAXRSXMLSecurity-Customizingthesignature">Customizing the signature</h2><p>org.apache.cxf.rs.security.xml.XmlSigOutInterceptor manages the creation of the signature on the client side.<br clear="none">The following properties can be set on it at the moment:</p><p>"style": possible values are "enveloped" (default), "enveloping" and "detached"<br clear="none">"envelopedName": only used with the "detached" style, default is "{<a shape="rect" class="external-link" rel="nofollow" href="http://org.apache.cxf/rs/env">http://org.apache.cxf/rs/env</a>}Envelope"<br clear="none">"signatureAlgorithm": default is "http://www.w3.org/2000/09/xmldsig#rsa-sha1"<br clear="none">"digestAlgorithm": default is "http://www.w3.org/2000/09/xmldsig#sha1"</p><h2 id="JAXRSXMLSecurity-SignatureKeyInfoValidation">Signature Key Info Validation</h2><p>By default ds:Signature is expected to contain ds:KeyInfo element.</p><p>Setting a "keyInfoMustBeAvailable" property to false on the out interce
 ptors will lead to KeyInfo not included.</p><p>If the same property is set to false on the in interceptors then either an authenticated Principal name or a default store alias will be used to load the certificate for validating the signature.</p><h1 id="JAXRSXMLSecurity-XMLEncryption">XML Encryption</h1><p>Encrypting XML payloads makes it possible to drop a requirement for HTTPS.</p><p>Here is a payload example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"&gt;
   &lt;xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/&gt;
   &lt;ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"&gt;
@@ -465,7 +453,7 @@ bean.getInInterceptors().add(encInInterc
 XmlSigInInterceptor sigInInterceptor = new XmlSigInInterceptor();
 bean.getInInterceptors().add(sigInInterceptor);
 </pre>
-</div></div><h2 id="JAX-RSXMLSecurity-Usingtherequestsignaturecertificatesfortheencryption">Using the request signature certificates for the encryption</h2><p><strong>From CXF 2.6.1 and 2.5.4:</strong></p><p>When multiple clients are posting the encrypted and signed payloads, the following configuration will lead to the request signature certificates being utilized for encrypting the symmetric key used to encrypt the response:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h2 id="JAXRSXMLSecurity-Usingtherequestsignaturecertificatesfortheencryption">Using the request signature certificates for the encryption</h2><p><strong>From CXF 2.6.1 and 2.5.4:</strong></p><p>When multiple clients are posting the encrypted and signed payloads, the following configuration will lead to the request signature certificates being utilized for encrypting the symmetric key used to encrypt the response:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">&lt;!-- server --&gt;
 &lt;jaxrs:server&gt;
 &lt;jaxrs:properties&gt;
@@ -492,7 +480,7 @@ bean.getInInterceptors().add(sigInInterc
     &lt;/jaxrs:properties&gt;
 &lt;/jaxrs:client&gt;
 </pre>
-</div></div><p>The "security.encryption.username" server property is set to "useReqSigCert".</p><p>Note that the client configuration assumes Alice (with its alice.properties) represents a given client, Bob (with its bob.properties) - the receiver/server.</p><p>On the server side the encryption properties point to alice.properties and signature.properties to bob.properties. This is because the outbound signature needs to be done with the Bob's certificate and the encryption - with either the specific Alice's certificate or the certificate from the inbound signature. Note that the in encryption handler will check the signature properties first - this will ensure that the Bob's certificate used to encrypt the data on the client side can be validated, similarly for the in signature handler.</p><h2 id="JAX-RSXMLSecurity-Customizingtheencryption">Customizing the encryption</h2><p>org.apache.cxf.rs.security.xml.XmlEncOutInterceptor manages the encryption process.<br clear="none">The follo
 wing properties can be set on it at the moment:<br clear="none">"symmetricEncAlgorithm": default is "http://www.w3.org/2001/04/xmlenc#aes256-cbc", complete URIs or short identifiers are supported, for example, "aes128-cbc" or "http://www.w3.org/2001/04/xmlenc#aes256-cbc". <br clear="none">"digestAlgorithm": optional, example "http://www.w3.org/2001/04/xmlenc#sha256" can be set.<br clear="none">"keyEncAlgorithm": default is "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"<br clear="none">"keyIdentifierType": default is "X509_KEY", "X509_ISSUER_SERIAL" is also supported - useful when the whole x509Certificate should not be embedded</p><h2 id="JAX-RSXMLSecurity-GCMAlgorithmandBouncyCastleprovider">GCM Algorithm and BouncyCastle provider</h2><p>Please see Colm's <a shape="rect" class="external-link" href="http://coheigea.blogspot.com/2012/04/note-on-cve-2011-1096.html" rel="nofollow">blog</a> for the information about the possible attack against XML Encryption and the GCM algorithm whi
 ch needs to be used in order to prevent it.</p><h1 id="JAX-RSXMLSecurity-Restrictingencryptionandsignaturealgorithms">Restricting encryption and signature algorithms</h1><p><strong>From CXF 2.6.1 and 2.5.4:</strong></p><p>It is possible to configure the in encryption and signature handlers with the properties restricting the encryption and signature algorithms that clients can use, for example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>The "security.encryption.username" server property is set to "useReqSigCert".</p><p>Note that the client configuration assumes Alice (with its alice.properties) represents a given client, Bob (with its bob.properties) - the receiver/server.</p><p>On the server side the encryption properties point to alice.properties and signature.properties to bob.properties. This is because the outbound signature needs to be done with the Bob's certificate and the encryption - with either the specific Alice's certificate or the certificate from the inbound signature. Note that the in encryption handler will check the signature properties first - this will ensure that the Bob's certificate used to encrypt the data on the client side can be validated, similarly for the in signature handler.</p><h2 id="JAXRSXMLSecurity-Customizingtheencryption">Customizing the encryption</h2><p>org.apache.cxf.rs.security.xml.XmlEncOutInterceptor manages the encryption process.<br clear="none">The follow
 ing properties can be set on it at the moment:<br clear="none">"symmetricEncAlgorithm": default is "http://www.w3.org/2001/04/xmlenc#aes256-cbc", complete URIs or short identifiers are supported, for example, "aes128-cbc" or "http://www.w3.org/2001/04/xmlenc#aes256-cbc". <br clear="none">"digestAlgorithm": optional, example "http://www.w3.org/2001/04/xmlenc#sha256" can be set.<br clear="none">"keyEncAlgorithm": default is "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"<br clear="none">"keyIdentifierType": default is "X509_KEY", "X509_ISSUER_SERIAL" is also supported - useful when the whole x509Certificate should not be embedded</p><h2 id="JAXRSXMLSecurity-GCMAlgorithmandBouncyCastleprovider">GCM Algorithm and BouncyCastle provider</h2><p>Please see Colm's <a shape="rect" class="external-link" href="http://coheigea.blogspot.com/2012/04/note-on-cve-2011-1096.html" rel="nofollow">blog</a> for the information about the possible attack against XML Encryption and the GCM algorithm which
  needs to be used in order to prevent it.</p><h1 id="JAXRSXMLSecurity-Restrictingencryptionandsignaturealgorithms">Restricting encryption and signature algorithms</h1><p><strong>From CXF 2.6.1 and 2.5.4:</strong></p><p>It is possible to configure the in encryption and signature handlers with the properties restricting the encryption and signature algorithms that clients can use, for example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default">    &lt;bean id="sigProps" class="org.apache.cxf.rs.security.xml.SignatureProperties"&gt;
        &lt;property name="signatureAlgo" 
                  value="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/&gt;
@@ -528,7 +516,7 @@ bean.getInInterceptors().add(sigInInterc
         &lt;property name="encryptionProperties" ref="encProps"/&gt;
     &lt;/bean&gt;
 </pre>
-</div></div><p>Getting the same SignatureProperties and EncryptionProperties beans (with "sigProps" and "encProps" ids) registered with the outbound handlers will ensure that the algorithms used by the current client have not only been validated on the inbound side but also used on the outbound side for encrypting and signing the data.</p><p>Note that from CXF 2.7.1, 2.6.4 and 2.5.7, the XmlEncInHandler will require that the RSA-OAEP algorithm be used as the key transport encryption algorithm by default. As this algorithm is used by default by the XmlEncOutInterceptor, no action is required unless you are specifying a different algorithm on the outbound side. In this case, an EncryptionProperties object will need to be configured on XmlEncInHandler with the desired key transport algorithm.</p><h1 id="JAX-RSXMLSecurity-Interoperability">Interoperability</h1><p>The payloads containing the enveloping XML Signatures are structured according to the XML Signature specification and as such
  can be consumed by any XML Signature aware consumers capable of handling the enveloping signatures and extracting the signed payload.</p><p>Same applies to enveloped signatures, for example, a signed SAML assertion always contains an enveloped signature.</p><p>The way CXF creates detached XML Signatures is experimental, so at the moment CXF will be required on both ends for the detached signatures be created and validated.</p><p>The current XML Encryption support is in line with the specification and thus the capable non-CXF consumers will be able to decrypt the payloads.</p></div>
+</div></div><p>Getting the same SignatureProperties and EncryptionProperties beans (with "sigProps" and "encProps" ids) registered with the outbound handlers will ensure that the algorithms used by the current client have not only been validated on the inbound side but also used on the outbound side for encrypting and signing the data.</p><p>Note that from CXF 2.7.1, 2.6.4 and 2.5.7, the XmlEncInHandler will require that the RSA-OAEP algorithm be used as the key transport encryption algorithm by default. As this algorithm is used by default by the XmlEncOutInterceptor, no action is required unless you are specifying a different algorithm on the outbound side. In this case, an EncryptionProperties object will need to be configured on XmlEncInHandler with the desired key transport algorithm.</p><h1 id="JAXRSXMLSecurity-Interoperability">Interoperability</h1><p>The payloads containing the enveloping XML Signatures are structured according to the XML Signature specification and as such 
 can be consumed by any XML Signature aware consumers capable of handling the enveloping signatures and extracting the signed payload.</p><p>Same applies to enveloped signatures, for example, a signed SAML assertion always contains an enveloped signature.</p><p>The way CXF creates detached XML Signatures is experimental, so at the moment CXF will be required on both ends for the detached signatures be created and validated.</p><p>The current XML Encryption support is in line with the specification and thus the capable non-CXF consumers will be able to decrypt the payloads.</p></div>
            </div>
            <!-- Content -->
          </td>