You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Technoboy- (via GitHub)" <gi...@apache.org> on 2024/07/17 07:28:21 UTC

[PR] [fix][broker] Fix incorrect authorization issue when using proxy [pulsar]

Technoboy- opened a new pull request, #23045:
URL: https://github.com/apache/pulsar/pull/23045

   
   ### Motivation
   
   When the client uses the proxy to connect to the broker, if enabled the authorization and set namespace subscription auth mode with `Prefix`, the client will always face the authorization issue :
   
   ```
   Failed to create consumer - The subscription name needs to be prefixed by the authentication role, like abc-xxxx for topic: persistent://public/default/test
   ```
   
   The related codes to the root cause:
   https://github.com/apache/pulsar/blob/dd1b57944b117d16ebd371996b44c02af2ce325c/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L468-L494
   
   
   
   ### Verifying this change
   
   Add a related test to cover this change.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   
   


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


Re: [PR] [fix][broker] Fix incorrect authorization issue when using proxy [pulsar]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #23045:
URL: https://github.com/apache/pulsar/pull/23045#issuecomment-2235902933

   ## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/23045?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 73.42%. Comparing base [(`bbc6224`)](https://app.codecov.io/gh/apache/pulsar/commit/bbc62245c5ddba1de4b1e7cee4ab49334bc36277?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`cdb2e37`)](https://app.codecov.io/gh/apache/pulsar/commit/cdb2e3766ad2573cd0d9e055aa6ef6e28695de8e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 456 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/23045/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/pulsar/pull/23045?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #23045      +/-   ##
   ============================================
   - Coverage     73.57%   73.42%   -0.16%     
   - Complexity    32624    33391     +767     
   ============================================
     Files          1877     1914      +37     
     Lines        139502   143634    +4132     
     Branches      15299    15669     +370     
   ============================================
   + Hits         102638   105458    +2820     
   - Misses        28908    30111    +1203     
   - Partials       7956     8065     +109     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pulsar/pull/23045/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [inttests](https://app.codecov.io/gh/apache/pulsar/pull/23045/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.78% <0.00%> (+3.19%)` | :arrow_up: |
   | [systests](https://app.codecov.io/gh/apache/pulsar/pull/23045/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.68% <0.00%> (+0.36%)` | :arrow_up: |
   | [unittests](https://app.codecov.io/gh/apache/pulsar/pull/23045/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `72.48% <100.00%> (-0.37%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files](https://app.codecov.io/gh/apache/pulsar/pull/23045?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...va/org/apache/pulsar/broker/service/ServerCnx.java](https://app.codecov.io/gh/apache/pulsar/pull/23045?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Fservice%2FServerCnx.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1NlcnZlckNueC5qYXZh) | `72.19% <100.00%> (+0.05%)` | :arrow_up: |
   
   ... and [497 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/23045/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   </details>


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


Re: [PR] [fix][broker] Fix incorrect authorization issue when using proxy [pulsar]

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- closed pull request #23045: [fix][broker] Fix incorrect authorization issue when using proxy
URL: https://github.com/apache/pulsar/pull/23045


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


Re: [PR] [fix][broker] Fix incorrect authorization issue when using proxy [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece commented on PR #23045:
URL: https://github.com/apache/pulsar/pull/23045#issuecomment-2241982047

   Isn't proxy super user? Similar to https://github.com/apache/pulsar/pull/23036


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