Interface Saml2XmlTokenAuthnContextMapper

  • All Known Implementing Classes:
    DefaultSaml2XmlTokenAuthnContextMapper

    public interface Saml2XmlTokenAuthnContextMapper
    Defines the functionality which maps a TokenType to a SAML2 AuthnContext value (see section 2.7.2.2 of http://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf for details). This AuthnContext will be sent to the TokenGenerationService for inclusion in the AuthnStatement of the issued assertion. It specifies the manner in which the subject was authenticated. In the context of token transformation, the validated input token will determine the AuthnContext specified in the TokenGenerationService invocation. This interface defines the contract for this mapping.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getAuthnContext​(List<org.apache.wss4j.dom.handler.WSHandlerResult> securityPolicyBindingTraversalYield)
      Returns the SAML2 AuthnContext class reference corresponding the the SupportingToken specified in the SecurityPolicy bindings protecting a soap-sts instance.
      String getAuthnContextForDelegatedToken​(List<org.apache.wss4j.dom.handler.WSHandlerResult> securityPolicyBindingTraversalYield, org.apache.cxf.sts.request.ReceivedToken delegatedToken)
      Returns the SAML2 AuthnContext class reference for delegated tokens (specified as part of the ActAs/OnBehalfOf element in the RequestSecurityToken).
    • Method Detail

      • getAuthnContext

        String getAuthnContext​(List<org.apache.wss4j.dom.handler.WSHandlerResult> securityPolicyBindingTraversalYield)
        Returns the SAML2 AuthnContext class reference corresponding the the SupportingToken specified in the SecurityPolicy bindings protecting a soap-sts instance.
        Parameters:
        securityPolicyBindingTraversalYield - The yield of SecurityPolicy binding verification, as generated by apache wss4j. See the DefaultSaml2XmlTokenAuthnContextMapper for details on how to parse the classes corresponding to this processing.
        Returns:
        A valid AuthnContext value, as defined here: http://docs.oasis-open.org/security/saml/v2.0/saml-authn-context-2.0-os.pdf
      • getAuthnContextForDelegatedToken

        String getAuthnContextForDelegatedToken​(List<org.apache.wss4j.dom.handler.WSHandlerResult> securityPolicyBindingTraversalYield,
                                                org.apache.cxf.sts.request.ReceivedToken delegatedToken)
        Returns the SAML2 AuthnContext class reference for delegated tokens (specified as part of the ActAs/OnBehalfOf element in the RequestSecurityToken). The List<WSHandlerResult> which is the yield of the SecurityPolicy binding traversal, is only provided as additional context, as the manner in which the delegated token was secured may well have bearing on the type of AuthnContext class ref chosen, though it is not examined for the default implementation.
        Parameters:
        securityPolicyBindingTraversalYield - The yield of SecurityPolicy binding verification, as generated by apache wss4j. See the DefaultSaml2XmlTokenAuthnContextMapper for details on how to parse the classes corresponding to this processing.
        delegatedToken - The token provided as part of the ActAs/OnBehalfOf element specified in the RequestSecurityToken.
        Returns:
        A valid AuthnContext value, as defined here: http://docs.oasis-open.org/security/saml/v2.0/saml-authn-context-2.0-os.pdf