-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External Identity Group not persistent across multiple identity aliases #4351
Comments
Right, and the GitHub ones are lost. You should be getting the union of the two, because these policies aren't assigned to your tokens, they're assigned to your Identity via the groups. You as a person are being identified as the same entity in both cases, so the union of any permissions granted from either source become the full set of your permissions. |
Just to follow up on the above: although the policies attached to a token (directly) are immutable, the contents are evaluated at runtime. Changes to those policies affect all tokens with those policies attached on their next request. Similarly, when searching for policies via a token's attached identity, we evaluate the full set of policies at each request by looking at current group membership. |
Yeah I don't have any issue with the policies attached to the tokens, they work as expected. |
@stampycode The reset part is a bug. But you indicated that it was unexpected that after logging in with GitHub and then LDAP, the overall permissions would include policies granted to both. Just trying to get across that a union is the correct behavior (once this bug is fixed). |
@stampycode you can make your life easier by creating an internal group ("A") with the full union of policies, then making your ldap and github external groups subgroups of A. Your entity will then inherit the full set of policies regardless of where you log in, without you actually having to log into both in order to fully populate the set of policies. As a bonus, I think that will be a workaround for the bug you're seeing. |
@jefferai the issue with that is that the policy names issued to users are derived from LDAP group memberships, so these are populated by the LDAP auth module, not by an operator. |
Environment:
Expected Behaviour:
When I assign an External Identity Group to my user which is based off an LDAP group membership, I expect that once I login using LDAP, that group will be persisted until I login with LDAP again and I am no longer a member of that group.
When I login with GitHub with the same Vault identity, I expect my identity-entity to still be a member of the same External-Identity Group via LDAP.
Actual Behavior:
My Identity only has the permissions from the last successful login - if I login with LDAP and then GitHub, my identity has the permissions of the GitHub profile, not the LDAP profile.
When I login with my LDAP account, I see this in my identity entity:
When I then login with my GitHub account, the group is removed from my identity entity:
When I login with my LDAP account again, my identity has the admin policy.
When I login with my GitHub token again, my identity doesn't have the admin policy any more.
This has the side effect that if I login using my LDAP account, then all my previous VAULT_TOKENs issued by my GitHub logins all have the admin permissions granted by my LDAP login.
Steps to Reproduce:
ldap
,github
Last step fails.
The text was updated successfully, but these errors were encountered: