mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 17:37:13 +02:00
Allow choice of Keyring to be configured in YAML
This uses a Dagger-provided map of Keyring implementations, with two currently available, "KMS" and "Dummy". The active keyring is configured in the YAML file, so we no longer require MOE directives to choose which one to use for internal/external builds. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=216898058
This commit is contained in:
parent
3bb525349f
commit
bec7a91cfc
18 changed files with 124 additions and 30 deletions
|
@ -1021,6 +1021,12 @@ public final class RegistryConfig {
|
|||
return config.registryPolicy.greetingServerId;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Config("activeKeyring")
|
||||
public static String provideKeyring(RegistryConfigSettings config) {
|
||||
return config.keyring.activeKeyring;
|
||||
}
|
||||
|
||||
/**
|
||||
* The name to use for the Cloud KMS KeyRing containing encryption keys for Nomulus secrets.
|
||||
*
|
||||
|
@ -1030,13 +1036,13 @@ public final class RegistryConfig {
|
|||
@Provides
|
||||
@Config("cloudKmsKeyRing")
|
||||
public static String provideCloudKmsKeyRing(RegistryConfigSettings config) {
|
||||
return config.kms.keyringName;
|
||||
return config.keyring.kms.keyringName;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Config("cloudKmsProjectId")
|
||||
public static String provideCloudKmsProjectId(RegistryConfigSettings config) {
|
||||
return config.kms.projectId;
|
||||
return config.keyring.kms.projectId;
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue