You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2019/01/03 17:10:00 UTC
[jira] [Commented] (CXF-7935) SAML SubjectConfirmation validation
in PolicyBasedWSS4JInInterceptor
[ https://issues.apache.org/jira/browse/CXF-7935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733233#comment-16733233 ]
Colm O hEigeartaigh commented on CXF-7935:
------------------------------------------
There is an existing configuration tag for the WS-SecurityPolicy case - SecurityConstants.VALIDATE_SAML_SUBJECT_CONFIRMATION("security.validate.saml.subject.conf"), which is translated into the WSS4J configuration tag for WSS4J processing. Unfortunately it isn't applied in the validator as you pointed out. I'll fix this...
> SAML SubjectConfirmation validation in PolicyBasedWSS4JInInterceptor
> --------------------------------------------------------------------
>
> Key: CXF-7935
> URL: https://issues.apache.org/jira/browse/CXF-7935
> Project: CXF
> Issue Type: Bug
> Components: Configuration, WS-* Components
> Affects Versions: 3.2.7
> Reporter: Tomas Vanhala
> Priority: Major
>
> WSS4J enforces the SubjectConfirmation requirements of an inbound SAML Token. For sender-vouches, a signature must be present that covers both the SOAP Body and the SAML Assertion. As explained here [http://coheigea.blogspot.com/2014/01/apache-wss4j-200-part-ii.html,] the configuration tag defined as ConfigurationConstants.VALIDATE_SAML_SUBJECT_CONFIRMATION ("validateSamlSubjectConfirmation") allows the user to switch off this validation if required.
> We need to switch off the validation, in order to process non-TLS requests where only the SAML assertion is signed.
> Unfortunately, it turns out that SubjectConfirmation validation cannot be switched off when using PolicyBasedWSS4JInInterceptor. It uses SamlTokenPolicyValidator, containing the following code:
>
> {code:java}
> if (!DOMSAMLUtil.checkSenderVouches(assertionWrapper, tlsCerts, parameters.getSoapBody(), parameters.getSignedResults())) {
> ai.setNotAsserted("Assertion fails sender-vouches requirements");
> continue;
> }
> {code}
> This is different from WSS4JInInterceptor, which through WSSecurityEngine uses the following code:
> {code:java}
> if (requestData.isValidateSamlSubjectConfirmation()) {
> Element bodyElement = callbackLookupToUse.getSOAPBody();
> DOMSAMLUtil.validateSAMLResults(handlerResult, requestData.getTlsCerts(), bodyElement);
> }
> {code}
> Please add similar handling of the VALIDATE_SAML_SUBJECT_CONFIRMATION configuration tag into PolicyBasedWSS4JInInterceptor.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)