Need a quick help,
Any reason I would be getting these warnings even though I only have single authentication backend configured?
No ‘Authorization’ header, send 401 and ‘WWW-Authenticate Basic’
I understand there was an issue filed for similar warning messages but in those cases, they had multiple authentication backend."
“I think this is what is happening with apache http client, it sends the request without any headers/credentials which is when the server challenges back the client following which the client sends the request with the creds.”
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. Showning your securityconfig/config.yml would help.
To add some details on my findings, I was trying to understand on how the requests are made from the apache client ( this is what we are using) to elasticsearch. From the logs I could see that each and every requests from the http client is sent twice. First one without the credentials/basic auth headers and only when the server sends a CHALLENGE to the client, that is when the client sends the request again but this time with the basic auth credentials.
The order of the apache client http requests is as follows:
The Client sends the HTTP Request with no credentials
The Server sends back a challenge
The Client negotiates and identifies the right authentication scheme
The Client sends a second Request, this time with credentials