vault_client_secrets | R Documentation |
Vault Secret Configuration
Vault Secret Configuration
Interact with vault's secret backends.
vaultr::vault_client_object
-> vault_client_secrets
cubbyhole
The cubbyhole backend: vault_client_cubbyhole
kv1
The version 1 key-value backend: vault_client_kv1
kv2
The version 2 key-value backend: vault_client_kv2
transit
The transit backend: vault_client_transit
new()
Create a vault_client_secrets
object. Not typically
called by users.
vault_client_secrets$new(api_client)
api_client
A vault_api_client object
disable()
Disable a previously-enabled secret engine
vault_client_secrets$disable(path)
path
Path of the secret engine
enable()
Enable a secret backend in the vault server
vault_client_secrets$enable( type, path = type, description = NULL, version = NULL )
type
The type of secret backend (e.g., transit
, kv
).
path
Specifies the path in which to enable the auth
method. Defaults to be the same as type
.
description
Human-friendly description of the backend;
will be returned by $list()
version
Used only for the kv
backend, where an integer
is used to select between vault_client_kv1 and
vault_client_kv2 engines.
list()
List enabled secret engines
vault_client_secrets$list(detailed = FALSE)
detailed
Logical, indicating if detailed output is wanted.
move()
Move the path that a secret engine is mounted at
vault_client_secrets$move(from, to)
from
Original path
to
New path
server <- vaultr::vault_test_server(if_disabled = message)
if (!is.null(server)) {
client <- server$client()
# To remove the default version 1 kv store and replace with a
# version 2 store:
client$secrets$disable("/secret")
client$secrets$enable("kv", "/secret", version = 2)
# cleanup
server$kill()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.