-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix an edge case bug that "identity_policies" is nil #17007
Conversation
…associated in token's namespace This is an edge case, when an entity has identity_policies associated in other namespaces but no identity_policies in this token's namespace, `identityPolicies[out.NamespaceID]` is nil, client side doesn't handle nil which raises error.
Hi @tianhaopx, thanks for the submission. It looks good, I just wonder if you might be able to add a test to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving and merging this, thank you for your commit!
While it would be better with a test, this seems to fix a legitimate bug, so I'd rather get it merged than not. We really appreciate the contribution!
Fixes #17006
client side: check if "identity_policies" is nil, goto DONE, then cli
vault login
will not return unexpected error.server side: check if key
out.NamespaceID
exists in the mapidentityPolicies
returned from funcfetchEntityAndDerivedPolicies