收窄本机 SPIFFE 身份的 KV 权限范围
terraform / validate (pull_request) Successful in 28s

This commit is contained in:
2026-09-16 17:15:07 +00:00
parent 61f0f864aa
commit f3d8c38d28
3 changed files with 23 additions and 8 deletions
@@ -1,15 +1,28 @@
# Local development identity. This policy deliberately permits normal KV v2
# reads and writes but excludes soft-delete, metadata deletion, permanent
# version destruction, auth administration, and privileged operations.
path "kv/data/*" {
# Local development identity. Limit normal KV v2 reads and writes to the k8s
# subtree, and exclude soft-delete, metadata deletion, permanent version
# destruction, auth administration, and privileged operations.
path "kv/data/k8s/*" {
capabilities = ["create", "read", "update"]
}
path "kv/metadata" {
path "kv/metadata/k8s" {
capabilities = ["read", "list"]
}
path "kv/metadata/*" {
path "kv/metadata/k8s/*" {
capabilities = ["read", "list"]
}
# Future destination for infrastructure secrets migrated from Ansible Vault.
path "kv/data/infra/*" {
capabilities = ["create", "read", "update"]
}
path "kv/metadata/infra" {
capabilities = ["read", "list"]
}
path "kv/metadata/infra/*" {
capabilities = ["read", "list"]
}