Search in sources :

Example 1 with ExpiredCertificateMetadataFilter

use of uk.gov.ida.saml.metadata.ExpiredCertificateMetadataFilter in project verify-hub by alphagov.

the class SamlProxyModule method configure.

@Override
protected void configure() {
    bind(TrustStoreConfiguration.class).to(SamlProxyConfiguration.class);
    bind(RestfulClientConfiguration.class).to(SamlProxyConfiguration.class);
    bind(PublicKeyInputStreamFactory.class).toInstance(new PublicKeyFileInputStreamFactory());
    bind(SigningKeyStore.class).to(AuthnRequestKeyStore.class);
    bind(Client.class).toProvider(DefaultClientProvider.class).in(Scopes.SINGLETON);
    bind(EventSinkProxy.class).to(EventSinkHttpProxy.class);
    bind(KeyStore.class).toProvider(KeyStoreProvider.class).in(Scopes.SINGLETON);
    bind(ConfigServiceKeyStore.class).asEagerSingleton();
    bind(KeyStoreLoader.class).toInstance(new KeyStoreLoader());
    bind(ResponseMaxSizeValidator.class);
    bind(ExpiredCertificateMetadataFilter.class).toInstance(new ExpiredCertificateMetadataFilter());
    bind(X509CertificateFactory.class).toInstance(new X509CertificateFactory());
    bind(CertificateChainValidator.class);
    bind(CertificatesConfigProxy.class);
    bind(TrustStoreForCertificateProvider.class);
    bind(StringSizeValidator.class).toInstance(new StringSizeValidator());
    bind(JsonResponseProcessor.class);
    bind(ObjectMapper.class).toInstance(new ObjectMapper());
    bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
    bind(RelayStateValidator.class).toInstance(new RelayStateValidator());
    bind(ProtectiveMonitoringLogFormatter.class).toInstance(new ProtectiveMonitoringLogFormatter());
    bind(KeyStoreCache.class);
    bind(EventSinkMessageSender.class);
    bind(ExceptionAuditor.class);
    bind(ProtectiveMonitoringLogger.class);
    bind(SessionProxy.class);
    bind(new TypeLiteral<LevelLoggerFactory<SamlProxySamlTransformationErrorExceptionMapper>>() {
    }).toInstance(new LevelLoggerFactory<>());
    bind(new TypeLiteral<LevelLoggerFactory<NoKeyConfiguredForEntityExceptionMapper>>() {
    }).toInstance(new LevelLoggerFactory<>());
    bind(new TypeLiteral<LevelLoggerFactory<SamlProxyApplicationExceptionMapper>>() {
    }).toInstance(new LevelLoggerFactory<>());
    bind(new TypeLiteral<LevelLoggerFactory<SamlProxyExceptionMapper>>() {
    }).toInstance(new LevelLoggerFactory<>());
    bind(SamlMessageSenderHandler.class);
    bind(ExternalCommunicationEventLogger.class);
    bind(IpAddressResolver.class).toInstance(new IpAddressResolver());
}
Also used : RestfulClientConfiguration(uk.gov.ida.restclient.RestfulClientConfiguration) TrustStoreConfiguration(uk.gov.ida.truststore.TrustStoreConfiguration) ClientTrustStoreConfiguration(uk.gov.ida.truststore.ClientTrustStoreConfiguration) SamlProxyExceptionMapper(uk.gov.ida.hub.samlproxy.exceptions.SamlProxyExceptionMapper) KeyStoreProvider(uk.gov.ida.truststore.KeyStoreProvider) KeyStoreLoader(uk.gov.ida.truststore.KeyStoreLoader) ExpiredCertificateMetadataFilter(uk.gov.ida.saml.metadata.ExpiredCertificateMetadataFilter) DefaultClientProvider(uk.gov.ida.jerseyclient.DefaultClientProvider) PublicKeyInputStreamFactory(uk.gov.ida.common.shared.security.PublicKeyInputStreamFactory) PKIXParametersProvider(uk.gov.ida.common.shared.security.verification.PKIXParametersProvider) StringSizeValidator(uk.gov.ida.saml.hub.validators.StringSizeValidator) NoKeyConfiguredForEntityExceptionMapper(uk.gov.ida.hub.samlproxy.exceptions.NoKeyConfiguredForEntityExceptionMapper) IpAddressResolver(uk.gov.ida.shared.utils.IpAddressResolver) X509CertificateFactory(uk.gov.ida.common.shared.security.X509CertificateFactory) RelayStateValidator(uk.gov.ida.saml.core.security.RelayStateValidator) ProtectiveMonitoringLogFormatter(uk.gov.ida.hub.samlproxy.logging.ProtectiveMonitoringLogFormatter) PublicKeyFileInputStreamFactory(uk.gov.ida.common.shared.security.PublicKeyFileInputStreamFactory) TypeLiteral(com.google.inject.TypeLiteral) SamlProxyApplicationExceptionMapper(uk.gov.ida.hub.samlproxy.exceptions.SamlProxyApplicationExceptionMapper) HubSigningKeyStore(uk.gov.ida.hub.samlproxy.security.HubSigningKeyStore) SigningKeyStore(uk.gov.ida.saml.security.SigningKeyStore) EventSinkProxy(uk.gov.ida.eventsink.EventSinkProxy) ConfigServiceKeyStore(uk.gov.ida.hub.samlproxy.config.ConfigServiceKeyStore) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) SamlProxySamlTransformationErrorExceptionMapper(uk.gov.ida.hub.samlproxy.exceptions.SamlProxySamlTransformationErrorExceptionMapper)

