Require every UI API endpoint to declare its authorization - #9004
Open
GGraziadei wants to merge 2 commits into
Open
Require every UI API endpoint to declare its authorization#9004GGraziadei wants to merge 2 commits into
GGraziadei wants to merge 2 commits into
Conversation
GGraziadei
force-pushed
the
enforce-ui-config-authorization
branch
from
August 23, 2026 11:31
aba3c5d to
06a6cf0
Compare
GGraziadei
marked this pull request as draft
August 23, 2026 18:41
reiabreu
approved these changes
Aug 23, 2026
rzo1
approved these changes
Aug 24, 2026
rzo1
marked this pull request as ready for review
August 24, 2026 08:06
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.
Summary
AuthorizedUserFilterno longer skips authorization when a resource method carries no@AuthNimbusOp; such a request is now rejected.@UnauthenticatedNimbusOp, so the choice is explicit and reviewable./history/summaryuses it, since Nimbus already filters that response for the authenticated remote user./cluster/configurationis gated ongetNimbusConf, matching the ACL the direct Thrift path applies.getNimbusConfmasks credentials before serialization, so the Thrift path is covered as well as the UI proxy.@Passwordmarkers to credential-bearing keys inConfig.java: the cluster ZooKeeper auth payload, and the Thrift, Netty and ZooKeeper TLS store passwords. These were absent, so those values were also reaching daemon logs through the existing masking call sites.ConfigUtils.maskCredentials, used when a config is served over an API: it masks the annotated keys plus string values whose key name denotes a secret. Plugins read their own keys straight out of the config map, so those keys belong to no annotated field and the annotation scan cannot see them. Only string values are considered, so timeouts and class lists whose names merely mention credentials keep their value.Compatibility
The filter is registered only for
org.apache.storm.daemon.ui.resources, which holds a single resource class; all its endpoints declare one of the two annotations. A new endpoint added without either annotation is rejected until it declares one, which is the intent.Testing
mvn -pl storm-client test -DskipITs— 663 tests, 0 failuresmvn -pl storm-webapp test -DskipITs— 99 tests, 0 failuresmvn -pl storm-server test -DskipITs— 491 tests, 0 failures/cluster/configurationreturns 403 where it previously returned 200,/history/summarykeeps working, and the served configuration masks the credential keys while leaving paths and timeouts untouched.