Class DefaultAssertionValidationContextBuilder
- All Implemented Interfaces:
Function<ValidateAssertions.AssertionValidationInput,ValidationContext>
ValidationContext
from an instance of ValidateAssertions.AssertionValidationInput.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.Default strategy for resolving the valid InResponseTo value.static classDeprecated.Default strategy for resolving the valid Issuers. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,Set<String>> Deprecated.Function for determining additional valid audience values.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData Address is required.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether an Assertion's network address(es) should be checked.private Function<ProfileRequestContext,Duration> Deprecated.A function for resolving the clock skew to apply.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether to include the self entityID as a valid Recipient.private Function<ProfileRequestContext,String> Deprecated.Function for determining the valid InResponseTo value.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData InResponseTo is ignored.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData InResponseTo is required.private Function<ProfileRequestContext,Duration> Deprecated.A function for resolving the lifetime to apply.private org.slf4j.LoggerDeprecated.Logger.private Function<ProfileRequestContext,Duration> Deprecated.Function for determining the max allowed time since authentication.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData NotBefore is required.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData NotOnOrAfter is required.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData Recipient is required.Deprecated.The set of required Conditions.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether to require issuer be of theNameIDType.ENTITYformat.Deprecated.Resolver for security parameters context.private Function<Pair<ProfileRequestContext,Assertion>, CriteriaSet> Deprecated.A function for resolving the signature validation CriteriaSet for a particular function.private Predicate<ProfileRequestContext>Deprecated.Predicate for determining whether an Assertion signature is required.private Function<ProfileRequestContext,Set<String>> Deprecated.Function for determining additional valid Issuer values. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.Build the static parameters map for input to theValidationContext.Deprecated.Get the function for determining additional audience values.Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData Address is required.protected X509CertificateDeprecated.Get the attesting entity'sX509Certificate.protected StringDeprecated.Get the attester's IP address.protected PublicKeyDeprecated.Get the attesting entity'sPublicKey.Deprecated.Get the predicate which determines whether an Assertion's network address(es) should be checked.Deprecated.Get the strategy by which to resolve the clock skew.Deprecated.Get the predicate which determines whether to include the self entityID as a valid Recipient.Deprecated.Get the function for determining the valid InResponseTo.Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData InResponseTo is ignored.Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData InResponseTo is required.Deprecated.Get the strategy by which to resolve the lifetime.Deprecated.Get the function for determining the max allowed time since authentication.Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData NotBefore is required.Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData NotOnOrAfter is required.Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData Recipient is required.Deprecated.Get the set of required Conditions.Deprecated.Get the set of required Conditions.Deprecated.Get the predicate which determines whether to require the Issuer contain theNameIDType.ENTITYFormat.Deprecated.Get the strategy by which to resolve aSecurityParametersContext.protected StringDeprecated.Get the self entityID.protected CriteriaSetDeprecated.Get the signature validation criteria set.Deprecated.Get the function for resolving the signature validation CriteriaSet for a particular function.Deprecated.Get the predicate which determines whether an Assertion signature is required.protected Set<InetAddress>Deprecated.Get the set of addresses which are valid for subject confirmation.Deprecated.Get the valid audiences for attestation.Deprecated.Get the function for determining the valid Issuer valuesDeprecated.Get the valid recipient endpoints for attestation.private voidpopulateConditionsParameters(Map<String, Object> staticParams, ValidateAssertions.AssertionValidationInput input) Deprecated.Populate the static Conditions parameters.protected voidpopulateSignatureCriteriaFromInboundContext(CriteriaSet criteriaSet, MessageContext inboundContext) Deprecated.Populate signature criteria from the specifiedMessageContext.private voidpopulateSignatureParameters(Map<String, Object> staticParams, ValidateAssertions.AssertionValidationInput input) Deprecated.Populate the static signature parameters.private voidpopulateStatementParams(Map<String, Object> staticParams, ValidateAssertions.AssertionValidationInput input, Set<InetAddress> validAddresses, Boolean checkAddressEnabled) Deprecated.Populate the static Statement params.private voidpopulateSubjectConfirmationParameters(Map<String, Object> staticParams, ValidateAssertions.AssertionValidationInput input, Set<InetAddress> validAddresses, Boolean checkAddressEnabled) Deprecated.Populate the static SubjectConfirmation parameters.voidsetAdditionalAudiences(Function<ProfileRequestContext, Set<String>> function) Deprecated.Set the function for determining additional audience values.voidsetAddressRequired(Predicate<ProfileRequestContext> predicate) Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData Address is required.voidsetCheckAddress(Predicate<ProfileRequestContext> predicate) Deprecated.Set the predicate which determines whether an Assertion's network address(es) should be checked.voidsetClockSkew(Duration skew) Deprecated.Set the clock skew.voidDeprecated.Set the strategy by which to resolve the clock skew.voidDeprecated.Set the predicate which determines whether to include the self entityID as a valid Recipient.voidsetInResponseTo(Function<ProfileRequestContext, String> function) Deprecated.Set the function for determining the valid InResponseTo.voidsetInResponseToIgnored(Predicate<ProfileRequestContext> predicate) Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData InResponseTo is ignored.voidsetInResponseToRequired(Predicate<ProfileRequestContext> predicate) Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData InResponseTo is required.voidsetLifetime(Duration duration) Deprecated.Set the lifetime.voidDeprecated.Set the strategy by which to resolve the lifetime.voidDeprecated.Set the function for determining the max allowed time since authentication.voidsetNotBeforeRequired(Predicate<ProfileRequestContext> predicate) Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData NotBefore is required.voidsetNotOnOrAfterRequired(Predicate<ProfileRequestContext> predicate) Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData NotOnOrAfter is required.voidsetRecipientRequired(Predicate<ProfileRequestContext> predicate) Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData Recipient is required.voidsetRequiredConditions(Set<QName> conditions) Deprecated.Set the set of required Conditions.voidsetRequireEntityIssuer(Predicate<ProfileRequestContext> predicate) Deprecated.Get the predicate which determines whether to require the Issuer contain theNameIDType.ENTITYFormat.voidsetSecurityParametersLookupStrategy(Function<ProfileRequestContext, SecurityParametersContext> strategy) Deprecated.Set the strategy by which to resolve aSecurityParametersContext.voidsetSignatureCriteriaSetFunction(Function<Pair<ProfileRequestContext, Assertion>, CriteriaSet> function) Deprecated.Set the function for resolving the signature validation CriteriaSet for a particular function.voidsetSignatureRequired(Predicate<ProfileRequestContext> predicate) Deprecated.Set the predicate which determines whether an Assertion signature is required.voidsetValidIssuers(Function<ProfileRequestContext, Set<String>> function) Deprecated.Set the function for determining the valid Issuer values
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logDeprecated.Logger. -
clockSkew
Deprecated.A function for resolving the clock skew to apply. -
lifetime
Deprecated.A function for resolving the lifetime to apply. -
signatureCriteriaSetFunction
@Nullable private Function<Pair<ProfileRequestContext,Assertion>, signatureCriteriaSetFunctionCriteriaSet> Deprecated.A function for resolving the signature validation CriteriaSet for a particular function. -
signatureRequired
Deprecated.Predicate for determining whether an Assertion signature is required. -
checkAddress
Deprecated.Predicate for determining whether an Assertion's network address(es) should be checked. -
maximumTimeSinceAuthn
Deprecated.Function for determining the max allowed time since authentication. -
includeSelfEntityIDAsRecipient
Deprecated.Predicate for determining whether to include the self entityID as a valid Recipient. -
additionalAudiences
Deprecated.Function for determining additional valid audience values. -
validIssuers
Deprecated.Function for determining additional valid Issuer values. -
requireEntityIssuer
Deprecated.Predicate for determining whether to require issuer be of theNameIDType.ENTITYformat. -
inResponseTo
Deprecated.Function for determining the valid InResponseTo value. -
inResponseToIgnored
Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData InResponseTo is ignored. -
inResponseToRequired
Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData InResponseTo is required. -
recipientRequired
Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData Recipient is required. -
notBeforeRequired
Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData NotBefore is required. -
notOnOrAfterRequired
Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData NotOnOrAfter is required. -
addressRequired
Deprecated.Predicate for determining whether an Assertion SubjectConfirmationData Address is required. -
requiredConditions
Deprecated.The set of required Conditions. -
securityParametersLookupStrategy
@Nonnull private Function<ProfileRequestContext,SecurityParametersContext> securityParametersLookupStrategyDeprecated.Resolver for security parameters context.
-
-
Constructor Details
-
DefaultAssertionValidationContextBuilder
public DefaultAssertionValidationContextBuilder()Deprecated.Constructor.
-
-
Method Details
-
getClockSkew
Deprecated.Get the strategy by which to resolve the clock skew.- Returns:
- lookup strategy
- Since:
- 4.1.0
-
setClockSkew
Deprecated.Set the clock skew.- Parameters:
skew- clock skew- Since:
- 4.1.0
-
setClockSkewLookupStrategy
Deprecated.Set the strategy by which to resolve the clock skew.- Parameters:
strategy- lookup strategy- Since:
- 4.1.0
-
getLifetime
Deprecated.Get the strategy by which to resolve the lifetime.- Returns:
- lookup strategy
- Since:
- 4.2.0
-
setLifetime
Deprecated.Set the lifetime.- Parameters:
duration- lifetime- Since:
- 4.2.0
-
setLifetimeLookupStrategy
Deprecated.Set the strategy by which to resolve the lifetime.- Parameters:
strategy- lookup strategy- Since:
- 4.2.0
-
getSecurityParametersLookupStrategy
@Nonnull public Function<ProfileRequestContext,SecurityParametersContext> getSecurityParametersLookupStrategy()Deprecated.Get the strategy by which to resolve aSecurityParametersContext.- Returns:
- the lookup strategy
-
setSecurityParametersLookupStrategy
public void setSecurityParametersLookupStrategy(@Nonnull Function<ProfileRequestContext, SecurityParametersContext> strategy) Deprecated.Set the strategy by which to resolve aSecurityParametersContext.- Parameters:
strategy- the strategy function
-
getRequiredConditions
Deprecated.Get the set of required Conditions.- Returns:
- the required conditions, may be null
-
setRequiredConditions
Deprecated.Set the set of required Conditions.- Parameters:
conditions- the required conditions
-
getIncludeSelfEntityIDAsRecipient
Deprecated.Get the predicate which determines whether to include the self entityID as a valid Recipient.Defaults to an always false predicate;
- Returns:
- the predicate
-
setIncludeSelfEntityIDAsRecipient
Deprecated.Set the predicate which determines whether to include the self entityID as a valid Recipient.Defaults to an always false predicate.
- Parameters:
predicate- the predicate, must be non-null
-
getSignatureRequired
Deprecated.Get the predicate which determines whether an Assertion signature is required.Defaults to an always true predicate;
- Returns:
- the predicate
-
setSignatureRequired
Deprecated.Set the predicate which determines whether an Assertion signature is required.Defaults to an always true predicate.
- Parameters:
predicate- the predicate, must be non-null
-
setInResponseTo
Deprecated.Set the function for determining the valid InResponseTo.Defaults to null.
- Parameters:
function- the function, may be null
-
getInResponseTo
Deprecated.Get the function for determining the valid InResponseTo.Defaults to null.
- Returns:
- the function
-
getInResponseToRequired
Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData InResponseTo is required.Defaults to an always false predicate;
- Returns:
- the predicate
-
setInResponseToRequired
Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData InResponseTo is required.Defaults to an always false predicate.
- Parameters:
predicate- the predicate, must be non-null
-
getInResponseToIgnored
Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData InResponseTo is ignored.Defaults to an always false predicate;
- Returns:
- the predicate
- Since:
- 5.2.0
-
setInResponseToIgnored
Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData InResponseTo is ignored.Defaults to an always false predicate.
- Parameters:
predicate- the predicate, must be non-null- Since:
- 5.2.0
-
getRecipientRequired
Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData Recipient is required.Defaults to an always false predicate;
- Returns:
- the predicate
-
setRecipientRequired
Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData Recipient is required.Defaults to an always false predicate.
- Parameters:
predicate- the predicate, must be non-null
-
getNotBeforeRequired
Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData NotBefore is required.Defaults to an always false predicate;
- Returns:
- the predicate
-
setNotBeforeRequired
Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData NotBefore is required.Defaults to an always false predicate.
- Parameters:
predicate- the predicate, must be non-null
-
getNotOnOrAfterRequired
Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData NotOnOrAfter is required.Defaults to an always false predicate;
- Returns:
- the predicate
-
setNotOnOrAfterRequired
Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData NotOnOrAfter is required.Defaults to an always false predicate.
- Parameters:
predicate- the predicate, must be non-null
-
getAddressRequired
Deprecated.Get the predicate which determines whether an Assertion SubjectConfirmationData Address is required.Defaults to an always false predicate;
- Returns:
- the predicate
-
setAddressRequired
Deprecated.Set the predicate which determines whether an Assertion SubjectConfirmationData Address is required.Defaults to an always false predicate.
- Parameters:
predicate- the predicate, must be non-null
-
getCheckAddress
Deprecated.Get the predicate which determines whether an Assertion's network address(es) should be checked.Defaults to an always true predicate;
- Returns:
- the predicate
-
setCheckAddress
Deprecated.Set the predicate which determines whether an Assertion's network address(es) should be checked.Defaults to an always true predicate.
- Parameters:
predicate- the predicate, must be non-null
-
getAdditionalAudiences
Deprecated.Get the function for determining additional audience values.Defaults to null.
- Returns:
- the function
-
setAdditionalAudiences
Deprecated.Set the function for determining additional audience values.Defaults to null.
- Parameters:
function- the function, may be null
-
getValidIssuers
Deprecated.Get the function for determining the valid Issuer valuesDefaults to an implementation which resolves the outbound SAML peer entityID.
- Returns:
- the function
-
setValidIssuers
Deprecated.Set the function for determining the valid Issuer valuesDefaults to an implementation which resolves the outbound SAML peer entityID.
- Parameters:
function- the function, may be null
-
getRequireEntityIssuer
Deprecated.Get the predicate which determines whether to require the Issuer contain theNameIDType.ENTITYFormat.- Returns:
- predicate
- Since:
- 5.2.0
-
setRequireEntityIssuer
Deprecated.Get the predicate which determines whether to require the Issuer contain theNameIDType.ENTITYFormat.Defaults to false.
- Parameters:
predicate- the condition to set- Since:
- 5.2.0
-
getMaximumTimeSinceAuthn
Deprecated.Get the function for determining the max allowed time since authentication.Defaults to null.
- Returns:
- the function
-
setMaximumTimeSinceAuthn
Deprecated.Set the function for determining the max allowed time since authentication.Defaults to null.
- Parameters:
function- the function, may be null
-
getSignatureCriteriaSetFunction
@Nullable public Function<Pair<ProfileRequestContext,Assertion>, getSignatureCriteriaSetFunction()CriteriaSet> Deprecated.Get the function for resolving the signature validation CriteriaSet for a particular function.Defaults to:
null.- Returns:
- a criteria set instance, or null
-
setSignatureCriteriaSetFunction
public void setSignatureCriteriaSetFunction(@Nullable Function<Pair<ProfileRequestContext, Assertion>, CriteriaSet> function) Deprecated.Set the function for resolving the signature validation CriteriaSet for a particular function.Defaults to:
null.- Parameters:
function- the resolving function, may be null
-
apply
@Nullable public ValidationContext apply(@Nullable ValidateAssertions.AssertionValidationInput input) Deprecated.- Specified by:
applyin interfaceFunction<ValidateAssertions.AssertionValidationInput,ValidationContext>
-
buildStaticParameters
@Nonnull protected Map<String,Object> buildStaticParameters(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Build the static parameters map for input to theValidationContext.- Parameters:
input- the assertion validation input- Returns:
- the static parameters map
-
populateSignatureParameters
private void populateSignatureParameters(@Nonnull Map<String, Object> staticParams, @Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Populate the static signature parameters.- Parameters:
staticParams- the parameters being populatedinput- validation input
-
populateConditionsParameters
private void populateConditionsParameters(@Nonnull Map<String, Object> staticParams, @Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Populate the static Conditions parameters.- Parameters:
staticParams- the parameters being populatedinput- validation input
-
populateSubjectConfirmationParameters
private void populateSubjectConfirmationParameters(@Nonnull Map<String, Object> staticParams, @Nonnull ValidateAssertions.AssertionValidationInput input, @Nonnull Set<InetAddress> validAddresses, @Nonnull Boolean checkAddressEnabled) Deprecated.Populate the static SubjectConfirmation parameters.- Parameters:
staticParams- the parameters being populatedinput- validation inputvalidAddresses- the valid addressescheckAddressEnabled- whether address checking is enabled
-
populateStatementParams
private void populateStatementParams(@Nonnull Map<String, Object> staticParams, @Nonnull ValidateAssertions.AssertionValidationInput input, @Nonnull Set<InetAddress> validAddresses, @Nonnull Boolean checkAddressEnabled) Deprecated.Populate the static Statement params.- Parameters:
staticParams- the parameters being populatedinput- validation inputvalidAddresses- the valid addressescheckAddressEnabled- whether address checking is enabled
-
getRequiredConditions
@Nonnull protected Set<QName> getRequiredConditions(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the set of required Conditions.The default behavior is to return the locally-configured data via
getRequiredConditions().- Parameters:
input- the assertion validation input- Returns:
- the set of required Condition names, may be null
-
getSignatureCriteriaSet
@Nonnull protected CriteriaSet getSignatureCriteriaSet(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the signature validation criteria set.This implementation first evaluates the result of applying the function
getSignatureCriteriaSetFunction(), if configured. If that evaluation did not produce anEntityIdCriterion, one is added based on the issuer of theAssertion. If that evaluation did not produce an instance ofUsageCriterion, one is added with the value ofUsageType.SIGNING.Finally the following criteria are added if not already present and if the corresponding data is available in the inbound
MessageContext:- Parameters:
input- the assertion validation input- Returns:
- the criteria set based on the message context data
-
getAttesterCertificate
@Nullable protected X509Certificate getAttesterCertificate(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the attesting entity'sX509Certificate.This implementation returns the client TLS certificate present in the
HttpServletRequest, or null if one is not present.- Parameters:
input- the assertion validation input- Returns:
- the entity certificate, or null
-
getAttesterPublicKey
@Nullable protected PublicKey getAttesterPublicKey(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the attesting entity'sPublicKey.This implementation returns null. Subclasses should override to implement specific logic.
- Parameters:
input- the assertion validation input- Returns:
- the entity public key, or null
-
getValidRecipients
@Nonnull @Unmodifiable @NotLive protected Set<String> getValidRecipients(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the valid recipient endpoints for attestation.This implementation returns a set containing the 2 values;
-
the result of evaluating
SAMLBindingSupport.getActualReceiverEndpointURI(MessageContext, HttpServletRequest) -
if enabled via the eval of
getIncludeSelfEntityIDAsRecipient(), the value from evaluatinggetSelfEntityID(AssertionValidationInput)if non-null
- Parameters:
input- the assertion validation input- Returns:
- set of recipient endpoint URI's
-
the result of evaluating
-
getValidAddresses
@Nonnull @Unmodifiable @NotLive protected Set<InetAddress> getValidAddresses(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the set of addresses which are valid for subject confirmation.This implementation simply returns the set based on
getAttesterIPAddress(AssertionValidationInput), if that produces a value. Otherwise an empty set is returned.- Parameters:
input- the assertion validation input- Returns:
- the set of valid addresses
-
getAttesterIPAddress
@Nullable protected String getAttesterIPAddress(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the attester's IP address.This implementation returns the value of
ServletRequest.getRemoteAddr().- Parameters:
input- the assertion validation input- Returns:
- the IP address of the attester
-
getValidAudiences
@Nonnull @Unmodifiable @NotLive protected Set<String> getValidAudiences(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the valid audiences for attestation.This implementation returns a set containing the union of:
- the result of
getSelfEntityID(AssertionValidationInput), if non-null - the result of evaluating
getAdditionalAudiences(), if non-null
- Parameters:
input- the assertion validation input- Returns:
- set of audience URI's
- the result of
-
getSelfEntityID
@Nullable protected String getSelfEntityID(@Nonnull ValidateAssertions.AssertionValidationInput input) Deprecated.Get the self entityID.- Parameters:
input- the assertion validation input- Returns:
- the self entityID, or null if could not be resolved
-
DefaultAssertionValidationContextBuilder.