public class SAML2ECPProfileHandler extends SSOProfileHandler
| Modifier and Type | Class and Description |
|---|---|
protected class |
SAML2ECPProfileHandler.ECPRequestContext
Extended context information specific to ECP requests.
|
SSOProfileHandler.SSORequestContextAbstractSAML2ProfileHandler.SAML2AuditLogEntry| Modifier and Type | Field and Description |
|---|---|
private SAMLObjectBuilder<Advice> |
adviceBuilder
Builder of Advice objects.
|
private SAMLObjectBuilder<AuthnContext> |
authnContextBuilder
Builder of AuthnContext objects.
|
private String |
authnContextClassRef
A context class reference to insert into the assertion.
|
private SAMLObjectBuilder<AuthnContextClassRef> |
authnContextClassRefBuilder
Builder of AuthnContextClassRef objects.
|
private SAMLObjectBuilder<ChannelBindings> |
cbBuilder
Builder of ChannelBindings objects.
|
private SAMLObjectBuilder<Response> |
ecpResponseBuilder
Builder of ECP Response object.
|
private StaticHandlerChainResolver |
inboundPostSecurityHandlerChainResolver
Static post-security inbound handler chain resolver.
|
private StaticHandlerChainResolver |
inboundPreSecurityHandlerChainResolver
Static pre-security inbound handler chain resolver.
|
private SAMLObjectBuilder<GeneratedKey> |
keyBuilder
Builder of GeneratedKey objects.
|
private org.slf4j.Logger |
log
Class logger.
|
private SAMLMessageDecoder |
messageDecoder
SOAP message decoder to use.
|
private SAMLMessageEncoder |
messageEncoder
SOAP message encoder to use.
|
private StaticHandlerChainResolver |
outboundHandlerChainResolver
Static outbound handler chain resolver.
|
private SecureRandom |
prng
A
SecureRandom PRNG to generate session keys. |
private SAMLObjectBuilder<RequestAuthenticated> |
reqAuthnBuilder
Builder of RequestAuthenticated objects.
|
private String |
soapFaultResponseMessage
SOAP fault message.
|
SAML_VERSION| Constructor and Description |
|---|
SAML2ECPProfileHandler()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected AuthnContext |
buildAuthnContext(SSOProfileHandler.SSORequestContext requestContext)
Creates an
AuthnContext for a successful authentication request. |
protected AuthnStatement |
buildAuthnStatement(SSOProfileHandler.SSORequestContext requestContext)
Creates an authentication statement for the current request.
|
protected HandlerChain |
buildOutboundHandlerChain()
Build the outbound handler chain.
|
protected HandlerChain |
buildPostSecurityInboundHandlerChain()
Build the post-security inbound handler chain.
|
protected HandlerChain |
buildPreSecurityInboundHandlerChain()
Build the pre-security inbound handler chain.
|
protected SAML2ECPProfileHandler.ECPRequestContext |
buildRequestContext(HTTPInTransport in,
HTTPOutTransport out)
Creates an authentication request context from the current environmental information.
|
protected void |
checkChannelBindings(SAML2ECPProfileHandler.ECPRequestContext requestContext)
Checks for channel bindings to verify and either fails the request or populates the message context
with the matched information.
|
protected void |
decodeRequest(SAML2ECPProfileHandler.ECPRequestContext requestContext,
HTTPInTransport inTransport,
HTTPOutTransport outTransport)
Decodes an incoming request and stores the information in a created request context.
|
String |
getAuthnContextClassRef()
Gets the AuthnContext class reference.
|
protected SAMLMessageDecoder |
getInboundMessageDecoder(BaseSAMLProfileRequestContext requestContext)
Get the inbound message decoder to use.
|
protected HandlerChainResolver |
getOutboundHandlerChainResolver()
Get the resolver used to resolve the outbound handler chain.
|
protected SAMLMessageEncoder |
getOutboundMessageEncoder(BaseSAMLProfileRequestContext requestContext)
Get the outbound message encoder to use.
|
protected HandlerChainResolver |
getPostSecurityInboundHandlerChainResolver()
Get the resolver used to resolve the post-security inbound handler chain.
|
protected HandlerChainResolver |
getPreSecurityInboundHandlerChainResolver()
Get the resolver used to resolve the pre-security inbound handler chain.
|
String |
getProfileId() |
void |
initialize()
Initialize the profile handler.
|
protected void |
populateSAMLMessageInformation(BaseSAMLProfileRequestContext requestContext)
Populates the request context with information from the inbound SAML message.
|
protected void |
postProcessAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
Assertion assertion)
Extension point for for subclasses to post-process the Assertion before it is signed and encrypted.
|
void |
processRequest(HTTPInTransport inTransport,
HTTPOutTransport outTransport) |
void |
setAuthnContextClassRef(String ref)
Sets the AuthnContext class reference.
|
buildNameId, buildRequestContext, buildSubjectLocality, checkNameIDPolicy, completeAuthenticationRequest, decodeRequest, deserializeRequest, getRequiredNameIDFormat, performAuthentication, populateAssertingPartyInformation, populateRelyingPartyInformation, postProcessResponse, selectEndpointbuildAssertion, buildAttributeStatement, buildConditions, buildEntityIssuer, buildErrorResponse, buildResponse, buildStatus, buildSubject, buildSubjectConfirmation, checkSamlVersion, getEncrypter, getKeyEncryptionCredential, getSessionIndexFromNameID, isEncryptAssertion, isEncryptNameID, isRequestRequiresEncryptNameID, isSignAssertion, populateRequestContext, populateStatusResponse, populateUserInformation, resolveAttributes, resolvePrincipal, signAssertion, writeAuditLogEntryencodeResponse, filterNameIDAttributesByFormats, filterNameIDAttributesByProtocol, getAduitLog, getAuditLog, getEntitySupportedFormats, getIdGenerator, getInboundBinding, getMessageDecoders, getMessageEncoders, getMetadataCredentialResolver, getMetadataProvider, getRelyingPartyConfiguration, getSecurityPolicyResolver, getSupportedNameFormats, getSupportedOutboundBindings, getUserSession, getUserSession, isSignResponse, populateProfileInformation, selectNameIDAttributeAndEncoder, selectNameIDAttributeAndEncoder, setIdGenerator, setInboundBinding, setMessageDecoders, setMessageEncoders, setSecurityPolicyResolver, setSupportedOutboundBindingsgetBuilderFactory, getParserPool, getProfileConfiguration, getRelyingPartyConfigurationManager, getSessionManager, getStorageService, setParserPool, setRelyingPartyConfigurationManager, setSessionManager, setStorageServicegetRequestPaths, setRequestPathsprivate final org.slf4j.Logger log
private final SecureRandom prng
SecureRandom PRNG to generate session keys.private String authnContextClassRef
private SAMLObjectBuilder<Response> ecpResponseBuilder
private SAMLObjectBuilder<RequestAuthenticated> reqAuthnBuilder
private SAMLObjectBuilder<ChannelBindings> cbBuilder
private SAMLObjectBuilder<GeneratedKey> keyBuilder
private SAMLObjectBuilder<Advice> adviceBuilder
private SAMLObjectBuilder<AuthnContext> authnContextBuilder
private SAMLObjectBuilder<AuthnContextClassRef> authnContextClassRefBuilder
private StaticHandlerChainResolver inboundPreSecurityHandlerChainResolver
private StaticHandlerChainResolver inboundPostSecurityHandlerChainResolver
private StaticHandlerChainResolver outboundHandlerChainResolver
private SAMLMessageEncoder messageEncoder
private SAMLMessageDecoder messageDecoder
private final String soapFaultResponseMessage
public void initialize()
public String getProfileId()
getProfileId in class SSOProfileHandlerpublic void setAuthnContextClassRef(String ref)
ref - AuthnContext class reference to setpublic String getAuthnContextClassRef()
public void processRequest(HTTPInTransport inTransport, HTTPOutTransport outTransport) throws ProfileException
processRequest in interface ProfileHandler<HTTPInTransport,HTTPOutTransport>processRequest in class SSOProfileHandlerProfileExceptionprotected void decodeRequest(SAML2ECPProfileHandler.ECPRequestContext requestContext, HTTPInTransport inTransport, HTTPOutTransport outTransport) throws ProfileException
inTransport - inbound transportoutTransport - outbound transportrequestContext - request context to which decoded information should be addedProfileException - thrown if the incoming message failed decodingprotected SAML2ECPProfileHandler.ECPRequestContext buildRequestContext(HTTPInTransport in, HTTPOutTransport out) throws ProfileException
in - inbound transportout - outbount transportProfileException - thrown if there is a problem creating the contextprotected void checkChannelBindings(SAML2ECPProfileHandler.ECPRequestContext requestContext) throws ProfileException
requestContext - current request contextProfileException - if channel bindings are required and don't match or are missingprotected void populateSAMLMessageInformation(BaseSAMLProfileRequestContext requestContext) throws ProfileException
populateSAMLMessageInformation in class SSOProfileHandlerrequestContext - current request contextProfileException - thrown if the inbound SAML message or subject identifier is nullprotected AuthnStatement buildAuthnStatement(SSOProfileHandler.SSORequestContext requestContext)
buildAuthnStatement in class SSOProfileHandlerrequestContext - current request contextprotected AuthnContext buildAuthnContext(SSOProfileHandler.SSORequestContext requestContext)
AuthnContext for a successful authentication request.buildAuthnContext in class SSOProfileHandlerrequestContext - current requestprotected void postProcessAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext, Assertion assertion) throws ProfileException
postProcessAssertion in class SSOProfileHandlerrequestContext - the current request contextassertion - the SAML Assertion being builtProfileException - if there is an error processing the assertionprotected HandlerChain buildPreSecurityInboundHandlerChain()
protected HandlerChain buildPostSecurityInboundHandlerChain()
protected HandlerChainResolver getPreSecurityInboundHandlerChainResolver()
protected HandlerChainResolver getPostSecurityInboundHandlerChainResolver()
protected HandlerChain buildOutboundHandlerChain()
protected HandlerChainResolver getOutboundHandlerChainResolver()
protected SAMLMessageEncoder getOutboundMessageEncoder(BaseSAMLProfileRequestContext requestContext) throws ProfileException
The default implementation uses the binding URI from the
SAMLMessageContext.getPeerEntityEndpoint() to lookup the encoder from the
supported message encoders defined in AbstractSAMLProfileHandler.getMessageEncoders().
Subclasses may override to implement a different mechanism to determine the encoder to use, such as for example cases where an active intermediary actor sits between this provider and the peer entity endpoint (e.g. the SAML 2 ECP case).
getOutboundMessageEncoder in class AbstractSAMLProfileHandlerrequestContext - current request contextProfileException - if the encoder to use can not be resolved based on the request contextprotected SAMLMessageDecoder getInboundMessageDecoder(BaseSAMLProfileRequestContext requestContext) throws ProfileException
The default implementation uses the binding URI from AbstractSAMLProfileHandler.getInboundBinding() to lookup the decoder from the
supported message decoders defined in AbstractSAMLProfileHandler.getMessageDecoders().
Subclasses may override to implement a different mechanism to determine the decoder to use.
getInboundMessageDecoder in class AbstractSAMLProfileHandlerrequestContext - current request contextProfileException - if the decoder to use can not be resolved based on the request contextCopyright © 1999-2014. All Rights Reserved.