-
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] Add fine-grain authorization to ns/topic management endpoints #22305
Conversation
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. Please check the test failure
@Technoboy- I have removed the 3.1 release label since 3.1 is out of the support scope. You can get the release policy in this page |
Ok |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22305 +/- ##
============================================
+ Coverage 73.57% 73.62% +0.04%
+ Complexity 32624 32183 -441
============================================
Files 1877 1887 +10
Lines 139502 139471 -31
Branches 15299 15293 -6
============================================
+ Hits 102638 102684 +46
+ Misses 28908 28824 -84
- Partials 7956 7963 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Cherry-picked to branch-3.0 by #22309 |
… endpoints (#22305) (cherry picked from commit fd34d4a) # Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java (cherry picked from commit 99eb49a) # Conflicts: # pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java (cherry picked from commit 5c4f4cb) # Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java # pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicPoliciesAuthZTest.java
… endpoints (#22305) (cherry picked from commit fd34d4a) # Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java (cherry picked from commit 99eb49a) # Conflicts: # pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
(cherry picked from commit 91ee580)
… endpoints (apache#22305) (cherry picked from commit fd34d4a) Conflicts: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
… endpoints (apache#22305) (cherry picked from commit fd34d4a)
… endpoints (apache#22305) (cherry picked from commit fd34d4a) Conflicts: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
… endpoints (apache#22305) (cherry picked from commit fd34d4a)
… endpoints (apache#22305) (cherry picked from commit fd34d4a) # Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java (cherry picked from commit 99eb49a) # Conflicts: # pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java (cherry picked from commit 5c4f4cb) # Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java # pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicPoliciesAuthZTest.java
(cherry picked from commit 91ee580)
Motivation
Add fine-grain authorization to ns/topic management endpoints so that it can be controlled at a more fine-grain level.
Modification
TRIM_TOPIC
was missing, this would cause the normal user throwIllegalStateException
not NotAuthorizedException.internalSetProperty
,internalSetProperties
,internalGetProperty
,internalGetProperties
,internalRemoveProperty
,internalClearProperties
,internalUnloadTopic
,internalGetManagedLedgerInfo
,internalGetPartitionedStats
,internalGetPartitionedStatsInternal
,internalCreateSubscription
,internalUpdateSubscriptionProperties
,internalAnalyzeSubscriptionBacklog
,internalGetSubscriptionProperties
,internalCreateMissedPartitions
Verifying this change
NamespaceAuthZTest
andTopicAuthZTest
Documentation
doc
doc-required
doc-not-needed
doc-complete