|
Spring Security SAML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.saml.context.SAMLContextProviderImpl
public class SAMLContextProviderImpl
Class is responsible for parsing HttpRequest/Response and determining which local entity (IDP/SP) is responsible for it's handling.
Field Summary | |
---|---|
protected KeyManager |
keyManager
|
protected static org.slf4j.Logger |
logger
|
protected MetadataManager |
metadata
|
protected MetadataCredentialResolver |
metadataResolver
|
protected PKIXInformationResolver |
pkixResolver
|
protected SAMLMessageStorageFactory |
storageFactory
|
Constructor Summary | |
---|---|
SAMLContextProviderImpl()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Verifies that required entities were autowired or set and initializes resolvers used to construct trust engines. |
SAMLMessageContext |
getLocalAndPeerEntity(HttpServletRequest request,
HttpServletResponse response)
Creates a SAMLContext with local entity and peer values filled. |
SAMLMessageContext |
getLocalEntity(HttpServletRequest request,
HttpServletResponse response)
Creates a SAMLContext with local entity values filled. |
protected void |
populateDecrypter(SAMLMessageContext samlContext)
Populates a decrypter based on settings in the extended metadata or using a default credential when no encryption credential is specified in the extended metadata. |
protected void |
populateGenericContext(HttpServletRequest request,
HttpServletResponse response,
SAMLMessageContext context)
|
protected void |
populateLocalContext(SAMLMessageContext context)
|
protected void |
populateLocalEntity(SAMLMessageContext samlContext)
Method populates fields localEntityId, localEntityRole, localEntityMetadata, localEntityRoleMetadata and peerEntityRole. |
protected void |
populateLocalEntityId(SAMLMessageContext context,
String requestURI)
Method tries to load localEntityAlias and localEntityRole from the request path. |
protected void |
populatePeerContext(SAMLMessageContext samlContext)
Populates additional information about the peer based on the previously loaded peerEntityId. |
protected void |
populatePeerEntityId(SAMLMessageContext context)
First tries to find pre-configured IDP from the request attribute. |
protected void |
populatePeerSSLCredential(SAMLMessageContext samlContext)
Tries to load peer SSL certificate from the inbound message transport using attribute "javax.servlet.request.X509Certificate". |
protected void |
populateSSLCredential(SAMLMessageContext samlContext)
Populates X509 Credential used to authenticate this machine against peer servers. |
protected void |
populateSSLTrustEngine(SAMLMessageContext samlContext)
Based on the settings in the extended metadata either creates a PKIX trust engine with trusted keys specified in the extended metadata as anchors or (by default) an explicit trust engine using data from the metadata or from the values overridden in the ExtendedMetadata. |
protected void |
populateTrustEngine(SAMLMessageContext samlContext)
Based on the settings in the extended metadata either creates a PKIX trust engine with trusted keys specified in the extended metadata as anchors or (by default) an explicit trust engine using data from the metadata or from the values overridden in the ExtendedMetadata. |
void |
setKeyManager(KeyManager keyManager)
|
void |
setMetadata(MetadataManager metadata)
|
void |
setStorageFactory(SAMLMessageStorageFactory storageFactory)
Implementation of the SAML message storage factory providing custom mechanism for storage of SAML messages such as http session, cookies or no storage at all. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.slf4j.Logger logger
protected KeyManager keyManager
protected MetadataManager metadata
protected MetadataCredentialResolver metadataResolver
protected PKIXInformationResolver pkixResolver
protected SAMLMessageStorageFactory storageFactory
Constructor Detail |
---|
public SAMLContextProviderImpl()
Method Detail |
---|
public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
getLocalEntity
in interface SAMLContextProvider
request
- requestresponse
- response
org.opensaml.saml2.metadata.provider.MetadataProviderException
- in case of metadata problemspublic SAMLMessageContext getLocalAndPeerEntity(HttpServletRequest request, HttpServletResponse response) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
getLocalAndPeerEntity
in interface SAMLContextProvider
request
- requestresponse
- response
org.opensaml.saml2.metadata.provider.MetadataProviderException
- in case of metadata problemsprotected void populatePeerEntityId(SAMLMessageContext context) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
context
- context to populate ID for
org.opensaml.saml2.metadata.provider.MetadataProviderException
- in case provided IDP value is invalidprotected void populatePeerContext(SAMLMessageContext samlContext) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
samlContext
- to populate
org.opensaml.saml2.metadata.provider.MetadataProviderException
- in case metadata problem is encounteredprotected void populateGenericContext(HttpServletRequest request, HttpServletResponse response, SAMLMessageContext context) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
org.opensaml.saml2.metadata.provider.MetadataProviderException
protected void populateLocalContext(SAMLMessageContext context) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
org.opensaml.saml2.metadata.provider.MetadataProviderException
protected void populateLocalEntityId(SAMLMessageContext context, String requestURI) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
context
- context to populate fields localEntityId and localEntityRole forrequestURI
- context path to parse entityId and entityRole from
org.opensaml.saml2.metadata.provider.MetadataProviderException
- in case entityId can't be populatedprotected void populateLocalEntity(SAMLMessageContext samlContext) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
samlContext
- context to populate
org.opensaml.saml2.metadata.provider.MetadataProviderException
- in case metadata do not contain expected entities or localAlias is specified but not foundprotected void populateSSLCredential(SAMLMessageContext samlContext)
samlContext
- context to populateprotected void populatePeerSSLCredential(SAMLMessageContext samlContext)
samlContext
- context to populateprotected void populateDecrypter(SAMLMessageContext samlContext)
samlContext
- context to populate decryptor for.protected void populateTrustEngine(SAMLMessageContext samlContext)
samlContext
- context to populateprotected void populateSSLTrustEngine(SAMLMessageContext samlContext)
samlContext
- context to populate@Autowired public void setMetadata(MetadataManager metadata)
@Autowired public void setKeyManager(KeyManager keyManager)
@Autowired(required=false) public void setStorageFactory(SAMLMessageStorageFactory storageFactory)
storageFactory
- storage factorypublic void afterPropertiesSet() throws ServletException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
ServletException
|
Spring Security SAML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |