michaeljmarshall commented on issue #19183:
URL: https://github.com/apache/pulsar/issues/19183#issuecomment-1403169833

   One comment on a potential design is to add something like the following to 
the `TopicOperation` enum:
   
   ```java
       static public boolean 
subscriptionNameRequiredForAuthorization(TopicOperation op) {
           switch (op) {
               case CONSUME:
               case RESET_CURSOR:
               case SKIP:
               case SUBSCRIBE:
               case UNSUBSCRIBE:
                   return true;
               default:
                   return false;
           }
       }
   ```
   
   The downside is that it would need to get evaluated on every call to 
authenticate. This could help third party plugins. However, I think the ideal 
solution catches issues with tests and not with verification in production 
runtime.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to