Search in sources :

Example 1 with OCSPPKIXParametersProvider

use of uk.gov.ida.common.shared.security.verification.OCSPPKIXParametersProvider in project verify-hub by alphagov.

the class ConfigModule method configure.

@Override
protected void configure() {
    bind(ConfigHealthCheck.class).asEagerSingleton();
    bind(ConfigDataBootstrap.class).asEagerSingleton();
    bind(CertificateChainConfigValidator.class).annotatedWith(CertificateConfigValidator.class).to(LoggingCertificateChainConfigValidator.class);
    bind(TrustStoreConfiguration.class).to(ConfigConfiguration.class);
    bind(new TypeLiteral<ConfigurationFactoryFactory<IdentityProviderConfigEntityData>>() {
    }).toInstance(new DefaultConfigurationFactoryFactory<IdentityProviderConfigEntityData>());
    bind(new TypeLiteral<ConfigurationFactoryFactory<TransactionConfigEntityData>>() {
    }).toInstance(new DefaultConfigurationFactoryFactory<TransactionConfigEntityData>());
    bind(new TypeLiteral<ConfigurationFactoryFactory<MatchingServiceConfigEntityData>>() {
    }).toInstance(new DefaultConfigurationFactoryFactory<MatchingServiceConfigEntityData>());
    bind(new TypeLiteral<ConfigurationFactoryFactory<CountriesConfigEntityData>>() {
    }).toInstance(new DefaultConfigurationFactoryFactory<CountriesConfigEntityData>());
    bind(new TypeLiteral<ConfigDataSource<TransactionConfigEntityData>>() {
    }).to(FileBackedTransactionConfigDataSource.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigDataSource<MatchingServiceConfigEntityData>>() {
    }).to(FileBackedMatchingServiceConfigDataSource.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigDataSource<IdentityProviderConfigEntityData>>() {
    }).to(FileBackedIdentityProviderConfigDataSource.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigDataSource<CountriesConfigEntityData>>() {
    }).to(FileBackedCountriesConfigDataSource.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigEntityDataRepository<TransactionConfigEntityData>>() {
    }).asEagerSingleton();
    bind(new TypeLiteral<ConfigEntityDataRepository<CountriesConfigEntityData>>() {
    }).asEagerSingleton();
    bind(new TypeLiteral<ConfigEntityDataRepository<MatchingServiceConfigEntityData>>() {
    }).asEagerSingleton();
    bind(new TypeLiteral<ConfigEntityDataRepository<IdentityProviderConfigEntityData>>() {
    }).asEagerSingleton();
    bind(ObjectMapper.class).toInstance(new ObjectMapper().registerModule(new GuavaModule()));
    bind(LevelsOfAssuranceConfigValidator.class).toInstance(new LevelsOfAssuranceConfigValidator());
    bind(CertificateChainValidator.class);
    bind(TrustStoreForCertificateProvider.class);
    bind(X509CertificateFactory.class).toInstance(new X509CertificateFactory());
    bind(KeyStoreCache.class);
    bind(ExceptionFactory.class);
    bind(OCSPCertificateChainValidityChecker.class);
    bind(EntityConfigDataToCertificateDtoTransformer.class);
    bind(OCSPCertificateChainValidator.class);
    bind(IdpPredicateFactory.class);
    bind(KeyStoreLoader.class).toInstance(new KeyStoreLoader());
    bind(OCSPPKIXParametersProvider.class).toInstance(new OCSPPKIXParametersProvider());
    bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
    bind(CertificateService.class);
}
Also used : TrustStoreConfiguration(uk.gov.ida.truststore.TrustStoreConfiguration) KeyStoreLoader(uk.gov.ida.truststore.KeyStoreLoader) FileBackedIdentityProviderConfigDataSource(uk.gov.ida.hub.config.data.FileBackedIdentityProviderConfigDataSource) TypeLiteral(com.google.inject.TypeLiteral) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) LevelsOfAssuranceConfigValidator(uk.gov.ida.hub.config.data.LevelsOfAssuranceConfigValidator) MatchingServiceConfigEntityData(uk.gov.ida.hub.config.domain.MatchingServiceConfigEntityData) FileBackedCountriesConfigDataSource(uk.gov.ida.hub.config.data.FileBackedCountriesConfigDataSource) OCSPPKIXParametersProvider(uk.gov.ida.common.shared.security.verification.OCSPPKIXParametersProvider) CountriesConfigEntityData(uk.gov.ida.hub.config.domain.CountriesConfigEntityData) IdentityProviderConfigEntityData(uk.gov.ida.hub.config.domain.IdentityProviderConfigEntityData) TransactionConfigEntityData(uk.gov.ida.hub.config.domain.TransactionConfigEntityData) OCSPPKIXParametersProvider(uk.gov.ida.common.shared.security.verification.OCSPPKIXParametersProvider) PKIXParametersProvider(uk.gov.ida.common.shared.security.verification.PKIXParametersProvider) GuavaModule(com.fasterxml.jackson.datatype.guava.GuavaModule) X509CertificateFactory(uk.gov.ida.common.shared.security.X509CertificateFactory) CertificateConfigValidator(uk.gov.ida.hub.config.annotations.CertificateConfigValidator) FileBackedTransactionConfigDataSource(uk.gov.ida.hub.config.data.FileBackedTransactionConfigDataSource) FileBackedMatchingServiceConfigDataSource(uk.gov.ida.hub.config.data.FileBackedMatchingServiceConfigDataSource) ConfigDataBootstrap(uk.gov.ida.hub.config.data.ConfigDataBootstrap) FileBackedCountriesConfigDataSource(uk.gov.ida.hub.config.data.FileBackedCountriesConfigDataSource) FileBackedMatchingServiceConfigDataSource(uk.gov.ida.hub.config.data.FileBackedMatchingServiceConfigDataSource) ConfigDataSource(uk.gov.ida.hub.config.data.ConfigDataSource) FileBackedTransactionConfigDataSource(uk.gov.ida.hub.config.data.FileBackedTransactionConfigDataSource) FileBackedIdentityProviderConfigDataSource(uk.gov.ida.hub.config.data.FileBackedIdentityProviderConfigDataSource) ConfigHealthCheck(uk.gov.ida.hub.config.healthcheck.ConfigHealthCheck)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 GuavaModule (com.fasterxml.jackson.datatype.guava.GuavaModule)1 TypeLiteral (com.google.inject.TypeLiteral)1 X509CertificateFactory (uk.gov.ida.common.shared.security.X509CertificateFactory)1 OCSPPKIXParametersProvider (uk.gov.ida.common.shared.security.verification.OCSPPKIXParametersProvider)1 PKIXParametersProvider (uk.gov.ida.common.shared.security.verification.PKIXParametersProvider)1 CertificateConfigValidator (uk.gov.ida.hub.config.annotations.CertificateConfigValidator)1 ConfigDataBootstrap (uk.gov.ida.hub.config.data.ConfigDataBootstrap)1 ConfigDataSource (uk.gov.ida.hub.config.data.ConfigDataSource)1 FileBackedCountriesConfigDataSource (uk.gov.ida.hub.config.data.FileBackedCountriesConfigDataSource)1 FileBackedIdentityProviderConfigDataSource (uk.gov.ida.hub.config.data.FileBackedIdentityProviderConfigDataSource)1 FileBackedMatchingServiceConfigDataSource (uk.gov.ida.hub.config.data.FileBackedMatchingServiceConfigDataSource)1 FileBackedTransactionConfigDataSource (uk.gov.ida.hub.config.data.FileBackedTransactionConfigDataSource)1 LevelsOfAssuranceConfigValidator (uk.gov.ida.hub.config.data.LevelsOfAssuranceConfigValidator)1 CountriesConfigEntityData (uk.gov.ida.hub.config.domain.CountriesConfigEntityData)1 IdentityProviderConfigEntityData (uk.gov.ida.hub.config.domain.IdentityProviderConfigEntityData)1 MatchingServiceConfigEntityData (uk.gov.ida.hub.config.domain.MatchingServiceConfigEntityData)1 TransactionConfigEntityData (uk.gov.ida.hub.config.domain.TransactionConfigEntityData)1 ConfigHealthCheck (uk.gov.ida.hub.config.healthcheck.ConfigHealthCheck)1 KeyStoreLoader (uk.gov.ida.truststore.KeyStoreLoader)1