- A target path pattern
- A list of capabilities (permissions) for that path
Policy Template
Path patterns support wildcards (
For details, see the Vault Policy Rules documentation.
*, ?) and must match the Vault mount and engine.For details, see the Vault Policy Rules documentation.
Common Capabilities
| Capability | Description |
|---|---|
| create | Write new data or secret |
| read | Retrieve existing data or secret |
| update | Modify existing data or secret |
| delete | Remove data or secret |
| list | Enumerate keys or names under a path |
| sudo | Allow operations on behalf of another user |
Concrete Example
Below is a policy that combines KV secrets, policy administration, and dynamic AWS credentials:Rule Breakdown
-
kv/data/apps/jenkins
Grantsread,update, anddeletepermissions on the Jenkins application data in the KV Secrets Engine. -
sys/policies/*
Allows managing all policies (*wildcard) withcreate,update,list, anddelete. -
aws/creds/web-app
Permitsreadaccess to dynamic AWS credentials from theweb-approle in the AWS Secrets Engine.
Overly broad path patterns (e.g.,
*) can expose more resources than intended. Always validate wildcard usage to avoid privilege escalation.