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 2023/01/11 04:41:46 UTC

[GitHub] [pulsar] michaeljmarshall opened a new issue, #19183: Improve testing for authorization to prevent regressions in topic operations related to subscriptions

michaeljmarshall opened a new issue, #19183:
URL: https://github.com/apache/pulsar/issues/19183

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Motivation
   
   In PR https://github.com/apache/pulsar/pull/19176, I fixed a minor regression in our authorization code base related to topic operations. We should have better tests or possibly a better design to make sure we catch these regressions before they are merged.
   
   ### Solution
   
   Improve tests or improve the framework.
   
   ### Alternatives
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] michaeljmarshall commented on issue #19183: Improve testing for authorization to prevent regressions in topic operations related to subscriptions

Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
michaeljmarshall commented on issue #19183:
URL: https://github.com/apache/pulsar/issues/19183#issuecomment-1449295953

   Another option is to use `assert` in the case where we ought to have a subscription. That might not be the right solution though.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #19183: Improve testing for authorization to prevent regressions in topic operations related to subscriptions

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19183:
URL: https://github.com/apache/pulsar/issues/19183#issuecomment-1493197301

   The issue had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] michaeljmarshall commented on issue #19183: Improve testing for authorization to prevent regressions in topic operations related to subscriptions

Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #19183: Improve testing for authorization to prevent regressions in topic operations related to subscriptions

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19183:
URL: https://github.com/apache/pulsar/issues/19183#issuecomment-1444915389

   The issue had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org