Skip to content

Commit

Permalink
Merge pull request BetterCloud#156 from gm2211/patch-1
Browse files Browse the repository at this point in the history
Made secretsEnginePathMap public
  • Loading branch information
steve-perkins authored Jun 3, 2019
2 parents 3e0fbcf + 249a4e8 commit 0732a5f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/main/java/com/bettercloud/vault/VaultConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,21 @@ public VaultConfig token(final String token) {
* "/secret/bar", "2"
* @return This object, with secrets paths populated, ready for additional builder-pattern method calls or else finalization with the build() method
*/
VaultConfig secretsEnginePathMap(final Map<String, String> secretEngineVersions) {
this.secretsEnginePathMap = secretEngineVersions;
public VaultConfig secretsEnginePathMap(final Map<String, String> secretEngineVersions) {
this.secretsEnginePathMap = new ConcurrentHashMap<>(secretEngineVersions);
return this;
}

/**
* <p>Sets the secrets Engine version be used by Vault for the provided path.</p>
*
* @param path the path to use for accessing Vault secrets.
* Example "/secret/foo"
* @return This object, with a new entry in the secrets paths map, ready for additional builder-pattern method calls or else finalization with
* the build() method
*/
public VaultConfig putSecretsEngineVersionForPath(String path, String version) {
this.secretsEnginePathMap.put(path, version);
return this;
}

Expand Down

0 comments on commit 0732a5f

Please sign in to comment.