File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/main/java/com/bettercloud/vault Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -151,8 +151,21 @@ public VaultConfig token(final String token) {
151151 * "/secret/bar", "2"
152152 * @return This object, with secrets paths populated, ready for additional builder-pattern method calls or else finalization with the build() method
153153 */
154- VaultConfig secretsEnginePathMap (final Map <String , String > secretEngineVersions ) {
155- this .secretsEnginePathMap = secretEngineVersions ;
154+ public VaultConfig secretsEnginePathMap (final Map <String , String > secretEngineVersions ) {
155+ this .secretsEnginePathMap = new ConcurrentHashMap <>(secretEngineVersions );
156+ return this ;
157+ }
158+
159+ /**
160+ * <p>Sets the secrets Engine version be used by Vault for the provided path.</p>
161+ *
162+ * @param path the path to use for accessing Vault secrets.
163+ * Example "/secret/foo"
164+ * @return This object, with a new entry in the secrets paths map, ready for additional builder-pattern method calls or else finalization with
165+ * the build() method
166+ */
167+ public VaultConfig putSecretsEngineVersionForPath (String path , String version ) {
168+ this .secretsEnginePathMap .put (path , version );
156169 return this ;
157170 }
158171
You can’t perform that action at this time.
0 commit comments