fix an edge case bug that "identity_policies" is nil#17007
Merged
VioletHynes merged 7 commits intohashicorp:mainfrom May 28, 2024
Merged
fix an edge case bug that "identity_policies" is nil#17007VioletHynes merged 7 commits intohashicorp:mainfrom
VioletHynes merged 7 commits intohashicorp:mainfrom
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.
Contributor
|
Hi @tianhaopx, thanks for the submission. It looks good, I just wonder if you might be able to add a test to |
VioletHynes
approved these changes
May 28, 2024
Contributor
VioletHynes
left a comment
There was a problem hiding this comment.
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!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #17006
client side: check if "identity_policies" is nil, goto DONE, then cli
vault loginwill not return unexpected error.server side: check if key
out.NamespaceIDexists in the mapidentityPoliciesreturned from funcfetchEntityAndDerivedPolicies