Commit c5eaeb94 authored by Jan Marchel's avatar Jan Marchel
Browse files

fix creating key for edge

parent af0f7fe5
......@@ -5,5 +5,6 @@ public enum EmsDeploymentTargetProvider {
AZUREVM,
GCE,
OPENSTACKNOVA,
BYON
BYON,
EDGE
}
......@@ -28,6 +28,7 @@ public class SecureStoreDBService {
private final static String SECURE_VARIABLE_SECURE_SUFFIX = "-SECRET";
private final static String SECURE_VARIABLE_PASSWORD_SUFFIX = "-password";
private final static String SECURE_VARIABLE_BYON_PREFIX = "byon-";
private final static String SECURE_VARIABLE_EDGE_PREFIX = "edge-";
private final static String SECURE_VARIABLE_KEY_SUFFIX = "-key";
private static final Pattern SECURE_VARIABLE_PATTERN = Pattern.compile("\\{\\{(.*?)}}");
......@@ -182,13 +183,13 @@ public class SecureStoreDBService {
}
public Pair<String, String> createKeyLabelForEdgePassword(LoginCredential loginCredential) {
String keyForEdgePassword = SECURE_VARIABLE_BYON_PREFIX + loginCredential.getId() + SECURE_VARIABLE_PASSWORD_SUFFIX;
String keyForEdgePassword = SECURE_VARIABLE_EDGE_PREFIX + loginCredential.getId() + SECURE_VARIABLE_PASSWORD_SUFFIX;
String labelForEdgeKey = SECURE_VARIABLE_PREFIX + keyForEdgePassword + SECURE_VARIABLE_SUFFIX;
return Pair.of(keyForEdgePassword, labelForEdgeKey);
}
public Pair<String, String> createKeyLabelForEdgeKey(LoginCredential loginCredential) {
String keyForEdgeKey = SECURE_VARIABLE_BYON_PREFIX + loginCredential.getId() + SECURE_VARIABLE_KEY_SUFFIX;
String keyForEdgeKey = SECURE_VARIABLE_EDGE_PREFIX + loginCredential.getId() + SECURE_VARIABLE_KEY_SUFFIX;
String labelForEdgeKey = SECURE_VARIABLE_PREFIX + keyForEdgeKey + SECURE_VARIABLE_SUFFIX;
return Pair.of(keyForEdgeKey, labelForEdgeKey);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment