saltext.vault.utils.vault.auth¶
Vault authentication models
- class saltext.vault.utils.vault.auth.VaultTokenAuth(cache=None, token=None)[source]¶
Container for authentication tokens
- class saltext.vault.utils.vault.auth.VaultAppRoleAuth(approle, client, mount='approle', cache=None, token_store=None)[source]¶
Issues tokens from AppRole credentials.
- is_renewable()[source]¶
Check whether the currently used token is renewable. SecretIDs are not renewable anyways.
- is_valid(valid_for=0)[source]¶
Check whether the contained authentication data can be used to issue a valid token
- class saltext.vault.utils.vault.auth.VaultAppRole(role_id, secret_id=None)[source]¶
Container that represents an AppRole
- is_valid(valid_for=0, uses=1)[source]¶
Checks whether the contained data can be used to authenticate to Vault. SecretIDs might not be required by the server when bind_secret_id is set to false.
- valid_for
Allows to check whether the AppRole will still be valid in the future. This can be an integer, which will be interpreted as seconds, or a time string using the same format as Vault does: Suffix
s
for seconds,m
for minutes,h
for hours,d
for days. Defaults to 0.- uses
Check whether the AppRole has at least this number of uses left. Defaults to 1.
- class saltext.vault.utils.vault.auth.LocalVaultSecretId(**kwargs)[source]¶
Represents a SecretID from local configuration and should not be cached.
- class saltext.vault.utils.vault.auth.InvalidVaultToken(*args, **kwargs)[source]¶
Represents a missing token
- is_valid(valid_for=0, uses=1)[source]¶
Checks whether the token is valid for an amount of time and number of uses.
- valid_for
Check whether the token will still be valid in the future. This can be an integer, which will be interpreted as seconds, or a time string using the same format as Vault does: Suffix
s
for seconds,m
for minutes,h
for hours,d
for days. Defaults to 0.- uses
Check whether the token has at least this number of uses left. Defaults to 1.
- class saltext.vault.utils.vault.auth.InvalidVaultSecretId(*args, **kwargs)[source]¶
Represents a missing SecretID
- is_valid(valid_for=0, uses=1)[source]¶
Checks whether the SecretID is valid for an amount of time and number of uses
- valid_for
Check whether the SecretID will still be valid in the future. This can be an integer, which will be interpreted as seconds, or a time string using the same format as Vault does: Suffix
s
for seconds,m
for minutes,h
for hours,d
for days. Defaults to 0.- uses
Check whether the SecretID has at least this number of uses left. Defaults to 1.