Class DefaultSaml2XmlTokenAuthnContextMapper
- java.lang.Object
-
- org.forgerock.openam.sts.soap.token.provider.saml2.DefaultSaml2XmlTokenAuthnContextMapper
-
- All Implemented Interfaces:
Saml2XmlTokenAuthnContextMapper
public class DefaultSaml2XmlTokenAuthnContextMapper extends Object implements Saml2XmlTokenAuthnContextMapper
-
-
Constructor Summary
Constructors Constructor Description DefaultSaml2XmlTokenAuthnContextMapper(org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandoesBitmapMatch(int bitmap, int potentialMatch)StringgetAuthnContext(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.StringgetAuthnContextForDelegatedToken(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).protected org.apache.wss4j.dom.engine.WSSecurityEngineResultgetOpenAMSessionTokenResult(List<org.apache.wss4j.dom.engine.WSSecurityEngineResult> securityEngineResults)protected org.apache.wss4j.dom.engine.WSSecurityEngineResultgetUsernameTokenResult(List<org.apache.wss4j.dom.engine.WSSecurityEngineResult> securityEngineResults)protected StringgetWSHandlerResultsDebug(List<org.apache.wss4j.dom.handler.WSHandlerResult> handlerResults)protected org.apache.wss4j.dom.engine.WSSecurityEngineResultgetX509TokenResult(List<org.apache.wss4j.dom.engine.WSSecurityEngineResult> securityEngineResults)protected booleanisActionTagForBinarySecurityToken(int actionTag)protected booleanisActionTagForSignature(int actionTag)protected booleanisOpenAMSessionToken(org.apache.wss4j.dom.engine.WSSecurityEngineResult securityEngineResult)protected booleanisUsernameToken(org.apache.wss4j.dom.engine.WSSecurityEngineResult securityEngineResult)protected StringpeformSaml2AuthNContextClassReferenceMapping(TokenTypeId tokenTypeId, org.apache.wss4j.dom.engine.WSSecurityEngineResult securityEngineResult)protected StringpeformSaml2AuthNContextClassReferenceMappingForDelegatedToken(TokenTypeId tokenTypeId)
-
-
-
Method Detail
-
getAuthnContext
public String getAuthnContext(List<org.apache.wss4j.dom.handler.WSHandlerResult> securityPolicyBindingTraversalYield)
Description copied from interface:Saml2XmlTokenAuthnContextMapperReturns the SAML2 AuthnContext class reference corresponding the the SupportingToken specified in the SecurityPolicy bindings protecting a soap-sts instance.- Specified by:
getAuthnContextin interfaceSaml2XmlTokenAuthnContextMapper- 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:Saml2XmlTokenAuthnContextMapperReturns the SAML2 AuthnContext class reference for delegated tokens (specified as part of the ActAs/OnBehalfOf element in the RequestSecurityToken). TheList<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:
getAuthnContextForDelegatedTokenin interfaceSaml2XmlTokenAuthnContextMapper- 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)
-
-