vault_policy¶
Manage Vault (or OpenBao) policies.
Added in version 1.9.0: The functions in this module were extracted from vault.
Important
This module requires the general Vault setup.
- saltext.vault.modules.vault_policy.fetch(policy)[source]¶
Fetch the rules associated with an ACL policy. Returns
Noneif the policy does not exist.CLI Example:
salt '*' vault_policy.fetch salt_minion
Required policy:
path "sys/policy/<policy>" { capabilities = ["read"] }
- policy
Name of the policy to fetch.
- saltext.vault.modules.vault_policy.write(policy, rules)[source]¶
Create or update an ACL policy.
CLI Example:
salt '*' vault_policy.write salt_minion 'path "secret/foo" {...}'
Required policy:
path "sys/policy/<policy>" { capabilities = ["create", "update"] }
- policy
Name of the policy to create/update.
- rules
Rules to write, formatted as in-line HCL.