Class DefaultSaml2XmlTokenAuthnContextMapper

    • Constructor Detail

      • DefaultSaml2XmlTokenAuthnContextMapper

        @Inject
        public DefaultSaml2XmlTokenAuthnContextMapper​(org.slf4j.Logger logger)
    • Method Detail

      • getAuthnContext

        public String getAuthnContext​(List<org.apache.wss4j.dom.handler.WSHandlerResult> securityPolicyBindingTraversalYield)
        Description copied from interface: Saml2XmlTokenAuthnContextMapper
        Returns the SAML2 AuthnContext class reference corresponding the the SupportingToken specified in the SecurityPolicy bindings protecting a soap-sts instance.
        Specified by:
        getAuthnContext in interface Saml2XmlTokenAuthnContextMapper
        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

        public String getAuthnContextForDelegatedToken​(List<org.apache.wss4j.dom.handler.WSHandlerResult> securityPolicyBindingTraversalYield,
                                                       org.apache.cxf.sts.request.ReceivedToken delegatedToken)
        Description copied from interface: Saml2XmlTokenAuthnContextMapper
        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.
        Specified by:
        getAuthnContextForDelegatedToken in interface Saml2XmlTokenAuthnContextMapper
        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
      • getUsernameTokenResult

        protected org.apache.wss4j.dom.engine.WSSecurityEngineResult getUsernameTokenResult​(List<org.apache.wss4j.dom.engine.WSSecurityEngineResult> securityEngineResults)
        Parameters:
        securityEngineResults - the results of SecurityPolicy binding enforcement generated by wss4j
        Returns:
        the WSSecurityEngineResult corresponding to a Username SupportingToken - null if no such token was presented.
      • isUsernameToken

        protected boolean isUsernameToken​(org.apache.wss4j.dom.engine.WSSecurityEngineResult securityEngineResult)
      • getOpenAMSessionTokenResult

        protected org.apache.wss4j.dom.engine.WSSecurityEngineResult getOpenAMSessionTokenResult​(List<org.apache.wss4j.dom.engine.WSSecurityEngineResult> securityEngineResults)
        Parameters:
        securityEngineResults - the results of SecurityPolicy binding enforcement generated by wss4j
        Returns:
        the WSSecurityEngineResult corresponding to a OpenAM Session SupportingToken - null if no such token was presented.
      • isOpenAMSessionToken

        protected boolean isOpenAMSessionToken​(org.apache.wss4j.dom.engine.WSSecurityEngineResult securityEngineResult)
      • isActionTagForBinarySecurityToken

        protected boolean isActionTagForBinarySecurityToken​(int actionTag)
      • getX509TokenResult

        protected org.apache.wss4j.dom.engine.WSSecurityEngineResult getX509TokenResult​(List<org.apache.wss4j.dom.engine.WSSecurityEngineResult> securityEngineResults)
      • isActionTagForSignature

        protected boolean isActionTagForSignature​(int actionTag)
      • doesBitmapMatch

        protected boolean doesBitmapMatch​(int bitmap,
                                          int potentialMatch)
      • peformSaml2AuthNContextClassReferenceMapping

        protected String peformSaml2AuthNContextClassReferenceMapping​(TokenTypeId tokenTypeId,
                                                                      org.apache.wss4j.dom.engine.WSSecurityEngineResult securityEngineResult)
      • peformSaml2AuthNContextClassReferenceMappingForDelegatedToken

        protected String peformSaml2AuthNContextClassReferenceMappingForDelegatedToken​(TokenTypeId tokenTypeId)
      • getWSHandlerResultsDebug

        protected String getWSHandlerResultsDebug​(List<org.apache.wss4j.dom.handler.WSHandlerResult> handlerResults)