Search in sources :

Example 1 with StringSizeValidator

use of uk.gov.ida.saml.hub.validators.StringSizeValidator 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(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(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<SamlProxyDuplicateRequestExceptionMapper>>() {
    }).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) SamlProxyExceptionMapper(uk.gov.ida.hub.samlproxy.exceptions.SamlProxyExceptionMapper) 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) SamlProxyDuplicateRequestExceptionMapper(uk.gov.ida.hub.samlproxy.exceptions.SamlProxyDuplicateRequestExceptionMapper) SamlProxyApplicationExceptionMapper(uk.gov.ida.hub.samlproxy.exceptions.SamlProxyApplicationExceptionMapper) HubSigningKeyStore(uk.gov.ida.hub.samlproxy.security.HubSigningKeyStore) SigningKeyStore(uk.gov.ida.saml.security.SigningKeyStore) ConfigServiceKeyStore(uk.gov.ida.hub.samlproxy.config.ConfigServiceKeyStore) SamlProxySamlTransformationErrorExceptionMapper(uk.gov.ida.hub.samlproxy.exceptions.SamlProxySamlTransformationErrorExceptionMapper)

Aggregations

TypeLiteral (com.google.inject.TypeLiteral)1 PublicKeyFileInputStreamFactory (uk.gov.ida.common.shared.security.PublicKeyFileInputStreamFactory)1 PublicKeyInputStreamFactory (uk.gov.ida.common.shared.security.PublicKeyInputStreamFactory)1 X509CertificateFactory (uk.gov.ida.common.shared.security.X509CertificateFactory)1 PKIXParametersProvider (uk.gov.ida.common.shared.security.verification.PKIXParametersProvider)1 ConfigServiceKeyStore (uk.gov.ida.hub.samlproxy.config.ConfigServiceKeyStore)1 NoKeyConfiguredForEntityExceptionMapper (uk.gov.ida.hub.samlproxy.exceptions.NoKeyConfiguredForEntityExceptionMapper)1 SamlProxyApplicationExceptionMapper (uk.gov.ida.hub.samlproxy.exceptions.SamlProxyApplicationExceptionMapper)1 SamlProxyDuplicateRequestExceptionMapper (uk.gov.ida.hub.samlproxy.exceptions.SamlProxyDuplicateRequestExceptionMapper)1 SamlProxyExceptionMapper (uk.gov.ida.hub.samlproxy.exceptions.SamlProxyExceptionMapper)1 SamlProxySamlTransformationErrorExceptionMapper (uk.gov.ida.hub.samlproxy.exceptions.SamlProxySamlTransformationErrorExceptionMapper)1 ProtectiveMonitoringLogFormatter (uk.gov.ida.hub.samlproxy.logging.ProtectiveMonitoringLogFormatter)1 HubSigningKeyStore (uk.gov.ida.hub.samlproxy.security.HubSigningKeyStore)1 DefaultClientProvider (uk.gov.ida.jerseyclient.DefaultClientProvider)1 RestfulClientConfiguration (uk.gov.ida.restclient.RestfulClientConfiguration)1 RelayStateValidator (uk.gov.ida.saml.core.security.RelayStateValidator)1 StringSizeValidator (uk.gov.ida.saml.hub.validators.StringSizeValidator)1 ExpiredCertificateMetadataFilter (uk.gov.ida.saml.metadata.ExpiredCertificateMetadataFilter)1 SigningKeyStore (uk.gov.ida.saml.security.SigningKeyStore)1 IpAddressResolver (uk.gov.ida.shared.utils.IpAddressResolver)1