Environment variable to configure elasticsearch.customHeaders for Kibana


My goal is to configure elastic.customHeaders for basic auth from an environment variable.
I have tried several combinations but it seems that I can't find the right one, and I wonder at what step in the parsing variable substitution is performed.
The error message I have is the following:
FATAL Error: [elasticsearch.customHeaders]: expected value of type [object] but got [string]
With for example this configuration:

              value: |-
                [{"Authorization": "Basic XXXXX"}]

I have also tried simpler ones as
value: '{"Authorization": "Basic XXXXX"}'

Before using the 'all env variables ' way, I also tried with a kibana.yml in this way:
elastic.customHeaders: {"Authorization": "${KIBANA_TOKEN}"}
And then having an environment variable KIBANA_TOKEN with the value, but this was also not working, this time more looking than no substiution was performed at all.

I am using kibana-oss:7.3.0


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.