I want to set a custom HTTP header with a token that will be sent to the Kibana server.
I've been reading the code the past couple days and I see that there is a file in ui/public/chrome/api/xsrf.js that sets a XHR request header like
So - I pulled the code, built with Grunt, added a line to setRequestHeader my token and it doesn't seem to be working
Grepping thru the source tree - I'm not seeing other places where a setRequestHeader method is called and I'm wondering what I'm missing.
The idea is to implement the encrypted token pattern (used in xsrf) in session-less situations and use the token to authorise Kibana users who have logged into an auth server first. So conceptually this might be a nice light-weight way of authenticating users using a Kibana plugin.
But first I have to figure out how to put the token into a request header - which seemed simple enough...