Skip to content

Commit

Permalink
optionally set vault engine in the vault config (#752)
Browse files Browse the repository at this point in the history
fixes #746
  • Loading branch information
scott-grimes authored and jetersen committed Feb 22, 2019
1 parent 1b376b3 commit fb682ae
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -50,6 +50,7 @@ public VaultSecretSource() {
String vaultAppRole = getVariable("CASC_VAULT_APPROLE", prop);
String vaultAppRoleSecret = getVariable("CASC_VAULT_APPROLE_SECRET", prop);
String vaultNamespace = getVariable("CASC_VAULT_NAMESPACE", prop);
String vaultEngineVersion = getVariable("CASC_VAULT_ENGINE_VERSION", prop);

if(((vaultPw != null && vaultUsr != null) ||
vaultToken != null ||
Expand All @@ -62,6 +63,11 @@ public VaultSecretSource() {
config = config.nameSpace(vaultNamespace);
LOGGER.log(Level.FINE, "Using namespace with Vault: {0}", vaultNamespace);
}
if (vaultEngineVersion != null) {
// optionally set vault engine version
config = config.engineVersion( Integer.parseInt(vaultEngineVersion) );
LOGGER.log(Level.FINE, "Using engine version: {0}", vaultEngineVersion);
}
config = config.build();
Vault vault = new Vault(config);
//Obtain a login token
Expand Down

0 comments on commit fb682ae

Please sign in to comment.