edu.internet2.middleware.shibboleth.idp.profile.saml2
Class SAML2ECPProfileHandler

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.profile.provider.AbstractRequestURIMappedProfileHandler<HTTPInTransport,HTTPOutTransport>
      extended by edu.internet2.middleware.shibboleth.common.profile.provider.AbstractShibbolethProfileHandler<SAMLMDRelyingPartyConfigurationManager,Session>
          extended by edu.internet2.middleware.shibboleth.idp.profile.AbstractSAMLProfileHandler
              extended by edu.internet2.middleware.shibboleth.idp.profile.saml2.AbstractSAML2ProfileHandler
                  extended by edu.internet2.middleware.shibboleth.idp.profile.saml2.SSOProfileHandler
                      extended by edu.internet2.middleware.shibboleth.idp.profile.saml2.SAML2ECPProfileHandler
All Implemented Interfaces:
ProfileHandler<HTTPInTransport,HTTPOutTransport>

public class SAML2ECPProfileHandler
extends SSOProfileHandler

SAML 2.0 ECP request profile handler.


Nested Class Summary
protected  class SAML2ECPProfileHandler.ECPRequestContext
          In case we ever add something to the base context
 
Nested classes/interfaces inherited from class edu.internet2.middleware.shibboleth.idp.profile.saml2.SSOProfileHandler
SSOProfileHandler.SSORequestContext
 
Nested classes/interfaces inherited from class edu.internet2.middleware.shibboleth.idp.profile.saml2.AbstractSAML2ProfileHandler
AbstractSAML2ProfileHandler.SAML2AuditLogEntry
 
Field Summary
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<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  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 static String soapFaultResponseMessage
           
 
Fields inherited from class edu.internet2.middleware.shibboleth.idp.profile.saml2.AbstractSAML2ProfileHandler
SAML_VERSION
 
Constructor Summary
SAML2ECPProfileHandler()
          Constructor.
 
Method Summary
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 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.
 void processRequest(HTTPInTransport inTransport, HTTPOutTransport outTransport)
          
 void setAuthnContextClassRef(String ref)
          Sets the AuthnContext class reference.
 
Methods inherited from class edu.internet2.middleware.shibboleth.idp.profile.saml2.SSOProfileHandler
buildNameId, buildRequestContext, buildSubjectLocality, checkNameIDPolicy, completeAuthenticationRequest, decodeRequest, deserializeRequest, getRequiredNameIDFormat, performAuthentication, populateAssertingPartyInformation, populateRelyingPartyInformation, postProcessAssertion, postProcessResponse, selectEndpoint
 
Methods inherited from class edu.internet2.middleware.shibboleth.idp.profile.saml2.AbstractSAML2ProfileHandler
buildAssertion, buildAttributeStatement, buildConditions, buildEntityIssuer, buildErrorResponse, buildResponse, buildStatus, buildSubject, buildSubjectConfirmation, checkSamlVersion, getEncrypter, getKeyEncryptionCredential, isEncryptAssertion, isEncryptNameID, isRequestRequiresEncryptNameID, isSignAssertion, populateRequestContext, populateStatusResponse, populateUserInformation, resolveAttributes, resolvePrincipal, signAssertion, writeAuditLogEntry
 
Methods inherited from class edu.internet2.middleware.shibboleth.idp.profile.AbstractSAMLProfileHandler
encodeResponse, filterNameIDAttributesByFormats, filterNameIDAttributesByProtocol, getAduitLog, getEntitySupportedFormats, getIdGenerator, getInboundBinding, getMessageDecoders, getMessageEncoders, getMetadataCredentialResolver, getMetadataProvider, getRelyingPartyConfiguration, getSecurityPolicyResolver, getSupportedNameFormats, getSupportedOutboundBindings, getUserSession, getUserSession, isSignResponse, populateProfileInformation, selectNameIDAttributeAndEncoder, selectNameIDAttributeAndEncoder, setIdGenerator, setInboundBinding, setMessageDecoders, setMessageEncoders, setSecurityPolicyResolver, setSupportedOutboundBindings
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.profile.provider.AbstractShibbolethProfileHandler
getBuilderFactory, getParserPool, getProfileConfiguration, getRelyingPartyConfigurationManager, getSessionManager, getStorageService, setParserPool, setRelyingPartyConfigurationManager, setSessionManager, setStorageService
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.profile.provider.AbstractRequestURIMappedProfileHandler
getRequestPaths, setRequestPaths
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final org.slf4j.Logger log
Class logger.


authnContextClassRef

private String authnContextClassRef
A context class reference to insert into the assertion.


ecpResponseBuilder

private SAMLObjectBuilder<Response> ecpResponseBuilder
Builder of ECP Response object.


authnContextBuilder

private SAMLObjectBuilder<AuthnContext> authnContextBuilder
Builder of AuthnContext objects.


authnContextClassRefBuilder

private SAMLObjectBuilder<AuthnContextClassRef> authnContextClassRefBuilder
Builder of AuthnContextClassRef objects.


inboundPreSecurityHandlerChainResolver

private StaticHandlerChainResolver inboundPreSecurityHandlerChainResolver
Static pre-security inbound handler chain resolver.


inboundPostSecurityHandlerChainResolver

private StaticHandlerChainResolver inboundPostSecurityHandlerChainResolver
Static post-security inbound handler chain resolver.


outboundHandlerChainResolver

