GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [fix][broker] Check topic permissions for binary GetSchema and GetOrCreateSchema by KannarFr · Pull Request #26643 · apache/pulsar

Conversation

@KannarFr

@KannarFr KannarFr commented Sep 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Motivation

The REST schema endpoints check topic permissions (GET_METADATA to read, PRODUCE to upload in
SchemasResourceBase), but the binary CommandGetSchema and CommandGetOrCreateSchema handlers in
ServerCnx did not check any permission.

Modifications

  • CommandGetSchema requires LOOKUP on the topic. Producers, consumers and readers already hold it,
    since they look the topic up first; the default provider treats LOOKUP and GET_METADATA alike.
  • CommandGetOrCreateSchema requires PRODUCE on the topic, like the REST schema upload.
  • A refused request gets AuthorizationError, through the new
    BrokerServiceException.NotAuthorizedException mapped in getClientErrorCode.
  • ClientChannelHelper now decodes the two schema responses for tests.

This PR and #26644 both add BrokerServiceException.NotAuthorizedException; whichever is merged second
will merge master.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • ServerCnxTest: each command refused without the permission (the schema registry or the topic is
    never reached) and allowed with it.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

The binary protocol messages are unchanged; the broker now answers AuthorizationError to these
commands when the client lacks the permission.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@KannarFr @claude
[fix][broker] Check topic permissions for binary GetSchema and GetOrC…
55aae79
…reateSchema

Align the binary schema commands with the REST schema endpoints.
CommandGetSchema now requires LOOKUP on the topic, which producers, consumers
and readers already hold. CommandGetOrCreateSchema requires PRODUCE, like the
REST schema upload. A refused request gets AuthorizationError, through the new
BrokerServiceException.NotAuthorizedException.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@KannarFr KannarFr mentioned this pull request Sep 18, 2026
[fix][broker] Check topic permissions for partitions and subscriptions added to a transaction #26644
Merged
1 of 11 tasks
@lhotari
Merge origin/master
cabe908
lhotari
lhotari approved these changes Sep 19, 2026
View reviewed changes
@lhotari
lhotari merged commit 0f8af32 into apache:master Sep 19, 2026
43 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@lhotari lhotari added release/4.2.5 release/4.0.14 labels Sep 23, 2026
@lhotari lhotari added this to the 5.0.0 milestone Sep 23, 2026
lhotari pushed a commit that referenced this pull request Sep 23, 2026
@KannarFr @lhotari
[fix][broker] Check topic permissions for binary GetSchema and GetOrC…
320c5fc
…reateSchema (#26643)

Check topic permissions for binary GetSchema and GetOrCreateSchema requests and retain the schema and transaction tests when merging master.

(cherry picked from commit 0f8af32)
@lhotari lhotari added the cherry-picked/branch-4.2 label Sep 23, 2026
lhotari pushed a commit that referenced this pull request Sep 23, 2026
@KannarFr @lhotari
[fix][broker] Check topic permissions for binary GetSchema and GetOrC…
3efea12
…reateSchema (#26643)

Check topic permissions for binary GetSchema and GetOrCreateSchema requests and retain the schema and transaction tests when merging master.

(cherry picked from commit 0f8af32)
@lhotari lhotari added the cherry-picked/branch-4.0 label Sep 23, 2026
Radiancebobo pushed a commit to Radiancebobo/pulsar that referenced this pull request Oct 8, 2026
@KannarFr hechengbo
[fix][broker] Check topic permissions for binary GetSchema and GetOrC…
f2d0639
…reateSchema (apache#26643)

Check topic permissions for binary GetSchema and GetOrCreateSchema requests and retain the schema and transaction tests when merging master.
@nodece nodece mentioned this pull request Nov 5, 2026
[fix][ml][broker][client] Sync branch-as-4.0 with apache branch-4.0 (2026-09 to 2026-11, 159 commits) ascentstream/pulsar#109
Merged
4 of 5 tasks
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Nov 16, 2026
@KannarFr @nodece
[fix][broker] Check topic permissions for binary GetSchema and GetOrC…
8da017e
…reateSchema (apache#26643)

Check topic permissions for binary GetSchema and GetOrCreateSchema requests and retain the schema and transaction tests when merging master.

(cherry picked from commit 0f8af32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lhotari lhotari lhotari approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cherry-picked/branch-4.0 cherry-picked/branch-4.2 release/4.0.14 release/4.2.5

Projects

None yet

Milestone

5.0.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@KannarFr @lhotari
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.