Repository navigation
[fix][broker] Align entry filter policy checks for non-persistent topics - #26774
Merged
Merged
Conversation
The topic-level entry filter endpoints in PersistentTopics check the ENTRY_FILTERS topic policy operation before handling the request, but the NonPersistentTopics overrides skip that check. Run validateTopicPolicyOperationAsync with ENTRY_FILTERS READ for get and WRITE for set and remove in NonPersistentTopics, matching PersistentTopics. Callers not permitted the operation now receive 403 Not Authorized for these non-persistent topic endpoints. Parameterize the TopicAuthZTest entry filter tests to cover persistent and non-persistent topics, including the get operation with applied=true. Assisted-by: Claude Code
lhotari
requested review from
Technoboy-,
dao-jun,
david-streamlio,
merlimat and
nodece
September 30, 2026 00:43
dao-jun
approved these changes
Sep 30, 2026
nodece
approved these changes
Sep 30, 2026
ascentstream-bot
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
Oct 1, 2026
…ics (apache#26774) (cherry picked from commit 069e858)
ascentstream-bot
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
Oct 2, 2026
…ics (apache#26774) (cherry picked from commit 069e858)
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.
Motivation
The topic-level entry filter endpoints in
PersistentTopicscheck theENTRY_FILTERStopic policy operation (READfor get,WRITEfor set and remove) before handling the request. TheNonPersistentTopicsoverrides of these endpoints skip that check, so the same operations are handled differently depending on the topic domain.Modifications
NonPersistentTopics, runvalidateTopicPolicyOperationAsyncwithPolicyName.ENTRY_FILTERSbefore the get (READ), set (WRITE) and remove (WRITE) entry filter operations, matchingPersistentTopics.TopicAuthZTestto cover bothpersistentandnon-persistenttopics, and also check the get operation withapplied=true.With this change, a caller that is not permitted the
ENTRY_FILTERSpolicy operation receives403 Not Authorizedfor these non-persistent topic endpoints, as it already does for persistent topics.Verifying this change
This change added tests and can be verified as follows:
TopicAuthZTest.testGetEntryFilter,testSetEntryFilterandtestRemoveEntryFilternow run for bothpersistentandnon-persistenttopics.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
ENTRY_FILTERStopic policy operation