private StaticHandlerChainResolver outboundHandlerChainResolver
Static outbound handler chain resolver.


messageEncoder

private SAMLMessageEncoder messageEncoder
SOAP message encoder to use.


messageDecoder

private SAMLMessageDecoder messageDecoder
SOAP message decoder to use.


soapFaultResponseMessage

private static String soapFaultResponseMessage
Constructor Detail

SAML2ECPProfileHandler

public SAML2ECPProfileHandler()
Constructor.

Method Detail

initialize

public void initialize()
Initialize the profile handler.


getProfileId

public String getProfileId()

Overrides:
getProfileId in class SSOProfileHandler

setAuthnContextClassRef

public void setAuthnContextClassRef(String ref)
Sets the AuthnContext class reference.

Parameters:
ref - AuthnContext class reference to set

getAuthnContextClassRef

public String getAuthnContextClassRef()
Gets the AuthnContext class reference.

Returns:
AuthnContext class reference

processRequest

public void processRequest(HTTPInTransport inTransport,
                           HTTPOutTransport outTransport)
                    throws ProfileException

Specified by:
processRequest in interface ProfileHandler<HTTPInTransport,HTTPOutTransport>
Overrides:
processRequest in class SSOProfileHandler
Throws:
ProfileException

decodeRequest

protected void decodeRequest(SAML2ECPProfileHandler.ECPRequestContext requestContext,
                             HTTPInTransport inTransport,
                             HTTPOutTransport outTransport)
                      throws ProfileException
Decodes an incoming request and stores the information in a created request context.

Parameters:
inTransport - inbound transport
outTransport - outbound transport
requestContext - request context to which decoded information should be added
Throws:
ProfileException - thrown if the incoming message failed decoding

buildRequestContext

protected SAML2ECPProfileHandler.ECPRequestContext buildRequestContext(HTTPInTransport in,
                                                                       HTTPOutTransport out)
                                                                throws ProfileException
Creates an authentication request context from the current environmental information.

Parameters:
in - inbound transport
out - outbount transport
Returns:
created authentication request context
Throws:
ProfileException - thrown if there is a problem creating the context

populateSAMLMessageInformation

protected void populateSAMLMessageInformation(BaseSAMLProfileRequestContext requestContext)
                                       throws ProfileException
Populates the request context with information from the inbound SAML message. This method requires the the following request context properties to be populated: login context This methods populates the following request context properties: inbound saml message, relay state, inbound saml message ID, subject name identifier

Overrides:
populateSAMLMessageInformation in class SSOProfileHandler
Parameters:
requestContext - current request context
Throws:
ProfileException - thrown if the inbound SAML message or subject identifier is null

buildAuthnStatement

protected AuthnStatement buildAuthnStatement(SSOProfileHandler.SSORequestContext requestContext)
Creates an authentication statement for the current request.

Overrides:
buildAuthnStatement in class SSOProfileHandler
Parameters:
requestContext - current request context
Returns:
constructed authentication statement

buildAuthnContext

protected AuthnContext buildAuthnContext(SSOProfileHandler.SSORequestContext requestContext)
Creates an AuthnContext for a successful authentication request.

Overrides:
buildAuthnContext in class SSOProfileHandler
Parameters:
requestContext - current request
Returns:
the built authn context

buildPreSecurityInboundHandlerChain

protected HandlerChain buildPreSecurityInboundHandlerChain()
Build the pre-security inbound handler chain.

Returns:
the handler chain

buildPostSecurityInboundHandlerChain

protected HandlerChain buildPostSecurityInboundHandlerChain()
Build the post-security inbound handler chain.

Returns:
the handler chain

getPreSecurityInboundHandlerChainResolver

protected HandlerChainResolver getPreSecurityInboundHandlerChainResolver()
Get the resolver used to resolve the pre-security inbound handler chain.

Returns:
the handler chain resolver

getPostSecurityInboundHandlerChainResolver

protected HandlerChainResolver getPostSecurityInboundHandlerChainResolver()
Get the resolver used to resolve the post-security inbound handler chain.

Returns:
the handler chain resolver

buildOutboundHandlerChain

protected HandlerChain buildOutboundHandlerChain()
Build the outbound handler chain.

Returns:
the handler chain

getOutboundHandlerChainResolver

protected HandlerChainResolver getOutboundHandlerChainResolver()
Get the resolver used to resolve the outbound handler chain.

Returns:
the handler chain resolver

getOutboundMessageEncoder

protected SAMLMessageEncoder getOutboundMessageEncoder(BaseSAMLProfileRequestContext requestContext)
                                                throws ProfileException
Get the outbound message encoder to use.

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).

Overrides:
getOutboundMessageEncoder in class AbstractSAMLProfileHandler
Parameters:
requestContext - current request context
Returns:
the message encoder to use
Throws:
ProfileException - if the encoder to use can not be resolved based on the request context

getInboundMessageDecoder

protected SAMLMessageDecoder getInboundMessageDecoder(BaseSAMLProfileRequestContext requestContext)
                                               throws ProfileException
Get the inbound message decoder to use.

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.

Overrides:
getInboundMessageDecoder in class AbstractSAMLProfileHandler
Parameters:
requestContext - current request context
Returns:
the message decoder to use
Throws:
ProfileException - if the decoder to use can not be resolved based on the request context


Copyright © 1999-2012. All Rights Reserved.