| Title: | Interacts with 'Bitwarden Secrets Manager' |
|---|---|
| Description: | Provides functions to securely retrieve secrets from a 'Bitwarden Secrets Manager' vault using the 'Bitwarden CLI', enabling secret and configuration management within R packages and workflows. For more information visit <https://bitwarden.com/products/secrets-manager/>. |
| Authors: | Hajo Bons [aut, cre], Tomer Iwan [aut] |
| Maintainer: | Hajo Bons <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-12 05:25:13 UTC |
| Source: | https://github.com/cran/vvbitwarden |
Retrieves the BWS_ACCESS_TOKEN from environment variables. This token is
used to authenticate with the Bitwarden Secrets Manager API.
get_bws_access_token()get_bws_access_token()
A character string containing the BWS access token.
This function retrieves the value of a secret stored in your Bitwarden Secrets Manager vault using the specified key.
get_bws_secret( key, bws_access_token = get_bws_access_token(), bws_server_url = get_bws_server_url() )get_bws_secret( key, bws_access_token = get_bws_access_token(), bws_server_url = get_bws_server_url() )
key |
A character string representing the key of the secret. |
bws_access_token |
Optional. A character string representing the Bitwarden access token. Defaults to the value of the "BITWARDEN_ACCESS_TOKEN" environment variable. |
bws_server_url |
Optional. A character string representing the Bitwarden server URL. Defaults to the value of the "BWS_SERVER_URL" environment variable. For example "https://vault.bitwarden.eu". |
A character string containing the value of the secret.
## Not run: # Set environment variables for testing (example values) Sys.setenv(BWS_ACCESS_TOKEN = "your_access_token_here") Sys.setenv(BWS_SERVER_URL = "https://vault.bitwarden.eu") # Retrieve a secret using a key (the key must exist in your vault) my_secret <- get_bws_secret("my-secret-key") print(my_secret) ## End(Not run)## Not run: # Set environment variables for testing (example values) Sys.setenv(BWS_ACCESS_TOKEN = "your_access_token_here") Sys.setenv(BWS_SERVER_URL = "https://vault.bitwarden.eu") # Retrieve a secret using a key (the key must exist in your vault) my_secret <- get_bws_secret("my-secret-key") print(my_secret) ## End(Not run)
Retrieves the BWS_SERVER_URL from environment variables. This URL is
used to define the Bitwarden Secrets Manager server endpoint.
get_bws_server_url()get_bws_server_url()
A character string containing the BWS server URL.