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 2020/04/10 08:36:50 UTC
[GitHub] [pulsar] jiazhai opened a new pull request #6708: Issue 6702: add
isSuperUser in AuthorizationProvider interface
jiazhai opened a new pull request #6708: Issue 6702: add isSuperUser in AuthorizationProvider interface
URL: https://github.com/apache/pulsar/pull/6708
Fixes #6702
### Motivation
Most of the methods in AuthorizationProvider take AuthenticationDataSource for authorization decision. However isSuperUser still takes the string role token. This has to be changed.
### Modifications
Add needed method
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [pulsar] codelipenghui commented on issue #6708: Issue 6702: add
isSuperUser in AuthorizationProvider interface
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #6708: Issue 6702: add isSuperUser in AuthorizationProvider interface
URL: https://github.com/apache/pulsar/pull/6708#issuecomment-611977105
/pulsarbot run-failure-checks
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [pulsar] jiazhai commented on issue #6708: Issue 6702: add
isSuperUser in AuthorizationProvider interface
Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6708: Issue 6702: add isSuperUser in AuthorizationProvider interface
URL: https://github.com/apache/pulsar/pull/6708#issuecomment-612380331
/pulsarbot run-failure-checks
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [pulsar] sijie merged pull request #6708: Issue 6702: add
isSuperUser in AuthorizationProvider interface
Posted by GitBox <gi...@apache.org>.
sijie merged pull request #6708: Issue 6702: add isSuperUser in AuthorizationProvider interface
URL: https://github.com/apache/pulsar/pull/6708
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [pulsar] sijie commented on a change in pull request #6708: Issue
6702: add isSuperUser in AuthorizationProvider interface
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] jiazhai commented on issue #6708: Issue 6702: add
isSuperUser in AuthorizationProvider interface
Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6708: Issue 6702: add isSuperUser in AuthorizationProvider interface
URL: https://github.com/apache/pulsar/pull/6708#issuecomment-612704743
/pulsarbot run-failure-checks
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [pulsar] sijie commented on issue #6708: Issue 6702: add
isSuperUser in AuthorizationProvider interface
Posted by GitBox <gi...@apache.org>.
sijie commented on issue #6708: Issue 6702: add isSuperUser in AuthorizationProvider interface
URL: https://github.com/apache/pulsar/pull/6708#issuecomment-612676598
/pulsarbot run-failure-checks
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [pulsar] jiazhai commented on issue #6708: Issue 6702: add
isSuperUser in AuthorizationProvider interface
Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6708: Issue 6702: add isSuperUser in AuthorizationProvider interface
URL: https://github.com/apache/pulsar/pull/6708#issuecomment-612307984
/pulsarbot run-failure-checks
----------------------------------------------------------------
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
With regards,
Apache Git Services