Hi there,
I’m running into behavior which I don’t understand.
In our admin namespace, I have a group with 3 policies attached.
In our admin/foo namespace I’ve created a tokenauth role named consul with one policy attached.
When I create a token for the consul role using the cli I get the 3 policies from the group in the admin namespace added as identity-policies.
vault token create -orphan -namespace=admin/foo -role consul -display-name consul-test
Key Value
--- -----
...
identity_policies ["admin-administrator" "all-identity-admin" "root-ca-administrator"]
policies ["admin-administrator" "all-identity-admin" "default" "root-ca-administrator" "vault-managed-pki"]
My question is what is adding the identity policies? The role isn’t associated with an entity or an alias. I am a member of the group in question, so maybe the policies are being inherited from me. However, according to the docs:
The generated token will inherit all policies and permissions of the currently authenticated token unless you explicitly define a subset list policies to assign to the token.
Even when I pass in policies explicitly via -policy="my-policy" the identity policies are added.
vault token create -orphan -namespace=admin/grapl -role consul -display-name consul-staging-test -policy=“vault-managed-pki”`
--- -----
...
token_policies ["default" "vault-managed-pki"]
identity_policies ["admin-administrator" "all-identity-admin" "root-ca-administrator"]
policies ["admin-administrator" "all-identity-admin" "default" "root-ca-administrator" "vault-managed-pki"]