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 2019/05/17 22:44:00 UTC

[GitHub] [pulsar] rdhabalia commented on a change in pull request #4241: [pulsar-function] fix backward compatibility with 2.2 auth not working

rdhabalia commented on a change in pull request #4241: [pulsar-function] fix backward compatibility with 2.2 auth not working
URL: https://github.com/apache/pulsar/pull/4241#discussion_r285309025
 
 

 ##########
 File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java
 ##########
 @@ -1510,8 +1516,15 @@ public void uploadFunction(final InputStream uploadedInputStream, final String p
         }
     }
 
-    public StreamingOutput downloadFunction(final String path) {
+    public StreamingOutput downloadFunction(final String path, String clientRole) {
 
+        if (worker().getWorkerConfig().isAuthorizationEnabled()) {
+            // skip authorization if client role is super-user
+            if (!isSuperUser(clientRole)) {
 
 Review comment:
   ok.. this PR was created to address V2 api where authentication is failing for v2 api because it was passing null as clientId. for this particular usecase, let me remove the check for now.

----------------------------------------------------------------
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