I have AD/LDAP setup, and groups are working fine. I can apply the policy to a group, and when I login from the command line, it shows the policy attached. I also deleted that group, verified it was gone, then applied it to a different group, and the policy was again applied to my user:
Success! You are now authenticated. The token information displayed below
is already stored in the token helper. You do NOT need to run "vault login"
again. Future Vault requests will automatically use this token.
Key Value
--- -----
...
token_policies ["default" "rsdkv-dev-rw"]
identity_policies []
policies ["default" "rsdkv-dev-rw"]
...
“rsdkv-dev-rw” being the policy that I created and assigned to a ldap group.
vault write -tls-skip-verify -f auth/ldap/groups/ccfusers policies=rsdkv-dev-rw
HOWEVER, when I login to the GUI, or from the command line, I dont see/have access to rsdkv/dev
I copied the policy to an ACL policy, and assigned it to a userpass user, and that user see/can access rsdkv/dev just fine.
Here is the policy that was both applied to the LDAP group, and also was used to create the ACL Policy:
path "rsdkv/" {
capabilities = ["list"]
}
path "rsdkv/metadata/" {
capabilities = ["list"]
}
path "rsdkv/data/" {
capabilities = ["list"]
}
path "rsdkv/dev" {
capabilities = ["create", "read", "update", "patch", "delete", "list"]
}
path "rsdkv/metadata/dev" {
capabilities = ["create", "read", "update", "patch", "delete", "list"]
}
path "rsdkv/data/dev" {
capabilities = ["create", "read", "update", "patch", "delete", "list"]
}
Any idea why ldap is ignoring the “rsdkv-dev-rw” policy for the ldap user? Or am I missing some other step?
This is vault 1.15.0 community edition on a RHEL8 vm.
Thanks!
EDIT: More info.
When I login as the “userpass” user, you can see that “aspitzer-rsdkv-acl-policy” (ACL Policy version that was a copy/paste of the policy above) is assigned to the users token_policies and policy lists, just like “rsdkv-dev-rw” was assigned to the ldap user above.
Success! You are now authenticated. The token information displayed below
is already stored in the token helper. You do NOT need to run "vault login"
again. Future Vault requests will automatically use this token.
Key Value
--- -----
token_policies ["aspitzer-rsdkv-acl-policy" "default"]
identity_policies []
policies ["aspitzer-rsdkv-acl-policy" "default"]