Description
It would be very helpful if the elasticsearch-logger plugin could support custom authentication headers. In many Elasticsearch setups, authentication is handled via API keys, not just basic auth. These API keys are sent via the Authorization header in the format:
Authorization: ApiKey <base64(id:api_key)>
Currently, elasticsearch-logger only supports basic authentication using user and password. Adding support for auth_header and auth_header_value would allow users to securely connect using API keys or other token-based mechanisms.
✅ Desired Feature
Add optional config parameters:
"auth_header": "Authorization",
"auth_header_value": "ApiKey <base64_encoded_id_colon_key>"
These would override the default Authorization: Basic ... behavior if provided — the same approach as in http-logger.
🔄 Workaround
At the moment, the only workaround is to create a dedicated Elasticsearch user and use basic authentication, which isn't always ideal in production or with managed Elasticsearch services.
Description
It would be very helpful if the elasticsearch-logger plugin could support custom authentication headers. In many Elasticsearch setups, authentication is handled via API keys, not just basic auth. These API keys are sent via the Authorization header in the format:
Authorization: ApiKey <base64(id:api_key)>
Currently, elasticsearch-logger only supports basic authentication using user and password. Adding support for auth_header and auth_header_value would allow users to securely connect using API keys or other token-based mechanisms.
✅ Desired Feature
Add optional config parameters:
These would override the default Authorization: Basic ... behavior if provided — the same approach as in http-logger.
🔄 Workaround
At the moment, the only workaround is to create a dedicated Elasticsearch user and use basic authentication, which isn't always ideal in production or with managed Elasticsearch services.