Skip to content

Evaluate authorization for requests that carry no principal - #9005

Merged
rzo1 merged 1 commit into
apache:masterfrom
GGraziadei:handle-requests-without-principal
Aug 23, 2026
Merged

Evaluate authorization for requests that carry no principal#9005
rzo1 merged 1 commit into
apache:masterfrom
GGraziadei:handle-requests-without-principal

Conversation

@GGraziadei

Copy link
Copy Markdown
Member

Summary

SimpleACLAuthorizer.permit and SupervisorSimpleACLAuthorizer.permit dereferenced context.principal() directly, so a request that carries no principal ended in a NullPointerException instead of an authorization decision. Over the UI this surfaced as HTTP 500 rather than 403.

Both now read the principal defensively, the way SimpleWhitelistAuthorizer and DRPCSimpleACLAuthorizer already do. IPrincipalToLocal.toLocal(Principal) is null-safe already.

Behaviour

No decision logic changes. A request without a principal simply follows the rules that were already written: it matches no admin, supervisor or nimbus entry; it keeps the allow-all behaviour when nimbus.users and nimbus.groups are both empty; and it is denied as soon as a list is configured or a topology-level ACL applies.

Testing

  • mvn -pl storm-client test -DskipITs — 661 tests, 0 failures
  • mvn -pl storm-server test -DskipITs — 490 tests, 0 failures
  • New cases cover a principal-less request against configured lists, against empty lists, and against a topology operation, for both authorizers.

@GGraziadei
GGraziadei requested review from reiabreu and rzo1 August 23, 2026 11:01
@GGraziadei GGraziadei self-assigned this Aug 23, 2026
@GGraziadei GGraziadei added this to the 3.1.0 milestone Aug 23, 2026
@rzo1
rzo1 merged commit 94b4088 into apache:master Aug 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants