Filter the topology history by the authenticated caller rather than the requested user name - #9003
Open
rzo1 wants to merge 1 commit into
Open
Filter the topology history by the authenticated caller rather than the requested user name#9003rzo1 wants to merge 1 commit into
rzo1 wants to merge 1 commit into
Conversation
…he requested user name
reiabreu
approved these changes
Aug 23, 2026
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.
Two problems on
getTopologyHistory: it performed no authorization check at all, and the identity used for filtering was the caller-supplieduserargument rather than the authenticated principal.isAdminwas computed asadminUsers.contains(user), and the visibility test failed open onuser == null, so a direct Thrift caller could pass null and receive every assigned topology.readTopologyHistoryrepeated the same fail-open over the on-disk history.The call is now authorized like its neighbours, and the effective user comes from
ReqContextmapped through the configuredIPrincipalToLocal. An admin caller may still name a different user, which is how the UI serves/history/summaryon behalf of its web users.A caller that is not an admin and names somebody else gets its own history back, with a WARN naming the principal and
nimbus.admins, rather than an error. That keeps the page working on a cluster whose UI principal was left out ofnimbus.admins(docs/SECURITY.mdalready recommends adding it) instead of failing the request.Extends
NimbusTest.