-
Notifications
You must be signed in to change notification settings - Fork 282
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
Changing logging type to give warning for basic auth with no creds #2347
Conversation
Signed-off-by: Abhi Kalra <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #2347 +/- ##
============================================
- Coverage 61.15% 61.07% -0.09%
+ Complexity 3273 3269 -4
============================================
Files 259 260 +1
Lines 18337 18369 +32
Branches 3248 3251 +3
============================================
+ Hits 11214 11218 +4
- Misses 5538 5563 +25
- Partials 1585 1588 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In light of the previous PR's coversation (#2334), I think it may be necessary to first implement a precaution against DoS attacks or justification for why this change cannot wait until such a precaution is in place.
Security plugin does not cover any implementation of precaution against DoS attack. That has to be done from infrastructure change. if needed we can create a backlog to see what can be done from our end. |
I'm struggling to see how this is any different than logging any other messages for unauthenticated requests. If you get millions of them, yes, your logs are filling up but also you have other resources under strain as well that will probably be an issue and/or be detected and acted upon (and you might find those logs useful after all?) Based on @peternied 's comment here, perhaps the compromise is to let this type of error log level be configurable, default it to current level and let people override. Right now it seems like OP is already resorting to setting it to trace to be able to see these, which is an even worse scenario if we're thinking of DoS, so adding this as a configurable level will consider all users' needs while preserving our current default behavior. wdyt? |
I think we should decouple the problem of logs filling up disk from adding more logs, since there are tons of places where we log lack of FGAC permissions at request level or SAML JWT failures for every request. Eg -
Moreover, as @davidlago mentioned, if a user is sending millions of request, they are probably already stressing other system resources. |
@RyanL1997 @cwperks @DarshitChanpura could one of you please merge this. Thank you! |
…2347) Signed-off-by: Abhi Kalra <[email protected]> (cherry picked from commit a0a71da)
…2347) (#2364) Signed-off-by: Abhi Kalra <[email protected]> (cherry picked from commit a0a71da) Co-authored-by: Abhi Kalra <[email protected]> Co-authored-by: Craig Perkins <[email protected]>
…pensearch-project#2347) (opensearch-project#2364) Signed-off-by: Abhi Kalra <[email protected]> (cherry picked from commit a0a71da) Co-authored-by: Abhi Kalra <[email protected]> Co-authored-by: Craig Perkins <[email protected]>
Signed-off-by: Abhi Kalra [email protected]
Description
[Describe what this change achieves]
Category
Bug Fix
Why these changes are required?
Changing logging type to give warning for basic auth with no creds.
What is the old behavior before changes and new behavior after changes?
When using basic auth without credentials, users just get a message telling "Unauthorized" which is not very descriptive. As an admin, I don't have any visibility into why my users are not able to login without enabling this log which is currently at trace level. Hence, changing log level to warn.
Issues Resolved
#2346
Is this a backport? If so, please add backport PR # and/or commits #
We want to backport it to latest OS versions.
Signed-off-by: Abhi Kalra [email protected]
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.