You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "nodece (via GitHub)" <gi...@apache.org> on 2023/07/21 07:31:14 UTC
[GitHub] [pulsar] nodece commented on a diff in pull request #20496: [improve][broker] Support get/remove permissions for AuthorizationProvider
nodece commented on code in PR #20496:
URL: https://github.com/apache/pulsar/pull/20496#discussion_r1270322242
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationProvider.java:
##########
@@ -428,4 +429,48 @@ default Boolean allowTopicPolicyOperation(TopicName topicName,
throw new RestException(e.getCause());
}
}
+
+ /**
+ * Remove authorization-action permissions on a topic to the given client.
+ * @param topicName
+ * @return CompletableFuture<Void>
+ */
+ default CompletableFuture<Void> removePermissionsAsync(TopicName topicName) {
+ return FutureUtil.failedFuture(new IllegalStateException(
+ String.format("removePermissionsAsync on topicName %s is not supported by the Authorization",
+ topicName)));
+ }
+
+ /**
+ * Get authorization-action permissions on a topic to the given client.
+ * @param topicName
+ * @return CompletableFuture<Map<String, Set<AuthAction>>>
+ */
+ default CompletableFuture<Map<String, Set<AuthAction>>> getPermissionsAsync(TopicName topicName) {
Review Comment:
Your design and implementation are correct for the built-in policy, but we also need to consider the external policy.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org