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

[BUG] Lots of waring message No 'Basic Authorization' header, send 401 and 'WWW-Authenticate Basic' in log #3273

Closed
Hailong-am opened this issue Aug 31, 2023 · 8 comments · Fixed by #3364
Labels
bug Something isn't working good first issue These are recommended starting points for newcomers looking to make their first contributions. help wanted Community contributions are especially encouraged for these issues. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.

Comments

@Hailong-am
Copy link
Contributor

What is the bug?

When i enable both SAML and basic auth and login with SAML, there have lots of basic auth warning message
[2023-08-31T13:35:04,053][WARN ][o.o.s.h.HTTPBasicAuthenticator] [bcd07463160c] No 'Basic Authorization' header, send 401 and 'WWW-Authenticate Basic' printed in OpenSearch log file

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

What is the expected behavior?
Don't print warning message or should this be debug level

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?

image

enable both SAML and basic
image

Do you have any additional context?
Add any other context about the problem.

@Hailong-am Hailong-am added bug Something isn't working untriaged Require the attention of the repository maintainers and may need to be prioritized labels Aug 31, 2023
@stephen-crawford
Copy link
Contributor

stephen-crawford commented Sep 11, 2023

[Triage] Thank you for filing this issue. This message is a warning message that is expected when you run with the SAML endpoint configuration you are using. This is a response from not having a Basic auth header (you have none because you are using SAML). You can disregard this message.

We can follow-up this issue by making a change so that this log is TRACE/DEBUG instead of WARNING level. Then you should not see this output.

@stephen-crawford stephen-crawford added good first issue These are recommended starting points for newcomers looking to make their first contributions. help wanted Community contributions are especially encouraged for these issues. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. and removed untriaged Require the attention of the repository maintainers and may need to be prioritized labels Sep 11, 2023
bagipriyank pushed a commit to bagipriyank/security that referenced this issue Sep 14, 2023
…n' header, send 401 and 'WWW-Authenticate Basic' to trace
bagipriyank pushed a commit to bagipriyank/security that referenced this issue Sep 14, 2023
…n' header, send 401 and 'WWW-Authenticate Basic' to trace

Signed-off-by: Priyank Bagrecha <[email protected]>
bagipriyank pushed a commit to bagipriyank/security that referenced this issue Sep 15, 2023
…n' header, send 401 and 'WWW-Authenticate Basic' to trace

Signed-off-by: Priyank Bagrecha <[email protected]>
stephen-crawford pushed a commit that referenced this issue Sep 19, 2023
#3364)

### Description
Change warning message No 'Basic Authorization' header, send 401 and
'WWW-Authenticate Basic' to trace

### Issues Resolved
- Resolves #3273

### Check List
- [ ] New functionality includes testing
- [ ] New functionality has been documented
- [X] Commits are signed per the DCO using --signoff

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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

---------

Signed-off-by: Priyank Bagrecha <[email protected]>
Co-authored-by: Priyank Bagrecha <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Oct 3, 2023
#3364)

### Description
Change warning message No 'Basic Authorization' header, send 401 and
'WWW-Authenticate Basic' to trace

### Issues Resolved
- Resolves #3273

### Check List
- [ ] New functionality includes testing
- [ ] New functionality has been documented
- [X] Commits are signed per the DCO using --signoff

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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

---------

Signed-off-by: Priyank Bagrecha <[email protected]>
Co-authored-by: Priyank Bagrecha <[email protected]>
(cherry picked from commit a41638b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@taltsafrirpx
Copy link

any update with a solution?

@Hailong-am
Copy link
Contributor Author

any update with a solution?

@taltsafrirpx the log level have changed to trace, so you should not see those warning by default.

@jkrishnarao2003
Copy link

We are using OpenSearch 2.10.0. We are seeing this log message hugely. Which version this was fixed?

@Hailong-am
Copy link
Contributor Author

d7d8472
should be 2.11.0
image

@SeemsLikeIt
Copy link

For information just migrated my cluster to 2.11.1 and got log as warning with SAMl configuration.
[2024-01-31T20:12:52,211][WARN ][o.o.s.h.HTTPBasicAuthenticator] [os1] No 'Basic Authorization' header, send 401 and 'WWW-Authenticate Basic'

@sandervandegeijn
Copy link

It's probably the order of the backens that's playing a role here. We are going to switch those so openid comes first and see what happens.

@ComBin
Copy link

ComBin commented Feb 16, 2024

It's probably the order of the backens that's playing a role here. We are going to switch those so openid comes first and see what happens.

In my case if i place SAML auth first it is breaks my basic auth.

Also i open new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue These are recommended starting points for newcomers looking to make their first contributions. help wanted Community contributions are especially encouraged for these issues. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants