Skip to content

[#12423] allow GetTopicsOfNamespace op with consume permission - #12600

Merged
hangc0276 merged 1 commit into
apache:masterfrom
freeznet:freeznet/allow-get-topics-of-namespace-with-consume-permission
Nov 5, 2021
Merged

[#12423] allow GetTopicsOfNamespace op with consume permission#12600
hangc0276 merged 1 commit into
apache:masterfrom
freeznet:freeznet/allow-get-topics-of-namespace-with-consume-permission

Conversation

@freeznet

@freeznet freeznet commented Nov 3, 2021

Copy link
Copy Markdown
Contributor

Fixes #12423

Motivation

Regex subscription requires to get the topics list of given namespace with GetTopicsOfNamespace request, but this request requires tenant admin permission which will block the regex consumers who only have consume permission.

Modifications

This PR added the consume permission check for GetTopicsOfNamespace, which allows consumers get the topics list with consume permission.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@freeznet freeznet self-assigned this Nov 3, 2021
@github-actions

github-actions Bot commented Nov 3, 2021

Copy link
Copy Markdown

@freeznet:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions

github-actions Bot commented Nov 3, 2021

Copy link
Copy Markdown

@freeznet:Thanks for providing doc info!

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 3, 2021
@github-actions

github-actions Bot commented Nov 3, 2021

Copy link
Copy Markdown

@freeznet:Thanks for providing doc info!

@codelipenghui codelipenghui added this to the 2.10.0 milestone Nov 4, 2021
@hangc0276
hangc0276 merged commit 7e078aa into apache:master Nov 5, 2021
eolivelli pushed a commit that referenced this pull request Nov 9, 2021
Fixes #12423

### Motivation
Regex subscription requires to get the topics list of given namespace with GetTopicsOfNamespace request, but this request requires tenant admin permission which will block the regex consumers who only have consume permission.

### Modifications
This PR added the consume permission check for GetTopicsOfNamespace, which allows consumers get the topics list with consume permission.

(cherry picked from commit 7e078aa)
codelipenghui pushed a commit that referenced this pull request Nov 18, 2021
Fixes #12423

### Motivation
Regex subscription requires to get the topics list of given namespace with GetTopicsOfNamespace request, but this request requires tenant admin permission which will block the regex consumers who only have consume permission.

### Modifications
This PR added the consume permission check for GetTopicsOfNamespace, which allows consumers get the topics list with consume permission.

(cherry picked from commit 7e078aa)
@codelipenghui codelipenghui added release/2.8.2 cherry-picked/branch-2.8 Archived: 2.8 is end of life and removed release/2.8.3 labels Nov 18, 2021
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request Nov 29, 2021
Fixes apache#12423

### Motivation
Regex subscription requires to get the topics list of given namespace with GetTopicsOfNamespace request, but this request requires tenant admin permission which will block the regex consumers who only have consume permission.

### Modifications
This PR added the consume permission check for GetTopicsOfNamespace, which allows consumers get the topics list with consume permission.
@michaeljmarshall

Copy link
Copy Markdown
Member

Updated the label, as this commit is included in the 2.9.0 release. See #13133 for more information.

BewareMyPower pushed a commit to streamnative/kop that referenced this pull request Feb 28, 2022
The apache/pulsar#12600 changed behavior. 
Before this change, only tenant admin allow to list topics, after apache/pulsar#12600, it allows consume permission list topics.
BewareMyPower pushed a commit to streamnative/kop that referenced this pull request Feb 28, 2022
The apache/pulsar#12600 changed behavior. 
Before this change, only tenant admin allow to list topics, after apache/pulsar#12600, it allows consume permission list topics.
@YanshuoH

Copy link
Copy Markdown

It seems that this patch is not present in v3.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.2 release/2.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-topic subscription requires tenant admin access

5 participants