I have applied the following vault
policies
super-policy:
- capabilities:
- create
- read
- update
- patch
- delete
- list
- sudo
path: /*
- capabilities:
- deny
path: /specific
specific-policy:
- capabilities:
- create
- read
- update
- patch
- delete
- list
path: /specific
- capabilities:
- create
- read
- update
- patch
- delete
- list
path: /specific/*
A user has been assigned both the specific-policy
and the super-policy
.
Why is he able to see the specific
path given that the super-policy
has a deny
capability` for this path?
update 1: each policy has been assigned to a group and the user I am talking about is a member of both groups FWIW
update 2: I have aggregated all the policies applied to the specific user here
path "/*" {
capabilities = ["create", "delete", "list", "patch", "read", "sudo", "update"]
}
path "/specific" {
capabilities = ["deny"]
}
path "/testing" {
capabilities = ["create", "delete", "list", "patch", "read", "update"]
}
path "/testing/*" {
capabilities = ["create", "delete", "list", "patch", "read", "update"]
}
path "/specific" {
capabilities = ["create", "delete", "list", "patch", "read", "update"]
}
path "/specific/*" {
capabilities = ["create", "delete", "list", "patch", "read", "update"]
}
path "/testing" {
capabilities = ["list"]
}
path "/testing/*" {
capabilities = ["list"]
}
Τhe user is able to
a) see the /specific
path in the ui
b) perform a vault kv get -mount=specific foo/bar/lala