我是 vault 的新手,并试图根据 pod 所在的 k8s 命名空间来保护数据。我已对身份验证部分进行了排序,但我无法创建一个 ACL 让客户端在不泄露所有机密的情况下读取机密
我使用的结构是secret/k8s/<k8s-namespace>/<appname>
例如secret/k8s/bex/app1
我已经尝试过这样的 ACL 策略,但没有secret/*
我被拒绝访问,并且secret/*
客户端可以看到所有内容,事件路径与bex
.
我究竟做错了什么?
# Without this, I cannot access anything
#path "secret/*" { capabilities = [ "read", "list" ]}
path "secret/k8s/bex*" { capabilities = [ "read", "list" ]}
path "secret/k8s/bex/*" { capabilities = [ "read", "list" ]}
path "secret/k8s/bex/app1" { capabilities = [ "read", "list" ]}
path "secret/k8s/bex/app1/*" { capabilities = [ "read", "list" ]}
path "secret/k8s/bex/app1*" { capabilities = [ "read", "list" ]}