Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix: Clear any existing properties for a secret before creating/updat…
Browse files Browse the repository at this point in the history
…ing it in etcd

Signed-off-by: Eamonn Mansour <[email protected]>
  • Loading branch information
eamansour committed Oct 31, 2024
1 parent c59c7e9 commit dde1a91
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public void setCredentials(String credentialsId, ICredentials credentials) throw
Properties credentialProperties = credentials.toProperties(credentialsId);

try {
// Clear any existing properties with the same credentials ID
deleteCredentials(credentialsId);

for (Entry<Object, Object> property : credentialProperties.entrySet()) {
put((String) property.getKey(), encryptionService.encrypt((String) property.getValue()));
}
Expand Down

0 comments on commit dde1a91

Please sign in to comment.