Example 2 with ExpiredCertificateMetadataFilter

use of uk.gov.ida.saml.metadata.ExpiredCertificateMetadataFilter in project verify-hub by alphagov.

the class SamlEngineModule method configure.

@Override
protected void configure() {
    bind(TrustStoreConfiguration.class).to(SamlEngineConfiguration.class);
    bind(RestfulClientConfiguration.class).to(SamlEngineConfiguration.class);
    bind(SamlDuplicateRequestValidationConfiguration.class).to(SamlEngineConfiguration.class);
    bind(SamlAuthnRequestValidityDurationConfiguration.class).to(SamlEngineConfiguration.class);
    bind(Client.class).toProvider(DefaultClientProvider.class).asEagerSingleton();
    bind(EntityToEncryptForLocator.class).to(AssignableEntityToEncryptForLocator.class);
    bind(AssignableEntityToEncryptForLocator.class).asEagerSingleton();
    bind(InfinispanStartupTasks.class).asEagerSingleton();
    bind(ConfigServiceKeyStore.class).asEagerSingleton();
    bind(JsonResponseProcessor.class);
    bind(RpErrorResponseGeneratorService.class);
    bind(TransactionsConfigProxy.class);
    bind(MatchingServiceHealthcheckRequestGeneratorService.class);
    bind(ObjectMapper.class).toInstance(new ObjectMapper());
    bind(ExpiredCertificateMetadataFilter.class).toInstance(new ExpiredCertificateMetadataFilter());
    bind(new TypeLiteral<LevelLoggerFactory<SamlEngineExceptionMapper>>() {
    }).toInstance(new LevelLoggerFactory<>());
    bind(OutboundResponseFromHubToResponseTransformerFactory.class);
    bind(SimpleProfileOutboundResponseFromHubToResponseTransformerProvider.class);
    bind(SimpleProfileOutboundResponseFromHubToSamlResponseTransformer.class);
    bind(ResponseToUnsignedStringTransformer.class);
    bind(ResponseAssertionSigner.class);
    bind(SimpleProfileTransactionIdaStatusMarshaller.class);
    bind(IdpAuthnResponseTranslatorService.class);
    bind(InboundResponseFromIdpDataGenerator.class);
    bind(MatchingServiceRequestGeneratorService.class);
    bind(HubAttributeQueryRequestBuilder.class);
    bind(MatchingServiceResponseTranslatorService.class);
    bind(RpAuthnRequestTranslatorService.class);
    bind(RpAuthnResponseGeneratorService.class);
    bind(IdpAuthnRequestGeneratorService.class);
    bind(CountrySingleSignOnServiceHelper.class);
    bind(IdaAuthnRequestTranslator.class);
    bind(EidasAuthnRequestTranslator.class);
    bind(MatchingServiceHealthcheckResponseTranslatorService.class);
}
Also used : SamlDuplicateRequestValidationConfiguration(uk.gov.ida.saml.hub.configuration.SamlDuplicateRequestValidationConfiguration) RestfulClientConfiguration(uk.gov.ida.restclient.RestfulClientConfiguration) TrustStoreConfiguration(uk.gov.ida.truststore.TrustStoreConfiguration) ClientTrustStoreConfiguration(uk.gov.ida.truststore.ClientTrustStoreConfiguration) ExpiredCertificateMetadataFilter(uk.gov.ida.saml.metadata.ExpiredCertificateMetadataFilter) DefaultClientProvider(uk.gov.ida.jerseyclient.DefaultClientProvider) SamlAuthnRequestValidityDurationConfiguration(uk.gov.ida.saml.hub.configuration.SamlAuthnRequestValidityDurationConfiguration) EntityToEncryptForLocator(uk.gov.ida.saml.security.EntityToEncryptForLocator) AssignableEntityToEncryptForLocator(uk.gov.ida.hub.samlengine.locators.AssignableEntityToEncryptForLocator) TypeLiteral(com.google.inject.TypeLiteral) AssignableEntityToEncryptForLocator(uk.gov.ida.hub.samlengine.locators.AssignableEntityToEncryptForLocator) ConfigServiceKeyStore(uk.gov.ida.hub.samlengine.config.ConfigServiceKeyStore) SamlEngineExceptionMapper(uk.gov.ida.hub.samlengine.exceptions.SamlEngineExceptionMapper) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 3 with ExpiredCertificateMetadataFilter

