Ethanlm opened a new pull request #3392:
URL: https://github.com/apache/storm/pull/3392


   ## What is the purpose of the change
   
   When drpc.authorizer.acl is set up with no values, like below,
   ```
   -bash-4.2$ cat drpc-auth-acl.yaml
   drpc.authorizer.acl:
   ```
   
   DRPCSimpleACLAuthorizer will have NPE
   
   ## How was the change tested
   
   Tested with different setup, including 
   
   #### 1) drpc-auth-acl.yaml is empty. With or without code change, DRPC has 
the following exception (expected)
   ```
   2021-04-22 15:31:32.746 o.a.s.t.ProcessFunction pool-9-thread-3 [ERROR] 
Internal error processing fetchRequest
   java.lang.RuntimeException: Config file drpc-auth-acl.yaml doesn't have any 
valid storm configs
           at 
org.apache.storm.utils.Utils.findAndReadConfigFile(Utils.java:xxx) 
   ```
   #### 2) drpc-auth-acl.yaml is 
   ```
   drpc.authorizer.acl :
   ```
   it worked well. 
   If `drpc.authorizer.acl.strict` is set `true`, we will see
   ```
   2021-04-22 15:27:27.871 o.a.s.s.a.a.DRPCSimpleACLAuthorizer pool-9-thread-1 
[WARN] Requiring explicit ACL entries, but none given. Therefore, all 
operations will be denied.
   ```
   #### 3)  drpc-auth-acl.yaml has values, like
   ```
   -bash-4.2$ cat drpc-auth-acl.yaml
   
   drpc.authorizer.acl:
     words:
       client.users:
         - "user1"
       invocation.user: "user1"
   ``` 
   worked well.
   
   Added unit tests


-- 
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:
us...@infra.apache.org


Reply via email to