OnepasswordClient#
- class phalanx.storage.onepassword.OnepasswordClient(url, vault_title)#
Bases:
object
Retrieve secrets stored in 1Password via 1Password Connect.
This client is specific to a particular Phalanx environment. It is created using the metadata of a Phalanx environment by
OnepasswordStorage
.The 1Password Connect authentication token is taken from the
OP_CONNECT_TOKEN
environment variable, which must be set.- Parameters:
Methods Summary
get_secrets
(query)Get static secrets for an environment from 1Password.
Methods Documentation
- get_secrets(query)#
Get static secrets for an environment from 1Password.
- Parameters:
query (
dict
[str
,list
[str
]]) – Query for secrets in the form of a dictionary of applications to lists of secret keys for that application that should be retrieved.- Returns:
Retrieved static secrets as a dictionary of applications to secret keys to ~phalanx.models.secrets.StaticSecret objects.
- Return type:
- Raises:
MissingOnepasswordSecretsError – Raised if any of the items or fields expected to be in 1Password are not present.