Repository navigation
iam: --as an org with no acting identity sends no token - #42
Merged
Merged
Conversation
Generated commands took their token from acting(), which falls back to the active identity when the org holds several and none is active, so `hanzo --as hanzo` with admin/z active sent admin/z's token with X-Org-Id hanzo. Refuse there by name, as within() does; an org that holds no identity still speaks as the active one.
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.
hanzo --as hanzo <cmd>sent admin/z's (SuperAdmin) token withX-Org-Id: hanzowhenever org hanzo held several identities and none was active:acting()(src/iam/store.rs) falls back to the active identity, and generated commands take their token from it. Onlyauth show/tokenwent throughwithin()and refused.active_token_innow refuses the same waywithin()does when--asnames an org that holds identities but none of them is acting. An org that holds no identity still speaks as the active one (as_an_org_speaks_as_its_identity_without_switching).as_an_org_with_no_active_identity_sends_no_token: fails without the change, passes with it.make test: 457 passed, 0 failed (fresh HOME, nothing written).