public class FilesPlainTextVaultProvider extends Object implements VaultProvider
${VAULT}/realma__key1 (contains secret for key 1)
${VAULT}/realma__key2 (contains secret for key 2)
etc...
Note, that each key needs is prefixed by realm name. This kind of layout is used by Kubernetes by default
(when mounting a volume into the pod).
See https://kubernetes.io/docs/concepts/configuration/secret/
See https://github.com/keycloak/keycloak-community/blob/master/design/secure-credentials-store.md#plain-text-file-per-secret-kubernetes--openshift| Constructor and Description |
|---|
FilesPlainTextVaultProvider(Path path,
String realmName)
Creates a new
FilesPlainTextVaultProvider. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
VaultRawSecret |
obtainSecret(String vaultSecretId) |
protected Path |
resolveSecretPath(String vaultSecretId)
A method that resolves the exact secret location.
|
public FilesPlainTextVaultProvider(@Nonnull Path path, @Nonnull String realmName)
FilesPlainTextVaultProvider.path - A path to a vault. Can not be null.realmName - A realm name. Can not be null.public VaultRawSecret obtainSecret(String vaultSecretId)
obtainSecret in interface VaultProviderCopyright © 2019 JBoss by Red Hat. All rights reserved.