Search in sources :

Example 11 with DefaultKeyVaultConfig

use of com.quorum.tessera.config.DefaultKeyVaultConfig in project tessera by ConsenSys.

the class KeyVaultConfigValidatorTest method validAzureConfig.

@Test
public void validAzureConfig() {
    DefaultKeyVaultConfig config = new DefaultKeyVaultConfig();
    config.setKeyVaultType(KeyVaultType.AZURE);
    config.setProperty("url", "someurl");
    assertThat(keyVaultConfigValidator.isValid(config, context)).isTrue();
}
Also used : DefaultKeyVaultConfig(com.quorum.tessera.config.DefaultKeyVaultConfig) Test(org.junit.Test)

Example 12 with DefaultKeyVaultConfig

use of com.quorum.tessera.config.DefaultKeyVaultConfig in project tessera by ConsenSys.

the class KeyVaultConfigValidatorTest method validAWSConfig.

@Test
public void validAWSConfig() {
    DefaultKeyVaultConfig config = new DefaultKeyVaultConfig();
    config.setKeyVaultType(KeyVaultType.AWS);
    config.setProperty("endpoint", "http://someurl");
    assertThat(keyVaultConfigValidator.isValid(config, context)).isTrue();
}
Also used : DefaultKeyVaultConfig(com.quorum.tessera.config.DefaultKeyVaultConfig) Test(org.junit.Test)

Aggregations

DefaultKeyVaultConfig (com.quorum.tessera.config.DefaultKeyVaultConfig)12 Test (org.junit.Test)10 Path (java.nio.file.Path)2 EncryptorConfig (com.quorum.tessera.config.EncryptorConfig)1 KeyConfiguration (com.quorum.tessera.config.KeyConfiguration)1 KeyVaultConfig (com.quorum.tessera.config.KeyVaultConfig)1 KeyVaultType (com.quorum.tessera.config.KeyVaultType)1 AzureVaultKeyPair (com.quorum.tessera.config.keypairs.AzureVaultKeyPair)1 ConfigKeyPair (com.quorum.tessera.config.keypairs.ConfigKeyPair)1 KeyVaultService (com.quorum.tessera.key.vault.KeyVaultService)1 KeyVaultServiceFactory (com.quorum.tessera.key.vault.KeyVaultServiceFactory)1 ConstraintValidator (jakarta.validation.ConstraintValidator)1 ConstraintValidatorContext (jakarta.validation.ConstraintValidatorContext)1 ConstraintViolation (jakarta.validation.ConstraintViolation)1 Paths (java.nio.file.Paths)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Optional (java.util.Optional)1