You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/02 14:44:47 UTC

[GitHub] [pulsar] KannarFr commented on a change in pull request #7523: [Issue 5720][authz] - add topics authz granularity

KannarFr commented on a change in pull request #7523:
URL: https://github.com/apache/pulsar/pull/7523#discussion_r568657436



##########
File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationProvider.java
##########
@@ -489,4 +490,36 @@ default Boolean allowTopicOperation(TopicName topicName,
             throw new RestException(e.getCause());
         }
     }
+
+    /**
+     * Check if a given <tt>role</tt> is allowed to execute a given topic <tt>operation</tt> on topic's <tt>policy</tt>.
+     *
+     * @param topic topic name
+     * @param role role name
+     * @param operation topic operation
+     * @param authData authenticated data
+     * @return CompletableFuture<Boolean>
+     */
+    default CompletableFuture<Boolean> allowTopicPolicyOperationAsync(TopicName topic,
+                                                                      String role,
+                                                                      PolicyName policy,
+                                                                      PolicyOperation operation,
+                                                                      AuthenticationDataSource authData) {
+        return FutureUtil.failedFuture(

Review comment:
       It does.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org