So I am having my own strategy (via Plugin) for Kibana server object to enable SSO. I want the same token to be passed on to all requests to Elasticsearch so my interceptor over there can authenticate the request. Any clean way I can make this happen via Plugin without touching the actual source code?
Is there something that the server object expose for this?
Kibana in question: 5.4.1
Edit:-
I know about :-
elasticsearch.requestHeadersWhitelist
elasticsearch.customHeaders
But I am using Yar (Hapi Library) for token management so will have to add a header that way.
I am adding my own Headers to the request in my HapiJS (Default) Strategy before passing on to next but these requests with path :-
/.kibana/config/5.4.1
Keeps on popping up with only 3 headers :-
[Host, Content-Length, Connection]
Unless I add a elasticsearch.customHeaders: with my desired Headers (Static, But mine HAVE to be dynamic)