-
Couldn't load subscription status.
- Fork 337
Only log Invalid Authorization header when HTTP Basic auth challenge is called #5377
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
Only log Invalid Authorization header when HTTP Basic auth challenge is called #5377
Conversation
…cator Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
|
CC: @StewartWBrown @terryquigleysas @shikharj05 This should solve the problem and only log this line when appropriate. |
Signed-off-by: Craig Perkins <cwperx@amazon.com>
I agree. See also #5221 (comment) Thanks @cwperks |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5377 +/- ##
==========================================
- Coverage 72.23% 72.12% -0.11%
==========================================
Files 382 382
Lines 23697 23696 -1
Branches 3644 3644
==========================================
- Hits 17117 17091 -26
- Misses 4781 4806 +25
Partials 1799 1799
🚀 New features to boost your workflow:
|
Signed-off-by: Craig Perkins <cwperx@amazon.com>
0542a9e
|
Thanks so much for doing this @cwperks! Seems like a good approach for this pesky log-buildup. Missed the other location of this log message when making my PR! |
9e6047f
into
opensearch-project:main
|
@cwperks Thank you for providing this approach. Could it be backported to 2.19 too please? |
|
This being merged should resolve #4054 ! :) |
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-2.19 2.19
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.19
# Create a new branch
git switch --create backport/backport-5377-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9e6047f99da4df3404e2d52f3afe4e49e508c3a5
# Push it to GitHub
git push --set-upstream origin backport/backport-5377-to-2.19
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.19Then, create a pull request where the |
Description
This PR is a replacement for #5221 which simplifies the logic in the basic authenticator.
The goal is to only log this in valid scenarios. The following criteria needs to be met:
:delimiterchallenge: true) this log line should never be logged.Bugfix
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.