sijie commented on a change in pull request #6708: Issue 6702: add isSuperUser
in AuthorizationProvider interface
URL: https://github.com/apache/pulsar/pull/6708#discussion_r406710952
##########
File path:
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationProvider.java
##########
@@ -47,6 +47,19 @@
return CompletableFuture.completedFuture(role != null &&
superUserRoles.contains(role) ? true : false);
}
+ /**
+ * Check if specified role is a super user
+ * @param role the role to check
+ * @param authenticationData authentication data related to the role
+ * @return a CompletableFuture containing a boolean in which true means
the role is a super user
+ * and false if it is not
+ */
+ default CompletableFuture<Boolean> isSuperUser(String role,
Review comment:
Don't you need to change the code to use this new method? Otherwise, how can
an authorization provider leverage `AuthenticationDataSource`?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services