pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][cli] Supports creating tokens with additional headers

Open coderzc opened this issue 1 year ago • 3 comments

Motivation

Currently, the tool that generates the token cannot attach headers. We should support it. For example, it makes sense to attach a kid field for JWKS.

Modifications

Supports creating tokens with additional headers

Verifying this change

  • [x] Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • [ ] Dependencies (add or upgrade a dependency)
  • [ ] The public API
  • [ ] The schema
  • [ ] The default values of configurations
  • [ ] The threading model
  • [ ] The binary protocol
  • [ ] The REST endpoints
  • [x] The admin CLI options
  • [ ] The metrics
  • [ ] Anything that affects deployment

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

Matching PR in forked repository

PR in forked repository:

coderzc avatar May 10 '24 07:05 coderzc

/pulsarbot rerun-failure-checks

nodece avatar May 10 '24 14:05 nodece

@lhotari @heesung-sn Could you help take a look ?

Technoboy- avatar May 15 '24 01:05 Technoboy-

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.16%. Comparing base (bbc6224) to head (aef7cfc). Report is 281 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22690      +/-   ##
============================================
- Coverage     73.57%   73.16%   -0.41%     
- Complexity    32624    32849     +225     
============================================
  Files          1877     1889      +12     
  Lines        139502   141401    +1899     
  Branches      15299    15517     +218     
============================================
+ Hits         102638   103457     +819     
- Misses        28908    29937    +1029     
- Partials       7956     8007      +51     
Flag Coverage Δ
inttests 27.43% <0.00%> (+2.85%) :arrow_up:
systests 24.75% <0.00%> (+0.42%) :arrow_up:
unittests 72.15% <100.00%> (-0.69%) :arrow_down:

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

Files Coverage Δ
...ar/broker/authentication/utils/AuthTokenUtils.java 77.27% <100.00%> (+1.08%) :arrow_up:
...pache/pulsar/utils/auth/tokens/TokensCliUtils.java 39.28% <100.00%> (+11.42%) :arrow_up:

... and 371 files with indirect coverage changes

codecov-commenter avatar May 17 '24 10:05 codecov-commenter