Robocorp Control Room Vault API integration library
Project description
Robocorp Control Room Vault API library
robocorp-vault
is a library which provides read and write access to the
Vault
at Robocorp Control Room
.
Usage
from robocorp import vault
from robocorp import log
def reading_secrets():
secrets_container = vault.get_secret('secret_name')
# Shows secret keys available:
print(f"My secrets: {secrets_container}")
# Note: actually prints the secret value below.
print(f"Username: {secrets_container['username']}")
def modifying_secrets():
secret = vault.get_secret("swaglabs")
with log.suppress_variables():
secret_value = collect_new_secret_value()
secret["username"] = secret_value
vault.set_secret(secret)
Note that values set or gotten from the vault will be automatically
hidden from robocorp.log
logs (if robocorp.log
is available
in the environment), but care needs to be taken when setting it
so that secrets don't become exposed before being set into the vault.
i.e.: When setting values into the vault, if such values are sensitive,
use with robocorp.log.suppress_variables()
so that such value doesn't
become logged before it's received by the vault.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
robocorp_vault-1.0.0.tar.gz
(9.1 kB
view hashes)
Built Distribution
Close
Hashes for robocorp_vault-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f05dbf17c2fb48153c75c6702418c1878399fbd41b93e388b71e0d052e6179fc |
|
MD5 | 968a10ab676e240fc2d76ac56520092e |
|
BLAKE2b-256 | 364500648a5f15c5ddcad2d22f90170d4da277c33410082a682dd6c1150ec8c0 |