Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][broker]: support missing broker level fine-granted permissions #23637

Merged
merged 12 commits into from
Nov 29, 2024

Conversation

mattisonchao
Copy link
Member

@mattisonchao mattisonchao commented Nov 25, 2024

Motivation

Support missing broker-level fine-granted permissions.

Modifications

  • Introduce Broker level operations
  • Add allowBrokerOperationAsync method for AuthorizationProvider.
  • Keep compatibility for existing endpoints.
  • Fix admin backlogQuotaCheck HTTP request path.

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • doc-not-needed

@mattisonchao mattisonchao self-assigned this Nov 25, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 25, 2024
@mattisonchao mattisonchao changed the title [feat][broker]: support missing broker level fine-granted permissions [fix][broker]: support missing broker level fine-granted permissions Nov 28, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 64.93506% with 27 lines in your changes missing coverage. Please review.

Project coverage is 74.35%. Comparing base (bbc6224) to head (ea51d9c).
Report is 770 commits behind head on master.

Files with missing lines Patch % Lines
...g/apache/pulsar/broker/admin/impl/BrokersBase.java 62.96% 17 Missing and 3 partials ⚠️
...sar/broker/authorization/AuthorizationService.java 12.50% 5 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23637      +/-   ##
============================================
+ Coverage     73.57%   74.35%   +0.77%     
- Complexity    32624    35022    +2398     
============================================
  Files          1877     1944      +67     
  Lines        139502   147304    +7802     
  Branches      15299    16255     +956     
============================================
+ Hits         102638   109525    +6887     
- Misses        28908    29320     +412     
- Partials       7956     8459     +503     
Flag Coverage Δ
inttests 27.27% <29.87%> (+2.69%) ⬆️
systests 24.38% <27.27%> (+0.06%) ⬆️
unittests 73.74% <64.93%> (+0.90%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ar/broker/authorization/AuthorizationProvider.java 18.75% <100.00%> (+0.23%) ⬆️
...ache/pulsar/client/admin/internal/BrokersImpl.java 88.23% <100.00%> (+0.73%) ⬆️
...e/pulsar/common/policies/data/BrokerOperation.java 100.00% <100.00%> (ø)
...sar/broker/authorization/AuthorizationService.java 57.14% <12.50%> (-1.07%) ⬇️
...g/apache/pulsar/broker/admin/impl/BrokersBase.java 81.46% <62.96%> (+9.01%) ⬆️

... and 661 files with indirect coverage changes

@mattisonchao mattisonchao merged commit eb60d0a into apache:master Nov 29, 2024
52 checks passed
@mattisonchao mattisonchao deleted the permissions.broker branch November 29, 2024 08:30
@lhotari
Copy link
Member

lhotari commented Nov 29, 2024

  • Fix admin backlogQuotaCheck HTTP request path.

@mattisonchao It seems that it hasn't been tested before if it was broken. Could you please add a functional test to ensure that it works?

@mattisonchao
Copy link
Member Author

oh, sure. let me add one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants