use of tech.pegasys.web3signer.dsl.utils.DefaultAzureKeyVaultParameters in project web3signer by ConsenSys.
the class AzureKeyVaultAcceptanceTest method invalidVaultParametersFailsToStartSigner.
@Test
void invalidVaultParametersFailsToStartSigner() {
final AzureKeyVaultParameters azureParams = new DefaultAzureKeyVaultParameters("nonExistentVault", CLIENT_ID, TENANT_ID, CLIENT_SECRET);
final SignerConfigurationBuilder configBuilder = new SignerConfigurationBuilder().withMode("eth2").withAzureKeyVaultParameters(azureParams).withHttpPort(// required to prevent waiting for ports file.
9000);
final Signer signer = new Signer(configBuilder.build(), null);
signer.start();
waitFor(30, () -> assertThat(signer.isRunning()).isTrue());
waitFor(30, () -> assertThat(signer.isRunning()).isFalse());
}
use of tech.pegasys.web3signer.dsl.utils.DefaultAzureKeyVaultParameters in project web3signer by ConsenSys.
the class AzureKeyVaultAcceptanceTest method ensureSecretsInKeyVaultAreLoadedAndReportedViaPublicKeysApi.
@Test
void ensureSecretsInKeyVaultAreLoadedAndReportedViaPublicKeysApi() {
final AzureKeyVaultParameters azureParams = new DefaultAzureKeyVaultParameters(VAULT_NAME, CLIENT_ID, TENANT_ID, CLIENT_SECRET);
final SignerConfigurationBuilder configBuilder = new SignerConfigurationBuilder().withMode("eth2").withAzureKeyVaultParameters(azureParams);
startSigner(configBuilder.build());
final Response response = signer.callApiPublicKeys(KeyType.BLS);
response.then().statusCode(200).contentType(ContentType.JSON).body("", contains(EXPECTED_KEY));
}
use of tech.pegasys.web3signer.dsl.utils.DefaultAzureKeyVaultParameters in project web3signer by ConsenSys.
the class AzureKeyVaultAcceptanceTest method invalidVaultParametersFailsToStartSigner.
@Test
void invalidVaultParametersFailsToStartSigner() {
final AzureKeyVaultParameters azureParams = new DefaultAzureKeyVaultParameters("nonExistentVault", CLIENT_ID, TENANT_ID, CLIENT_SECRET);
final SignerConfigurationBuilder configBuilder = new SignerConfigurationBuilder().withMode("eth2").withAzureKeyVaultParameters(azureParams).withHttpPort(// required to prevent waiting for ports file.
9000);
final Signer signer = new Signer(configBuilder.build(), null);
signer.start();
waitFor(30, () -> assertThat(signer.isRunning()).isTrue());
waitFor(30, () -> assertThat(signer.isRunning()).isFalse());
}
use of tech.pegasys.web3signer.dsl.utils.DefaultAzureKeyVaultParameters in project web3signer by ConsenSys.
the class AzureKeyVaultAcceptanceTest method ensureSecretsInKeyVaultAreLoadedAndReportedViaPublicKeysApi.
@Test
void ensureSecretsInKeyVaultAreLoadedAndReportedViaPublicKeysApi() {
final AzureKeyVaultParameters azureParams = new DefaultAzureKeyVaultParameters(VAULT_NAME, CLIENT_ID, TENANT_ID, CLIENT_SECRET);
final SignerConfigurationBuilder configBuilder = new SignerConfigurationBuilder().withMode("eth2").withAzureKeyVaultParameters(azureParams);
startSigner(configBuilder.build());
final Response response = signer.callApiPublicKeys(KeyType.BLS);
response.then().statusCode(200).contentType(ContentType.JSON).body("", contains(EXPECTED_KEY));
}
Aggregations