Adjust the judgment logic of topic schema operation permissions #12419
Labels
lifecycle/stale
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Milestone
Is your enhancement request related to a problem? Please describe.
The
role
(not super-user) that has thelookup
topic permission should also have the operation permission of the topic schema, for example, therole
could get topic schema through./bin/pulsar-admin schemas get tenant1/ns1/tp1
.But I found that we first judge whether the
role
has access to thetenant
of this topic, as below:pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java
Lines 82 to 91 in a455d06
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/SchemasResourceBase.java
Lines 87 to 94 in a455d06
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/SchemasResourceBase.java
Lines 309 to 312 in a455d06
L311
's effect is tocheck the http client role has admin access to the specified tenant
.Since the
role
only has the authority tolookup
this topic, so it cannot be passed.I have doubts about the rationality of this judgment( call
L311
), and we should converge the scope of this judgment.Describe the solution you'd like
Remove this judgment, and replace it with a judgment whether the
role
has thelookup
permission for this topic, as below:The text was updated successfully, but these errors were encountered: