Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -151,8 +151,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