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:
mcilwain 2018-10-12 11:55:23 -07:00 committed by Ben McIlwain
parent 3bb525349f
commit bec7a91cfc
18 changed files with 124 additions and 30 deletions

View file

@ -34,7 +34,7 @@ public class RegistryConfigSettings {
public Monitoring monitoring;
public Misc misc;
public Beam beam;
public Kms kms;
public Keyring keyring;
public RegistryTool registryTool;
/** Configuration options that apply to the entire App Engine project. */
@ -99,12 +99,6 @@ public class RegistryConfigSettings {
public int baseOfyRetryMillis;
}
/** Configuration for Cloud KMS. */
public static class Kms {
public String keyringName;
public String projectId;
}
/** Configuration for Apache Beam (Cloud Dataflow). */
public static class Beam {
public String defaultJobZone;
@ -170,6 +164,18 @@ public class RegistryConfigSettings {
public int asyncDeleteDelaySeconds;
}
/** Configuration for keyrings (used to store secrets outside of source). */
public static class Keyring {
public String activeKeyring;
public Kms kms;
}
/** Configuration for Cloud KMS. */
public static class Kms {
public String keyringName;
public String projectId;
}
/** Configuration options for the registry tool. */
public static class RegistryTool {
public String clientSecretFilename;