|
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.websso.AbstractProfileBase
org.springframework.security.saml.websso.WebSSOProfileConsumerImpl
public class WebSSOProfileConsumerImpl
Class is able to process Response objects returned from the IDP after SP initialized SSO or unsolicited response from IDP. In case the response is correctly validated and no errors are found the SAMLCredential is created.
Field Summary |
---|
Fields inherited from class org.springframework.security.saml.websso.AbstractProfileBase |
---|
artifactMap, builderFactory, metadata, processor |
Constructor Summary | |
---|---|
WebSSOProfileConsumerImpl()
|
|
WebSSOProfileConsumerImpl(SAMLProcessor processor,
MetadataManager manager)
|
Method Summary | |
---|---|
int |
getMaxAuthenticationAge()
Maximum time between authentication of user and processing of an authentication statement. |
String |
getProfileIdentifier()
Implementation are expected to provide an unique identifier for the profile this class implements. |
protected Serializable |
processAdditionalData(SAMLMessageContext context)
This is a hook method enabling subclasses to process additional data from the SAML exchange, like assertions with different confirmations or additional attributes. |
SAMLCredential |
processAuthenticationResponse(SAMLMessageContext context)
The input context object must have set the properties related to the returned Response, which is validated and in case no errors are found the SAMLCredential is returned. |
void |
setMaxAuthenticationAge(int maxAuthenticationAge)
Sets maximum time between users authentication and processing of an authentication statement. |
protected void |
verifyAssertion(org.opensaml.saml2.core.Assertion assertion,
org.opensaml.saml2.core.AuthnRequest request,
SAMLMessageContext context)
|
protected void |
verifyAssertionConditions(org.opensaml.saml2.core.Conditions conditions,
SAMLMessageContext context,
boolean audienceRequired)
|
protected void |
verifyAssertionSignature(org.opensaml.xml.signature.Signature signature,
SAMLMessageContext context)
Verifies signature of the assertion. |
protected void |
verifyAuthenticationStatement(org.opensaml.saml2.core.AuthnStatement auth,
org.opensaml.saml2.core.RequestedAuthnContext requestedAuthnContext,
SAMLMessageContext context)
Verifies that authentication statement is valid. |
protected void |
verifyAuthnContext(org.opensaml.saml2.core.RequestedAuthnContext requestedAuthnContext,
org.opensaml.saml2.core.AuthnContext receivedContext,
SAMLMessageContext context)
Implementation is expected to verify that the requested authentication context corresponds with the received value. |
protected void |
verifyConditions(SAMLMessageContext context,
List<org.opensaml.saml2.core.Condition> conditions)
Verifies conditions of the assertion which were are not understood. |
protected void |
verifySubject(org.opensaml.saml2.core.Subject subject,
org.opensaml.saml2.core.AuthnRequest request,
SAMLMessageContext context)
Verifies validity of Subject element, only bearer confirmation is validated. |
Methods inherited from class org.springframework.security.saml.websso.AbstractProfileBase |
---|
afterPropertiesSet, buildCommonAttributes, generateID, getEndpointBinding, getIssuer, getMaxAssertionTime, getResponseSkew, getStatus, isEndpointMatching, sendMessage, sendMessage, setArtifactMap, setMaxAssertionTime, setMetadata, setProcessor, setResponseSkew, verifyEndpoint, verifyIssuer, verifySignature |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebSSOProfileConsumerImpl()
public WebSSOProfileConsumerImpl(SAMLProcessor processor, MetadataManager manager)
Method Detail |
---|
public String getProfileIdentifier()
AbstractProfileBase
getProfileIdentifier
in class AbstractProfileBase
public SAMLCredential processAuthenticationResponse(SAMLMessageContext context) throws org.opensaml.common.SAMLException, org.opensaml.xml.security.SecurityException, org.opensaml.xml.validation.ValidationException, org.opensaml.xml.encryption.DecryptionException
processAuthenticationResponse
in interface WebSSOProfileConsumer
context
- context including response object
org.opensaml.common.SAMLException
- in case the response is invalid
org.opensaml.xml.security.SecurityException
- in the signature on response can't be verified
org.opensaml.xml.validation.ValidationException
- in case the response structure is not conforming to the standard
org.opensaml.xml.encryption.DecryptionException
protected Serializable processAdditionalData(SAMLMessageContext context) throws org.opensaml.common.SAMLException
context
- context containing incoming message
org.opensaml.common.SAMLException
- in case processing failsprotected void verifyAssertion(org.opensaml.saml2.core.Assertion assertion, org.opensaml.saml2.core.AuthnRequest request, SAMLMessageContext context) throws org.springframework.security.core.AuthenticationException, org.opensaml.common.SAMLException, org.opensaml.xml.security.SecurityException, org.opensaml.xml.validation.ValidationException, org.opensaml.xml.encryption.DecryptionException
org.springframework.security.core.AuthenticationException
org.opensaml.common.SAMLException
org.opensaml.xml.security.SecurityException
org.opensaml.xml.validation.ValidationException
org.opensaml.xml.encryption.DecryptionException
protected void verifySubject(org.opensaml.saml2.core.Subject subject, org.opensaml.saml2.core.AuthnRequest request, SAMLMessageContext context) throws org.opensaml.common.SAMLException, org.opensaml.xml.encryption.DecryptionException
subject
- subject to validaterequest
- requestcontext
- context
org.opensaml.common.SAMLException
- error validating the object
org.opensaml.xml.encryption.DecryptionException
- in case the NameID can't be decryptedprotected void verifyAssertionSignature(org.opensaml.xml.signature.Signature signature, SAMLMessageContext context) throws org.opensaml.common.SAMLException, org.opensaml.xml.security.SecurityException, org.opensaml.xml.validation.ValidationException
signature
- signature to verifycontext
- context
org.opensaml.common.SAMLException
- signature missing although required
org.opensaml.xml.security.SecurityException
- signature can't be validated
org.opensaml.xml.validation.ValidationException
- signature is malformedprotected void verifyAssertionConditions(org.opensaml.saml2.core.Conditions conditions, SAMLMessageContext context, boolean audienceRequired) throws org.opensaml.common.SAMLException
org.opensaml.common.SAMLException
protected void verifyConditions(SAMLMessageContext context, List<org.opensaml.saml2.core.Condition> conditions) throws org.opensaml.common.SAMLException
context
- message contextconditions
- conditions which were not understood
org.opensaml.common.SAMLException
- in case conditions are not emptyprotected void verifyAuthenticationStatement(org.opensaml.saml2.core.AuthnStatement auth, org.opensaml.saml2.core.RequestedAuthnContext requestedAuthnContext, SAMLMessageContext context) throws org.springframework.security.core.AuthenticationException
auth
- statement to checkrequestedAuthnContext
- original requested context can be null for unsolicited messages or when no context was requestedcontext
- message context
org.springframework.security.core.AuthenticationException
- in case the statement is invalidprotected void verifyAuthnContext(org.opensaml.saml2.core.RequestedAuthnContext requestedAuthnContext, org.opensaml.saml2.core.AuthnContext receivedContext, SAMLMessageContext context) throws org.springframework.security.authentication.InsufficientAuthenticationException
requestedAuthnContext
- context requested in the original request, null for unsolicited messages or when no context was requiredreceivedContext
- context from the response messagecontext
- saml context
org.springframework.security.authentication.InsufficientAuthenticationException
- in case expected context doesn't correspond with the received valuepublic int getMaxAuthenticationAge()
public void setMaxAuthenticationAge(int maxAuthenticationAge)
maxAuthenticationAge
- authentication age
|
Spring Security SAML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |