Scoped permissions
Policies tie a principal (user or agent) to path patterns and permissions. Use narrow patterns and only the permissions needed.
Path patterns
**— All paths in the vault (read or write depending on permissions).api-keys/*— Only paths underapi-keys/(e.g.api-keys/openai,api-keys/stripe).prod/db— Exact pathprod/dbonly.
Patterns use glob rules: * matches one segment, ** matches zero or more segments. Give agents the smallest set of paths they need.
Permissions
- read — Can GET secret value and list (metadata).
- write — Can PUT (create/update) secrets at matching paths.
- delete — Can DELETE secrets at matching paths.
- rotate — Can trigger server-side secret rotation.
- list — Can list secret metadata.
Grant only read unless the agent must create or update secrets. Note that write does not include delete — grant delete explicitly if needed.
Example: agent for one key
Policy: principal_type agent, principal_id <agent_uuid>, secret_path_pattern api-keys/openai, permissions ["read"]. The agent can only read that one path.
Example: agent for all keys, read-only
secret_path_pattern api-keys/*, permissions ["read"]. The agent cannot write or delete.