Return the value of secret_name fetched from Vault.
Raises KeyError if the secret has no vault mapping or the field is absent. Raises ValueError if the field exists but is empty. Raises requests.HTTPError / ConnectionError on network / auth failures.
Source code in source/src/imarina_load_researchers/core/vault.py
| def read_vault_secret(secret_name: SecretName) -> str:
"""Return the value of *secret_name* fetched from Vault.
Raises KeyError if the secret has no vault mapping or the field is absent.
Raises ValueError if the field exists but is empty.
Raises requests.HTTPError / ConnectionError on network / auth failures.
"""
logger.debug(f"Requesting secret from Vault: {secret_name}")
return _get_client().read_secret(secret_name)
|