사용자별 UI 접근에 대한 설정을 Kv-v2를 예로 확인
Policy 구성
UI 접근을 위해서는 metadata
에 대한 권한 추가가 필요함
$ vault policy write ui-kv-policy - << EOF
path "kv-v2/data/path/" {
capabilities = ["create", "update", "read", "delete", "list"]
}
path "kv-v2/delete/path/" {
capabilities = ["update"]
}
path "kv-v2/metadata/path/" {
capabilities = ["list", "read", "delete"]
}
path "kv-v2/destroy/path/" {
capabilities = ["update"]
}
path "kv-v2/data/path/userid/*" {
capabilities = ["create", "update", "read", "delete", "list"]
}
path "kv-v2/delete/path/userid/*" {
capabilities = ["update"]
}
path "kv-v2/metadata/path/userid/*" {
capabilities = ["list", "read", "delete"]
}
path "kv-v2/destroy/path/userid/*" {
capabilities = ["update"]
}
# Additional access for UI
path "kv-v2/metadata" {
capabilities = ["list"]
}
EOF
##### or #####
vault policy write ui-kv-policy - << EOF
path "kv-v2/data/path/userid" {
capabilities = ["create", "update", "read", "delete", "list"]
}
path "kv-v2/delete/path/userid" {
capabilities = ["update"]
}
path "kv-v2/metadata/path/userid" {
capabilities = ["list", "read", "delete"]
}
path "kv-v2/destroy/path/userid" {
capabilities = ["update"]
}
# Additional access for UI
path "kv-v2/metadata/*" {
capabilities = ["list"]
}
EOF
약 4 분