use of uk.gov.ida.saml.metadata.ExpiredCertificateMetadataFilter in project verify-hub by alphagov.

the class SamlSoapProxyModule method configure.

@Override
protected void configure() {
    bind(TrustStoreConfiguration.class).to(SamlSoapProxyConfiguration.class);
    bind(EventSinkProxy.class).to(EventSinkHttpProxy.class);
    bind(PublicKeyInputStreamFactory.class).toInstance(new PublicKeyFileInputStreamFactory());
    bind(InternalPublicKeyStore.class).to(HubMetadataPublicKeyStore.class);
    bind(RestfulClientConfiguration.class).to(SamlSoapProxyConfiguration.class);
    bind(Client.class).toProvider(DefaultClientProvider.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigurationFactoryFactory<SupportedMsaVersions>>() {
    }).toInstance(new DefaultConfigurationFactoryFactory<SupportedMsaVersions>() {
    });
    bind(new TypeLiteral<SupportedMsaVersionsRepository>() {
    }).asEagerSingleton();
    bind(SupportedMsaVersionsBootstrap.class).asEagerSingleton();
    bind(SupportedMsaVersionsLoader.class).asEagerSingleton();
    bind(MetadataRefreshTask.class).asEagerSingleton();
    bind(ConfigServiceKeyStore.class).asEagerSingleton();
    bind(ExpiredCertificateMetadataFilter.class).toInstance(new ExpiredCertificateMetadataFilter());
    bind(UrlConfigurationSourceProvider.class).toInstance(new UrlConfigurationSourceProvider());
    bind(TrustStoreForCertificateProvider.class);
    bind(JsonResponseProcessor.class);
    bind(ObjectMapper.class).toInstance(new ObjectMapper());
    bind(X509CertificateFactory.class).toInstance(new X509CertificateFactory());
    bind(CertificateChainValidator.class);
    bind(CertificatesConfigProxy.class);
    bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
    bind(KeyStoreCache.class);
    bind(KeyStoreLoader.class).toInstance(new KeyStoreLoader());
    bind(MatchingServiceHealthCheckHandler.class);
    bind(MatchingServiceHealthChecker.class);
    bind(MatchingServiceConfigProxy.class);
    bind(MatchingServiceHealthCheckClient.class);
    bind(HealthCheckEventLogger.class);
    bind(SamlEngineProxy.class);
    bind(HealthCheckSoapRequestClient.class);
    bind(AttributeQueryRequestRunnableFactory.class);
    bind(ExecuteAttributeQueryRequest.class);
    bind(AttributeQueryRequestClient.class);
    bind(ProtectiveMonitoringLogger.class).toInstance(new ProtectiveMonitoringLogger());
    bind(SoapRequestClient.class);
    bind(HubMatchingServiceResponseReceiverProxy.class);
    bind(ExternalCommunicationEventLogger.class);
    bind(SoapMessageManager.class).toInstance(new SoapMessageManager());
    bind(IpAddressResolver.class).toInstance(new IpAddressResolver());
    bind(TimeoutEvaluator.class).toInstance(new TimeoutEvaluator());
    bind(MetadataHealthCheckRegistry.class).asEagerSingleton();
}
Also used : MetadataRefreshTask(uk.gov.ida.saml.metadata.MetadataRefreshTask) TrustStoreConfiguration(uk.gov.ida.truststore.TrustStoreConfiguration) KeyStoreLoader(uk.gov.ida.truststore.KeyStoreLoader) ExpiredCertificateMetadataFilter(uk.gov.ida.saml.metadata.ExpiredCertificateMetadataFilter) SupportedMsaVersions(uk.gov.ida.hub.samlsoapproxy.healthcheck.SupportedMsaVersions) PublicKeyInputStreamFactory(uk.gov.ida.common.shared.security.PublicKeyInputStreamFactory) InternalPublicKeyStore(uk.gov.ida.saml.core.InternalPublicKeyStore) IpAddressResolver(uk.gov.ida.shared.utils.IpAddressResolver) MetadataHealthCheckRegistry(uk.gov.ida.hub.samlsoapproxy.health.MetadataHealthCheckRegistry) TypeLiteral(com.google.inject.TypeLiteral) ConfigServiceKeyStore(uk.gov.ida.hub.samlsoapproxy.config.ConfigServiceKeyStore) TimeoutEvaluator(uk.gov.ida.hub.samlsoapproxy.domain.TimeoutEvaluator) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) RestfulClientConfiguration(uk.gov.ida.restclient.RestfulClientConfiguration) DefaultClientProvider(uk.gov.ida.jerseyclient.DefaultClientProvider) SupportedMsaVersionsBootstrap(uk.gov.ida.hub.samlsoapproxy.healthcheck.SupportedMsaVersionsBootstrap) PKIXParametersProvider(uk.gov.ida.common.shared.security.verification.PKIXParametersProvider) SoapMessageManager(uk.gov.ida.hub.samlsoapproxy.soap.SoapMessageManager) X509CertificateFactory(uk.gov.ida.common.shared.security.X509CertificateFactory) ProtectiveMonitoringLogger(uk.gov.ida.hub.samlsoapproxy.logging.ProtectiveMonitoringLogger) PublicKeyFileInputStreamFactory(uk.gov.ida.common.shared.security.PublicKeyFileInputStreamFactory) SupportedMsaVersionsLoader(uk.gov.ida.hub.samlsoapproxy.healthcheck.SupportedMsaVersionsLoader) UrlConfigurationSourceProvider(io.dropwizard.configuration.UrlConfigurationSourceProvider) EventSinkProxy(uk.gov.ida.eventsink.EventSinkProxy)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 TypeLiteral (com.google.inject.TypeLiteral)3 DefaultClientProvider (uk.gov.ida.jerseyclient.DefaultClientProvider)3 RestfulClientConfiguration (uk.gov.ida.restclient.RestfulClientConfiguration)3 ExpiredCertificateMetadataFilter (uk.gov.ida.saml.metadata.ExpiredCertificateMetadataFilter)3 TrustStoreConfiguration (uk.gov.ida.truststore.TrustStoreConfiguration)3 PublicKeyFileInputStreamFactory (uk.gov.ida.common.shared.security.PublicKeyFileInputStreamFactory)2 PublicKeyInputStreamFactory (uk.gov.ida.common.shared.security.PublicKeyInputStreamFactory)2 X509CertificateFactory (uk.gov.ida.common.shared.security.X509CertificateFactory)2 PKIXParametersProvider (uk.gov.ida.common.shared.security.verification.PKIXParametersProvider)2 EventSinkProxy (uk.gov.ida.eventsink.EventSinkProxy)2 IpAddressResolver (uk.gov.ida.shared.utils.IpAddressResolver)2 ClientTrustStoreConfiguration (uk.gov.ida.truststore.ClientTrustStoreConfiguration)2 KeyStoreLoader (uk.gov.ida.truststore.KeyStoreLoader)2 UrlConfigurationSourceProvider (io.dropwizard.configuration.UrlConfigurationSourceProvider)1 ConfigServiceKeyStore (uk.gov.ida.hub.samlengine.config.ConfigServiceKeyStore)1 SamlEngineExceptionMapper (uk.gov.ida.hub.samlengine.exceptions.SamlEngineExceptionMapper)1 AssignableEntityToEncryptForLocator (uk.gov.ida.hub.samlengine.locators.AssignableEntityToEncryptForLocator)1 ConfigServiceKeyStore (uk.gov.ida.hub.samlproxy.config.ConfigServiceKeyStore)1 NoKeyConfiguredForEntityExceptionMapper (uk.gov.ida.hub.samlproxy.exceptions.NoKeyConfiguredForEntityExceptionMapper)1