-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][broker] Consistently add fine-grain authorization to REST API #22202
[improve][broker] Consistently add fine-grain authorization to REST API #22202
Conversation
Add fine-grained authorization(FGA) to topic management endpoints. So that it can be controlled at a more fine-grain level. The changed endpoints are as follows: **Topic Policy** - offload policeis - max unacked message on consumer - max unacked message on subscription - duplication snapshot - inactive topic - delayed delivery - backlog - replication - message ttl - deduplication - dispatch pause - persistence - max subscriptions - max producers - max consumers - message size - compaction threshold - replication rate - dispatch rate - publish rate - subscribe rate - subscriptino types - schema capatibility - auto subscription creation **Topic Operation** - examine message - get backlog
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PolicyName.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Good work @mattisonchao ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could make preValidation
before authorization validation. WDYT?
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22202 +/- ##
============================================
+ Coverage 73.57% 73.60% +0.03%
- Complexity 32624 32722 +98
============================================
Files 1877 1878 +1
Lines 139502 139708 +206
Branches 15299 15328 +29
============================================
+ Hits 102638 102834 +196
+ Misses 28908 28882 -26
- Partials 7956 7992 +36
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@mattisonchao could you help to cherry-pick this PR to 3.0 branch? I see conflicts. |
…PI (apache#22202) (cherry picked from commit 68c1092) (cherry picked from commit dcaf508)
…PI (apache#22202) (cherry picked from commit 68c1092) (cherry picked from commit dcaf508)
Motivation
Add fine-grain authorization to topic management endpoints so that it can be controlled at a more fine-grain level.
Modifications
The changed endpoints are as follows:
Topic Policy
Topic Operation
Verifying this change
Documentation
doc
doc-required
doc-not-needed
doc-complete