890d666a53
ci/woodpecker/push/apply Pipeline was successful
Nothing stopped a policy under policies/x/y/ from granting a rule path outside its own directory, so an over-broad grant read as ordinary review noise and only surfaced once applied to Vault. - add tests/test_policies.py: a pydantic model rejecting unknown keys, empty rules and non-Vault capabilities - check every rule path segment-wise against the policy's own directory, stripping the kv-v2 data/metadata segment - relocate the rules that reached outside their directory, carrying capabilities and auth bindings verbatim - run the suite from a local pre-commit hook and from make test Reviewed-on: #158 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
24 lines
550 B
YAML
24 lines
550 B
YAML
# Allow the vault deployer to manage the gpg mount's OpenPGP keys via the
|
|
# gpgvaultsecret provider. Registering the plugin itself is a sys/plugins/catalog
|
|
# grant, carried by policies/sys/plugins/catalog/admin.yaml.
|
|
---
|
|
rules:
|
|
# Manage keys (create/rotate/config/delete) in the gpg mount.
|
|
- path: "gpg/keys/*"
|
|
capabilities:
|
|
- create
|
|
- read
|
|
- update
|
|
- delete
|
|
- list
|
|
- path: "gpg/keys"
|
|
capabilities:
|
|
- read
|
|
- list
|
|
|
|
auth:
|
|
approle:
|
|
- tf_vault
|
|
k8s/au/syd1:
|
|
- woodpecker_terraform_vault
|