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 2021/11/11 03:13:42 UTC

[GitHub] [pulsar] yuruguo opened a new pull request #12742: [Authorization] Support UNSUBSCRIBE namespace op after enable auth

yuruguo opened a new pull request #12742:
URL: https://github.com/apache/pulsar/pull/12742


   ### Motivation
   Currently, we can `unsubscribe` the given subscription on all topics on a namespace through `bin/pulsar-admin namespaces unsubscribe -s sub tn1/ns1`. However, role(not super-user or administrator) with `consume` auth action for namespace cannot perform `unsubscribe` operation when enable auth.
   
   The root of the problem is that `PulsarAuthorizationProvider` lacks support for namespace operation `UNSUBSCRIBE` when verifying the role's authorization, code as below: 
   https://github.com/apache/pulsar/blob/8cae63557a318240e95697f382b4f61c22b70d64/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L1667-L1669
   https://github.com/apache/pulsar/blob/8cae63557a318240e95697f382b4f61c22b70d64/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java#L522-L536
   
   The purpose of this PR is to support that role with `consume` namespace authorization could `unsubscribe` subscriptions on a namespace.
   
   ### Documentation 
   - [x] `no-need-doc` 
    


-- 
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] yuruguo commented on pull request #12742: [Authorization] Support UNSUBSCRIBE namespace op after enable auth

Posted by GitBox <gi...@apache.org>.
yuruguo commented on pull request #12742:
URL: https://github.com/apache/pulsar/pull/12742#issuecomment-966359238


   > The change looks good
   > 
   > I believe that an integration test is too much heavyweight for this code.
   > 
   > Can we add a test somewhere in a simple unit test please ?
   
   Okay :)
   I have move the test of this PR and [previous PR](https://github.com/apache/pulsar/pull/12656) to pulsar-broker, it wii be lighter.


-- 
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] yuruguo edited a comment on pull request #12742: [Authorization] Support UNSUBSCRIBE namespace op after enable auth

Posted by GitBox <gi...@apache.org>.
yuruguo edited a comment on pull request #12742:
URL: https://github.com/apache/pulsar/pull/12742#issuecomment-966359238


   > The change looks good
   > 
   > I believe that an integration test is too much heavyweight for this code.
   > 
   > Can we add a test somewhere in a simple unit test please ?
   
   Okay :)
   I have move the test of this PR and [previous PR](https://github.com/apache/pulsar/pull/12656) to `pulsar-broker` module, it wii be lighter.


-- 
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] yuruguo commented on pull request #12742: [Authorization] Support UNSUBSCRIBE namespace op after enable auth

Posted by GitBox <gi...@apache.org>.
yuruguo commented on pull request #12742:
URL: https://github.com/apache/pulsar/pull/12742#issuecomment-965978866


   @merlimat @eolivelli @codelipenghui @freeznet ptal, thx!


-- 
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] yuruguo removed a comment on pull request #12742: [Authorization] Support UNSUBSCRIBE namespace op after enable auth

Posted by GitBox <gi...@apache.org>.
yuruguo removed a comment on pull request #12742:
URL: https://github.com/apache/pulsar/pull/12742#issuecomment-965978866


   @merlimat @eolivelli @codelipenghui @freeznet ptal, thx!


-- 
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] yuruguo edited a comment on pull request #12742: [Authorization] Support UNSUBSCRIBE namespace op after enable auth

Posted by GitBox <gi...@apache.org>.
yuruguo edited a comment on pull request #12742:
URL: https://github.com/apache/pulsar/pull/12742#issuecomment-966359238


   > The change looks good
   > 
   > I believe that an integration test is too much heavyweight for this code.
   > 
   > Can we add a test somewhere in a simple unit test please ?
   
   Okay :)
   I have move the test of this PR and [previous PR](https://github.com/apache/pulsar/pull/12656) to `pulsar-broker-common` module, it wii be lighter.


-- 
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] codelipenghui merged pull request #12742: [Authorization] Support UNSUBSCRIBE namespace op after enable auth

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #12742:
URL: https://github.com/apache/pulsar/pull/12742


   


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