use of uk.gov.ida.saml.security.EncrypterFactory in project verify-hub by alphagov.
the class AuthnRequestFromRelyingPartyUnmarshallerTest method setUp.
@BeforeAll
public static void setUp() {
final BasicCredential basicCredential = createBasicCredential();
encrypter = new EncrypterFactory().createEncrypter(basicCredential);
unmarshaller = new AuthnRequestFromRelyingPartyUnmarshaller(new DecrypterFactory().createDecrypter(List.of(basicCredential)));
}
use of uk.gov.ida.saml.security.EncrypterFactory in project verify-hub by alphagov.
the class MsaTransformersFactory method getResponseToElementTransformer.
public ResponseToElementTransformer getResponseToElementTransformer(EncryptionKeyStore encryptionKeyStore, IdaKeyStore keyStore, EntityToEncryptForLocator entityToEncryptForLocator, SignatureAlgorithm signatureAlgorithm, DigestAlgorithm digestAlgorithm) {
SignatureFactory signatureFactory = new SignatureFactory(new IdaKeyStoreCredentialRetriever(keyStore), signatureAlgorithm, digestAlgorithm);
SamlResponseAssertionEncrypter assertionEncrypter = new SamlResponseAssertionEncrypter(new KeyStoreBackedEncryptionCredentialResolver(encryptionKeyStore), new EncrypterFactory(), entityToEncryptForLocator);
return new ResponseToElementTransformer(new XmlObjectToElementTransformer<>(), new SamlSignatureSigner<>(), assertionEncrypter, new ResponseAssertionSigner(signatureFactory), new ResponseSignatureCreator(signatureFactory));
}
use of uk.gov.ida.saml.security.EncrypterFactory in project verify-hub by alphagov.
the class CryptoModule method configure.
@Override
protected void configure() {
bind(EncryptionKeyStore.class).to(HubEncryptionKeyStore.class).asEagerSingleton();
bind(SigningKeyStore.class).annotatedWith(Names.named("authnRequestKeyStore")).to(AuthnRequestKeyStore.class).asEagerSingleton();
bind(SigningKeyStore.class).annotatedWith(Names.named("samlResponseFromMatchingServiceKeyStore")).to(SamlResponseFromMatchingServiceKeyStore.class).asEagerSingleton();
bind(X509CertificateFactory.class).toInstance(new X509CertificateFactory());
bind(CertificateChainValidator.class);
bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
bind(CertificatesConfigProxy.class);
bind(TrustStoreForCertificateProvider.class);
bind(KeyStoreCache.class);
bind(KeyStoreLoader.class).toInstance(new KeyStoreLoader());
bind(AssertionBlobEncrypter.class);
bind(EncrypterFactory.class).toInstance(new EncrypterFactory());
bind(SignatureAlgorithm.class).toInstance(new SignatureRSASHA1());
bind(DigestAlgorithm.class).toInstance(new DigestSHA256());
}
Aggregations