Basic Auth How To

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Latest version of OS

Describe the issue: Is base64 encoding needed with Basic Auth to make a POST request to insert data? I am using C++ to build the request (without libcurl).

Configuration: Security plug-in

Relevant Logs or Screenshots:

Hi @OSuser. You mean the password in BasicAuth?

Yes, I am referring to the password for a Basic Auth POST request. The documentation does not say anything about base64.

Example:

Authorization: Basic <base64_encoded_string>

@OSuser If you’re using the Authorization header with basic authentication, you must encode username:password with base64 as per RFC 7617

I think this could be a reason why it isn’t mentioned in OpenSearch documentation, as this relates to header definition and not OpenSearch requirements.

@pablo thanks!