public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHandler
修飾子とタイプ | クラスと説明 |
---|---|
protected class |
AbstractSAML2ProfileHandler.SAML2AuditLogEntry
SAML 2 specific audit log entry.
|
修飾子とタイプ | フィールドと説明 |
---|---|
static SAMLVersion |
SAML_VERSION
SAML Version for this profile handler.
|
修飾子 | コンストラクタと説明 |
---|---|
protected |
AbstractSAML2ProfileHandler()
Constructor.
|
修飾子とタイプ | メソッドと説明 |
---|---|
protected Assertion |
buildAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
org.joda.time.DateTime issueInstant)
Builds a basic assertion with its id, issue instant, SAML version, issuer, subject, and conditions populated.
|
protected AttributeStatement |
buildAttributeStatement(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Executes a query for attributes and builds a SAML attribute statement from the results.
|
protected Conditions |
buildConditions(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
org.joda.time.DateTime issueInstant)
Builds a SAML assertion condition set.
|
protected Issuer |
buildEntityIssuer(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Creates an
Issuer populated with information about the relying party. |
protected Response |
buildErrorResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Constructs an SAML response message carrying a request error.
|
protected NameID |
buildNameId(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Builds a NameID appropriate for this request.
|
protected Response |
buildResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
String subjectConfirmationMethod,
List<Statement> statements)
Builds a response to the attribute query within the request context.
|
protected Status |
buildStatus(String topLevelCode,
String secondLevelCode,
String failureMessage)
Build a status message, with an optional second-level failure message.
|
protected Subject |
buildSubject(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
String confirmationMethod,
org.joda.time.DateTime issueInstant)
Builds the SAML subject for the user for the service provider.
|
protected SubjectConfirmation |
buildSubjectConfirmation(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
String confirmationMethod,
org.joda.time.DateTime issueInstant)
Builds the SubjectConfirmation appropriate for this request.
|
protected void |
checkSamlVersion(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Checks that the SAML major version for a request is 2.
|
protected Encrypter |
getEncrypter(String peerEntityId)
Gets an encrypter that may be used encrypt content to a given peer.
|
protected Credential |
getKeyEncryptionCredential(String peerEntityId)
Gets the credential that can be used to encrypt encryption keys for a peer.
|
protected String |
getSessionIndexFromNameID(NameID nameIdentifier)
Creates a properly-delimited string representation from the given SAML2
NameID for session indexing purposes.
|
protected boolean |
isEncryptAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Determine whether issued assertions should be encrypted.
|
protected boolean |
isEncryptNameID(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Determine whether NameID's should be encrypted.
|
protected boolean |
isRequestRequiresEncryptNameID(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Determine whether information in the SAML request requires the issued NameID to be encrypted.
|
protected boolean |
isSignAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Determine whether issued assertions should be signed.
|
protected void |
populateRequestContext(BaseSAMLProfileRequestContext requestContext)
Populates the request context with information.
|
protected void |
populateStatusResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
StatusResponseType response)
Populates the response's id, in response to, issue instant, version, and issuer properties.
|
protected void |
populateUserInformation(BaseSAMLProfileRequestContext requestContext)
Populates the request context with the information about the user.
|
protected void |
postProcessAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
Assertion assertion)
Extension point for for subclasses to post-process the Assertion before it is signed and encrypted.
|
protected void |
postProcessResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
Response samlResponse)
Extension point for for subclasses to post-process the Response before it is signed and encoded.
|
protected void |
resolveAttributes(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Resolves the attributes for the principal.
|
protected void |
resolvePrincipal(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Resolves the principal name of the subject of the request.
|
protected void |
signAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext,
Assertion assertion)
Signs the given assertion if either the current profile configuration or the relying party configuration contains
signing credentials.
|
protected void |
writeAuditLogEntry(BaseSAMLProfileRequestContext context)
Writes an audit log entry indicating the successful response to the attribute request.
|
encodeResponse, filterNameIDAttributesByFormats, filterNameIDAttributesByProtocol, getAduitLog, getAuditLog, getEntitySupportedFormats, getIdGenerator, getInboundBinding, getInboundMessageDecoder, getMessageDecoders, getMessageEncoders, getMetadataCredentialResolver, getMetadataProvider, getOutboundMessageEncoder, getRelyingPartyConfiguration, getRequiredNameIDFormat, getSecurityPolicyResolver, getSupportedNameFormats, getSupportedOutboundBindings, getUserSession, getUserSession, isSignResponse, populateAssertingPartyInformation, populateProfileInformation, populateRelyingPartyInformation, populateSAMLMessageInformation, selectEndpoint, selectNameIDAttributeAndEncoder, selectNameIDAttributeAndEncoder, setIdGenerator, setInboundBinding, setMessageDecoders, setMessageEncoders, setSecurityPolicyResolver, setSupportedOutboundBindings
getBuilderFactory, getParserPool, getProfileConfiguration, getProfileId, getRelyingPartyConfigurationManager, getSessionManager, getStorageService, setParserPool, setRelyingPartyConfigurationManager, setSessionManager, setStorageService
getRequestPaths, setRequestPaths
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processRequest
public static final SAMLVersion SAML_VERSION
protected void populateRequestContext(BaseSAMLProfileRequestContext requestContext) throws ProfileException
populateRequestContext
クラス内 AbstractSAMLProfileHandler
requestContext
- current request contextProfileException
- thrown if there is a problem looking up the relying party's metadataprotected void populateUserInformation(BaseSAMLProfileRequestContext requestContext)
populateUserInformation
クラス内 AbstractSAMLProfileHandler
requestContext
- current request contextprotected void checkSamlVersion(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException
requestContext
- current request context containing the SAML messageProfileException
- thrown if the major version of the SAML request is not 2protected Response buildResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext, String subjectConfirmationMethod, List<Statement> statements) throws ProfileException
requestContext
- current request contextsubjectConfirmationMethod
- confirmation method used for the subjectstatements
- the statements to include in the responseProfileException
- thrown if there is a problem creating the SAML responseprotected boolean isEncryptAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException
requestContext
- the current request contextProfileException
- if there is a problem determining whether assertions should be encryptedprotected void postProcessResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext, Response samlResponse) throws ProfileException
requestContext
- the current request contextsamlResponse
- the SAML Response being builtProfileException
- if there was an error processing the responseprotected void postProcessAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext, Assertion assertion) throws ProfileException
requestContext
- the current request contextassertion
- the SAML Assertion being builtProfileException
- if there is an error processing the assertionprotected Assertion buildAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext, org.joda.time.DateTime issueInstant)
requestContext
- current request contextissueInstant
- time to use as assertion issue instantprotected Issuer buildEntityIssuer(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
Issuer
populated with information about the relying party.requestContext
- current request contextprotected Conditions buildConditions(BaseSAML2ProfileRequestContext<?,?,?> requestContext, org.joda.time.DateTime issueInstant)
requestContext
- current request contextissueInstant
- timestamp the assertion was createdprotected void populateStatusResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext, StatusResponseType response)
requestContext
- current request contextresponse
- the response to populateprotected void resolveAttributes(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException
requestContext
- current request contextProfileException
- thrown if there is a problem resolved attributesprotected AttributeStatement buildAttributeStatement(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException
requestContext
- current request contextProfileException
- thrown if there is a problem making the queryprotected void resolvePrincipal(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException
requestContext
- current request contextProfileException
- thrown if the principal name can not be resolvedprotected void signAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext, Assertion assertion) throws ProfileException
requestContext
- current request contextassertion
- assertion to signProfileException
- thrown if the metadata can not be located for the relying party or, if signing is
required, if a signing credential is not configuredprotected boolean isSignAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException
requestContext
- the current request contextProfileException
- if there is a problem determining whether assertions should be signedprotected Status buildStatus(String topLevelCode, String secondLevelCode, String failureMessage)
topLevelCode
- The top-level status code. Should be from saml-core-2.0-os, sec. 3.2.2.2secondLevelCode
- An optional second-level failure code. Should be from saml-core-2.0-is, sec 3.2.2.2. If
null, no second-level Status element will be set.failureMessage
- An optional second-level failure messageprotected Subject buildSubject(BaseSAML2ProfileRequestContext<?,?,?> requestContext, String confirmationMethod, org.joda.time.DateTime issueInstant) throws ProfileException
requestContext
- current request contextconfirmationMethod
- subject confirmation method used for the subjectissueInstant
- instant the subject confirmation data should reflect for issuanceProfileException
- thrown if a NameID can not be created either because there was a problem encoding the
name ID attribute or because there are no supported name formatsprotected boolean isEncryptNameID(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException
requestContext
- the current request contextProfileException
- if there is a problem determining whether NameID's should be encryptedprotected boolean isRequestRequiresEncryptNameID(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
requestContext
- the current request contextprotected SubjectConfirmation buildSubjectConfirmation(BaseSAML2ProfileRequestContext<?,?,?> requestContext, String confirmationMethod, org.joda.time.DateTime issueInstant)
requestContext
- current request contextconfirmationMethod
- confirmation method to use for the requestissueInstant
- issue instant of the responseprotected NameID buildNameId(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException
requestContext
- current request contextProfileException
- thrown if a NameID can not be created either because there was a problem encoding the
name ID attribute or because there are no supported name formatsprotected Response buildErrorResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
requestContext
- current request contextprotected Encrypter getEncrypter(String peerEntityId) throws SecurityException
peerEntityId
- entity ID of the peerSecurityException
- thrown if there is a problem constructing the encrypter. This normally occurs if the
key encryption credential for the peer can not be resolved or a required encryption algorithm is not
supported by the VM's JCE.protected Credential getKeyEncryptionCredential(String peerEntityId) throws SecurityException
peerEntityId
- entity ID of the peerSecurityException
- thrown if there is a problem resolving the credential from the peer's metadataprotected String getSessionIndexFromNameID(NameID nameIdentifier)
nameIdentifier
- the NameID to create string representation fromprotected void writeAuditLogEntry(BaseSAMLProfileRequestContext context)
writeAuditLogEntry
クラス内 AbstractSAMLProfileHandler
context
- current request contextCopyright © 2012. All Rights Reserved.