Search in sources :

Example 1 with AuthnRequestIssueInstantValidator

use of uk.gov.ida.saml.hub.validators.authnrequest.AuthnRequestIssueInstantValidator in project verify-hub by alphagov.

the class HubTransformersFactory method getAuthnRequestToAuthnRequestFromTransactionTransformer.

public AuthnRequestToIdaRequestFromRelyingPartyTransformer getAuthnRequestToAuthnRequestFromTransactionTransformer(final URI expectedDestinationHost, final SigningKeyStore signingKeyStore, final IdaKeyStore decryptionKeyStore, final IdExpirationCache duplicateIds, final SamlDuplicateRequestValidationConfiguration samlDuplicateRequestValidationConfiguration, final SamlAuthnRequestValidityDurationConfiguration samlAuthnRequestValidityDurationConfiguration) {
    List<Credential> credential = new IdaKeyStoreCredentialRetriever(decryptionKeyStore).getDecryptingCredentials();
    Decrypter decrypter = decrypterFactory.createDecrypter(credential);
    return new AuthnRequestToIdaRequestFromRelyingPartyTransformer(new AuthnRequestFromRelyingPartyUnmarshaller(decrypter), coreTransformersFactory.getSamlRequestSignatureValidator(signingKeyStore), new DestinationValidator(expectedDestinationHost, Endpoints.SSO_REQUEST_ENDPOINT), new AuthnRequestFromTransactionValidator(new IssuerValidator(), new DuplicateAuthnRequestValidator(duplicateIds, samlDuplicateRequestValidationConfiguration), new AuthnRequestIssueInstantValidator(samlAuthnRequestValidityDurationConfiguration)));
}
Also used : Credential(org.opensaml.security.credential.Credential) IdaKeyStoreCredentialRetriever(uk.gov.ida.saml.security.IdaKeyStoreCredentialRetriever) IssuerValidator(uk.gov.ida.saml.security.validators.issuer.IssuerValidator) AuthnRequestFromRelyingPartyUnmarshaller(uk.gov.ida.saml.hub.transformers.inbound.AuthnRequestFromRelyingPartyUnmarshaller) DuplicateAuthnRequestValidator(uk.gov.ida.saml.hub.validators.authnrequest.DuplicateAuthnRequestValidator) Decrypter(org.opensaml.saml.saml2.encryption.Decrypter) AssertionDecrypter(uk.gov.ida.saml.security.AssertionDecrypter) AuthnRequestToIdaRequestFromRelyingPartyTransformer(uk.gov.ida.saml.hub.transformers.inbound.AuthnRequestToIdaRequestFromRelyingPartyTransformer) AuthnRequestIssueInstantValidator(uk.gov.ida.saml.hub.validators.authnrequest.AuthnRequestIssueInstantValidator) AuthnRequestFromTransactionValidator(uk.gov.ida.saml.hub.validators.authnrequest.AuthnRequestFromTransactionValidator) DestinationValidator(uk.gov.ida.saml.core.validators.DestinationValidator)

Aggregations

Decrypter (org.opensaml.saml.saml2.encryption.Decrypter)1 Credential (org.opensaml.security.credential.Credential)1 DestinationValidator (uk.gov.ida.saml.core.validators.DestinationValidator)1 AuthnRequestFromRelyingPartyUnmarshaller (uk.gov.ida.saml.hub.transformers.inbound.AuthnRequestFromRelyingPartyUnmarshaller)1 AuthnRequestToIdaRequestFromRelyingPartyTransformer (uk.gov.ida.saml.hub.transformers.inbound.AuthnRequestToIdaRequestFromRelyingPartyTransformer)1 AuthnRequestFromTransactionValidator (uk.gov.ida.saml.hub.validators.authnrequest.AuthnRequestFromTransactionValidator)1 AuthnRequestIssueInstantValidator (uk.gov.ida.saml.hub.validators.authnrequest.AuthnRequestIssueInstantValidator)1 DuplicateAuthnRequestValidator (uk.gov.ida.saml.hub.validators.authnrequest.DuplicateAuthnRequestValidator)1 AssertionDecrypter (uk.gov.ida.saml.security.AssertionDecrypter)1 IdaKeyStoreCredentialRetriever (uk.gov.ida.saml.security.IdaKeyStoreCredentialRetriever)1 IssuerValidator (uk.gov.ida.saml.security.validators.issuer.IssuerValidator)1