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

Forbid to read other topic's data in managedLedger layer #11912

Merged
merged 4 commits into from
Sep 3, 2021

Conversation

hangc0276
Copy link
Contributor

Motivation

Related to #11852 #11894 #11814
The current ledgerId check just in persistentTopic level, we should add the check protection in ManagedLedger level before execute read operations.

Modification

  1. Check the requested ledgerId whether belongs to the current topic before execute read operation in managedLedger layer.

@hangc0276 hangc0276 self-assigned this Sep 3, 2021
@hangc0276 hangc0276 added this to the 2.9.0 milestone Sep 3, 2021
@hangc0276 hangc0276 added doc-not-needed Your PR changes do not impact docs release/blocker Indicate the PR or issue that should block the release until it gets resolved labels Sep 3, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

This is far better then the other fix.

Lgtm

Can you please port this to branch 2.7 and 2.6?

@hangc0276
Copy link
Contributor Author

This is far better then the other fix.

Lgtm

Can you please port this to branch 2.7 and 2.6?

OK,I will push an individual Pr to branch 2.6 and 2.7

Copy link
Contributor

@315157973 315157973 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

Good work!

@merlimat merlimat merged commit a7bdc5e into apache:master Sep 3, 2021
hangc0276 added a commit that referenced this pull request Sep 4, 2021
* forbid to read other topic's data in managedLedger layer

* format code

* update exception type

* fix test

(cherry picked from commit a7bdc5e)
@hangc0276 hangc0276 added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Sep 4, 2021
eolivelli pushed a commit to datastax/pulsar that referenced this pull request Sep 6, 2021
* forbid to read other topic's data in managedLedger layer

* format code

* update exception type

* fix test

(cherry picked from commit a7bdc5e)
(cherry picked from commit 8bf8000)
eolivelli pushed a commit to datastax/pulsar that referenced this pull request Sep 6, 2021
* forbid to read other topic's data in managedLedger layer

* format code

* update exception type

* fix test

(cherry picked from commit a7bdc5e)
(cherry picked from commit 8bf8000)
@michaeljmarshall
Copy link
Member

Note that this commit is not cherry picked to branch-2.7 because the same changes are merged here #11913.

@codelipenghui codelipenghui added release/2.7.4 cherry-picked/branch-2.7 Archived: 2.7 is end of life and removed release/2.7.4 labels Dec 11, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
* forbid to read other topic's data in managedLedger layer

* format code

* update exception type

* fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/security cherry-picked/branch-2.7 Archived: 2.7 is end of life cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/blocker Indicate the PR or issue that should block the release until it gets resolved release/2.6.4 release/2.7.4 release/2.8.1 release/2.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants