API client for vault.
Vault provides a platform for distributing secrets across machines. This package wraps the vault http API to allow secrets to be accessed from R. Secrets might be passwords, tokens, certificates or any other sensitive data.
Create a vault client with the vault_client
function:
<- vaultr::vault_client(login = TRUE) vault
## Verifying token
Interact with vault using this object:
$list("secret/database") vault
## [1] "admin" "readonly"
and read secrets with
$read("secret/database/admin") vault
## $value
## [1] "s3cret"
$read("secret/database/readonly", field = "value") vault
## [1] "passw0rd"
or set secrets with
$write("secret/webserver", list(password = "horsestaple"))
vault$read("secret/webserver") vault
or delete secrets with
$delete("/secret/database/readonly") vault
Install vaultr
from CRAN with
install.packages("vaultr")
To install our internally released version (which might be ahead of CRAN) via drat, use
# install.packages("drat") # (if needed)
:::add("vimc")
dratinstall.packages("vaultr")
or install the bleeding edge with
# install.packages("devtools") # (if needed)
::install_gitub("vimc/vaultr", upgrade = FALSE) devtools
MIT © Imperial College of Science, Technology and Medicine