public class KeyValueSecretBackendMetadata extends SecretBackendMetadataSupport implements SecretBackendMetadata
SecretBackendMetadata for the kv (key-value) secret backend.| Modifier and Type | Method and Description |
|---|---|
static List<String> |
buildContexts(String applicationName,
List<String> profiles,
String profileSeparator)
Create a list of context names from a combination of application name and
application name with profile name.
|
static List<String> |
buildContexts(VaultKeyValueBackendPropertiesSupport properties,
List<String> profiles)
Build a list of context paths from application name and the active profile names.
|
static SecretBackendMetadata |
create(String path)
|
static SecretBackendMetadata |
create(String path,
org.springframework.vault.core.util.PropertyTransformer propertyTransformer)
|
static SecretBackendMetadata |
create(String secretBackendPath,
String key)
|
String |
getPath()
Return the path of this secret backend.
|
org.springframework.vault.core.util.PropertyTransformer |
getPropertyTransformer()
Return a
PropertyTransformer to post-process properties retrieved from
Vault. |
getName, getVariablesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getVariablespublic static SecretBackendMetadata create(String secretBackendPath, String key)
SecretBackendMetadata for the kv secret backend given a
secretBackendPath and key. Use plain mount and key paths. The
required data segment is added by this method.secretBackendPath - the secret backend mount path without leading/trailing
slashes and without the data path segment, must not be empty or
null.key - the key within the secret backend. May contain slashes but not
leading/trailing slashes, must not be empty or null.SecretBackendMetadatapublic static SecretBackendMetadata create(String path)
path - the relative path of the secret. slashes, must not be empty or
null.SecretBackendMetadatapublic static SecretBackendMetadata create(String path, org.springframework.vault.core.util.PropertyTransformer propertyTransformer)
path - the relative path of the secret. slashes, must not be empty or
null.propertyTransformer - property transformer.SecretBackendMetadatapublic static List<String> buildContexts(VaultKeyValueBackendPropertiesSupport properties, List<String> profiles)
properties - the key-value backend properties.profiles - active application profiles.public static List<String> buildContexts(String applicationName, List<String> profiles, String profileSeparator)
applicationName - the application name. May be empty.profiles - active application profiles.profileSeparator - profile separator character between application name and
profile name.public String getPath()
SecretBackendMetadatagetPath in interface SecretBackendMetadatapublic org.springframework.vault.core.util.PropertyTransformer getPropertyTransformer()
SecretBackendMetadataPropertyTransformer to post-process properties retrieved from
Vault.getPropertyTransformer in interface SecretBackendMetadatagetPropertyTransformer in class SecretBackendMetadataSupportPropertyTransformersCopyright © 2022 Pivotal Software, Inc.. All rights reserved.