Search in sources :

Example 1 with GeneralIdentityZoneValidator

use of org.cloudfoundry.identity.uaa.zone.GeneralIdentityZoneValidator in project uaa by cloudfoundry.

the class IdentityZoneConfigurationBootstrapTests method configureProvisioning.

@BeforeEach
public void configureProvisioning(@Autowired JdbcTemplate jdbcTemplate) {
    TestUtils.cleanAndSeedDb(jdbcTemplate);
    provisioning = new JdbcIdentityZoneProvisioning(jdbcTemplate);
    bootstrap = new IdentityZoneConfigurationBootstrap(provisioning);
    GeneralMfaProviderValidator mfaProviderValidator = new GeneralMfaProviderValidator();
    MfaProviderProvisioning mfaProvisoning = new JdbcMfaProviderProvisioning(jdbcTemplate, mfaProviderValidator);
    MfaProvider<GoogleMfaProviderConfig> provider = new MfaProvider<>();
    provider.setName("testProvider");
    provider.setType(MfaProvider.MfaProviderType.GOOGLE_AUTHENTICATOR);
    provider.setConfig(new GoogleMfaProviderConfig());
    provider.setIdentityZoneId("uaa");
    mfaProvisoning.create(provider, "uaa");
    MfaConfigValidator mfaConfigValidator = new MfaConfigValidator(mfaProvisoning);
    GeneralIdentityZoneConfigurationValidator configValidator = new GeneralIdentityZoneConfigurationValidator(mfaConfigValidator);
    validator = new GeneralIdentityZoneValidator(configValidator);
    bootstrap.setValidator(validator);
    // For the SamlTestUtils keys we are using.
    Security.addProvider(new BouncyCastleProvider());
}
Also used : MfaProvider(org.cloudfoundry.identity.uaa.mfa.MfaProvider) JdbcMfaProviderProvisioning(org.cloudfoundry.identity.uaa.mfa.JdbcMfaProviderProvisioning) IdentityZoneConfigurationBootstrap(org.cloudfoundry.identity.uaa.impl.config.IdentityZoneConfigurationBootstrap) GeneralIdentityZoneConfigurationValidator(org.cloudfoundry.identity.uaa.zone.GeneralIdentityZoneConfigurationValidator) MfaProviderProvisioning(org.cloudfoundry.identity.uaa.mfa.MfaProviderProvisioning) JdbcMfaProviderProvisioning(org.cloudfoundry.identity.uaa.mfa.JdbcMfaProviderProvisioning) GeneralIdentityZoneValidator(org.cloudfoundry.identity.uaa.zone.GeneralIdentityZoneValidator) GoogleMfaProviderConfig(org.cloudfoundry.identity.uaa.mfa.GoogleMfaProviderConfig) JdbcIdentityZoneProvisioning(org.cloudfoundry.identity.uaa.zone.JdbcIdentityZoneProvisioning) MfaConfigValidator(org.cloudfoundry.identity.uaa.zone.MfaConfigValidator) GeneralMfaProviderValidator(org.cloudfoundry.identity.uaa.mfa.GeneralMfaProviderValidator) BouncyCastleProvider(org.bouncycastle.jce.provider.BouncyCastleProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BouncyCastleProvider (org.bouncycastle.jce.provider.BouncyCastleProvider)1 IdentityZoneConfigurationBootstrap (org.cloudfoundry.identity.uaa.impl.config.IdentityZoneConfigurationBootstrap)1 GeneralMfaProviderValidator (org.cloudfoundry.identity.uaa.mfa.GeneralMfaProviderValidator)1 GoogleMfaProviderConfig (org.cloudfoundry.identity.uaa.mfa.GoogleMfaProviderConfig)1 JdbcMfaProviderProvisioning (org.cloudfoundry.identity.uaa.mfa.JdbcMfaProviderProvisioning)1 MfaProvider (org.cloudfoundry.identity.uaa.mfa.MfaProvider)1 MfaProviderProvisioning (org.cloudfoundry.identity.uaa.mfa.MfaProviderProvisioning)1 GeneralIdentityZoneConfigurationValidator (org.cloudfoundry.identity.uaa.zone.GeneralIdentityZoneConfigurationValidator)1 GeneralIdentityZoneValidator (org.cloudfoundry.identity.uaa.zone.GeneralIdentityZoneValidator)1 JdbcIdentityZoneProvisioning (org.cloudfoundry.identity.uaa.zone.JdbcIdentityZoneProvisioning)1 MfaConfigValidator (org.cloudfoundry.identity.uaa.zone.MfaConfigValidator)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1