Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix subscription permission not working in reset cursor #11132

Conversation

wuzhanpeng
Copy link
Contributor

@wuzhanpeng wuzhanpeng commented Jun 28, 2021

Motivation

Some internalResetCursorXX methods do not pass in the subscriptionName parameter when verifying permissions, which causes the subscription check to be skipped during the permission check of AuthorizationProvider#canConsumeAsync and leads an error validation result. This PR will fix this problem.

Modifications

Refine the parameters of validateTopicOperation and supplement a relative test case.

Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codelipenghui codelipenghui added this to the 2.9.0 milestone Jun 28, 2021
@codelipenghui codelipenghui merged commit da66d0e into apache:master Jun 28, 2021
codelipenghui pushed a commit that referenced this pull request Jul 7, 2021
### Motivation

Some `internalResetCursorXX` methods do not pass in the `subscriptionName` parameter when verifying permissions, which causes the `subscription` check to be skipped during the permission check of `AuthorizationProvider#canConsumeAsync` and leads an error validation result. This PR will fix this problem.

### Modifications

Refine the parameters of `validateTopicOperation` and supplement a relative test case.

(cherry picked from commit da66d0e)
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jul 7, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
### Motivation

Some `internalResetCursorXX` methods do not pass in the `subscriptionName` parameter when verifying permissions, which causes the `subscription` check to be skipped during the permission check of `AuthorizationProvider#canConsumeAsync` and leads an error validation result. This PR will fix this problem.

### Modifications

Refine the parameters of `validateTopicOperation` and supplement a relative test case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.8 Archived: 2.8 is end of life release/2.8.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants