server/auth: accept bearer-prefixed auth tokens#21910
Conversation
Signed-off-by: Sahil Patel <smppatel999@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sahilpatel09 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @sahilpatel09. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
cc @ahrtr |
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
... and 27 files with indirect coverage changes @@ Coverage Diff @@
## main #21910 +/- ##
==========================================
- Coverage 69.79% 69.79% -0.01%
==========================================
Files 449 449
Lines 38208 38208
==========================================
- Hits 26667 26666 -1
- Misses 10114 10115 +1
Partials 1427 1427 Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Solves #19752
Basically, when clients pass the token prefixed with string "Bearer " this error is thrown
as the auth only expects raw token strings. The fix strips the "Bearer " prefix if it is part of the token, making bearer-prefixed tokens authenticate the same way as raw tokens.