Package org.projecthusky.xua.validation
Class ChEprAssertionValidator
java.lang.Object
org.projecthusky.xua.validation.ChEprAssertionValidator
A component capable of performing core validation of SAML version 2.0
Assertion
instances in use in the
CH-EPR domain.
The calling application needs to initiate the SAML library by calling InitializationService.initialize()
.
Supports all static validation parameters (see SAML2AssertionValidationParameters
). The following are
recommended:
SAML2AssertionValidationParameters.CLOCK_SKEW
: Optional. If not present the default clock skew ofDuration.ZERO
will be used. The SAML 2.0 specification recommend supporting a clock skew.SAML2AssertionValidationParameters.COND_VALID_AUDIENCES
: Optional. The set of allowed audiences.
The required conditions and attributes are extracted, verified then put in the ValidationContext
dynamic parameters and can easily be retrieved after validation. See ChEprAssertionValidationParameters
for the list.
- Author:
- Quentin Ligier
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChEprAssertionValidator
(@Nullable Duration oneTimeUseConditionExpires, @Nullable org.opensaml.xmlsec.signature.support.SignatureTrustEngine signatureTrustEngine) Constructor. -
Method Summary
-
Field Details
-
ERRMSG_ATTRIBUTE
- See Also:
-
ERRMSG_IS_MISSING
- See Also:
-
NAMESPACE_GS1_GLN
- See Also:
-
ERRMSG_SUBJECT_CONFIRMATION_MISSING
- See Also:
-
-
Constructor Details
-
ChEprAssertionValidator
public ChEprAssertionValidator(@Nullable Duration oneTimeUseConditionExpires, @Nullable org.opensaml.xmlsec.signature.support.SignatureTrustEngine signatureTrustEngine) throws net.shibboleth.utilities.java.support.component.ComponentInitializationException Constructor.- Parameters:
oneTimeUseConditionExpires
- The time for disposal of tracked assertion from the replay cache. Ifnull
, the OneTimeUseCondition is not enforced.signatureTrustEngine
- The trust engine to use to validate signatures. This can be anExplicitKeySignatureTrustEngine
or any other implementation. AKeyInfoCredentialResolver
is not needed, as we don't expect a KeyInfo in the CH:XUA assertions.- Throws:
net.shibboleth.utilities.java.support.component.ComponentInitializationException
- if theReplayCache
of theOneTimeUseConditionValidator
fails to initialize.
-
-
Method Details
-
validate
public ChEprValidationResult validate(org.opensaml.saml.saml2.core.Assertion assertion, @Nullable Map<String, @Nullable Object> staticParameters) throws org.opensaml.saml.common.assertion.AssertionValidationExceptionValidate the supplied SAML 2Assertion
, using the parameters from the suppliedValidationContext
.- Parameters:
assertion
- The assertion being evaluated.staticParameters
- ?? or null.- Returns:
- the validation result.
- Throws:
org.opensaml.saml.common.assertion.AssertionValidationException
- if there is a fatal error evaluating the validity of the assertion.
-