-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure secp bulk loading #850
Conversation
… used in the test. And remove multiple signing test as this doesn't add any value
…e key in BLS mode
…xecutorService if doesn't already exist
final Optional<String> hexKey = azureKeyVault.fetchSecret(SECRET_NAME); | ||
Assertions.assertThat(hexKey).isNotEmpty().get().isEqualTo(EXPECTED_KEY); | ||
} | ||
|
||
@Test | ||
void connectingWithInvalidClientSecretThrowsException() { | ||
final AzureKeyVault azureKeyVault = | ||
createUsingClientSecretCredentials(CLIENT_ID, "invalid", TENANT_ID, VAULT_NAME); | ||
createUsingClientSecretCredentials( | ||
CLIENT_ID, "invalid", TENANT_ID, VAULT_NAME, azureExecutor); |
Check failure
Code scanning / CodeQL
Hard-coded credential in API call
…st works with AT ThreadRunner
void createsExecutorWhenUsingClientSecretMode() { | ||
azureKeyVaultFactory.createAzureKeyVault( | ||
"clientId", | ||
"clientSecret", |
Check failure
Code scanning / CodeQL
Hard-coded credential in API call
void reusesExecutorWhenUsingClientSecretMode() { | ||
azureKeyVaultFactory.createAzureKeyVault( | ||
"clientId", | ||
"clientSecret", |
Check failure
Code scanning / CodeQL
Hard-coded credential in API call
|
||
azureKeyVaultFactory.createAzureKeyVault( | ||
"clientId", | ||
"clientSecret", |
Check failure
Code scanning / CodeQL
Hard-coded credential in API call
void doesNotCreateExecutorWhenUsingUserAssignedMode() { | ||
azureKeyVaultFactory.createAzureKeyVault( | ||
"clientId", | ||
"clientSecret", |
Check failure
Code scanning / CodeQL
Hard-coded credential in API call
void doesNotCreateExecutorWhenUsingSystemAssignedMode() { | ||
azureKeyVaultFactory.createAzureKeyVault( | ||
"clientId", | ||
"clientSecret", |
Check failure
Code scanning / CodeQL
Hard-coded credential in API call
signing/src/test/java/tech/pegasys/web3signer/signing/config/AzureKeyVaultFactoryTest.java
Fixed
Show fixed
Hide fixed
import org.junit.jupiter.api.AfterEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class AzureKeyVaultFactoryTest { |
Check notice
Code scanning / CodeQL
Unused classes and interfaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good test coverage 👍
Just some nits really.
...ests/src/test/java/tech/pegasys/web3signer/tests/slashing/SlashingPruningAcceptanceTest.java
Show resolved
Hide resolved
commandline/src/main/java/tech/pegasys/web3signer/commandline/subcommands/ModeSubCommand.java
Show resolved
Hide resolved
core/src/main/java/tech/pegasys/web3signer/core/Eth1Runner.java
Outdated
Show resolved
Hide resolved
signing/src/main/java/tech/pegasys/web3signer/signing/config/SignerLoader.java
Outdated
Show resolved
Hide resolved
signing/src/main/java/tech/pegasys/web3signer/signing/config/AzureKeyVaultFactory.java
Show resolved
Hide resolved
return executorServiceCache.updateAndGet( | ||
e -> | ||
Objects.requireNonNullElseGet( | ||
e, () -> Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit/musing: could potentially simplify by using a ConcurrentHashMap, but with the downside of a redundant key name. Don't think it's worth it, was just an interesting pattern to review...
return executorServiceCache.computeIfAbsent(
"key",
e -> Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()));
signing/src/main/java/tech/pegasys/web3signer/signing/secp256k1/azure/AzureKeyVaultSigner.java
Show resolved
Hide resolved
...sts/src/test/java/tech/pegasys/web3signer/dsl/signer/runner/CmdLineParamsConfigFileImpl.java
Show resolved
Hide resolved
...sts/src/test/java/tech/pegasys/web3signer/tests/bulkloading/AzureKeyVaultAcceptanceTest.java
Show resolved
Hide resolved
core/src/main/java/tech/pegasys/web3signer/core/Eth1Runner.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nits, otherwise lgtm
signing/src/main/java/tech/pegasys/web3signer/signing/secp256k1/azure/AzureConfig.java
Outdated
Show resolved
Hide resolved
...g/src/test/java/tech/pegasys/web3signer/signing/secp256k1/azure/AzureKeyVaultSignerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Runners are much more comprehensible now 👍
PR Description
Add bulk loading of secp keys to the eth1 mode of Web3Signer.
This adds the following new command line options to web3signer eth1 subcommand:
Changes
Fixed Issue(s)
fixes #832
Documentation
doc-change-required
label to this PR if updates are required.Changelog
Testing