vaultr (version 1.0.2)

vault_client_secrets: Vault Secret Configuration

Description

Interact with vault's secret backends.

Arguments

Methods

enable

Enable a secret backend in the vault server Usage:

enable(type, path = type, description = NULL, version = NULL)

Arguments:

  • 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.

disable

Disable a previously-enabled secret engine Usage:

disable(path)

Arguments:

  • path: Path of the secret engine

list

List enabled secret engines Usage:

list(detailed = FALSE)

Arguments:

  • detailed: Logical, indicating if detailed output is wanted.

move

Move the path that a secret engine is mounted at Usage:

move(from, to)

Arguments:

  • from: Original path

  • to: New path

Examples

Run this code
# NOT RUN {
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()
}
# }

Run the code above in your browser using DataCamp Workspace