Skip to content

Commit

Permalink
unique secret id
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-skoblikov committed Feb 20, 2024
1 parent fc85582 commit 85f540f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package io.cloudbeaver.model;

import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.model.meta.Property;
import org.jkiss.dbeaver.model.secret.DBSSecretValue;

Expand All @@ -34,10 +33,6 @@ public String getDisplayName() {

@Property
public String getSecretId() {
return buildComplexSecretId(secretValue);
}

public static String buildComplexSecretId(@NotNull DBSSecretValue secretValue) {
return secretValue.getId() + "_" + secretValue.getSubjectId();
return secretValue.getUniqueId();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public WebConnectionInfo initConnection(
}
DBSSecretValue selectedSecret =
allSecrets.stream()
.filter(secret -> selectedSecretId.equals(WebSecretInfo.buildComplexSecretId(secret)))
.filter(secret -> selectedSecretId.equals(secret.getUniqueId()))
.findFirst().orElse(null);
if (selectedSecret == null) {
throw new DBWebException("Secret not found:" + selectedSecretId);
Expand Down

0 comments on commit 85f540f

Please sign in to comment.