I am new to the community and I am attempting to extend some functionality for my product into Kibana. I currently have Kibana setup with Elasticsearch, where me end users will each have their own pre-made kibana index, usually something like:
.kibana-[user unique ID]
I am attempting to modifying the Kibana source code to support this dynamic redirect, and currently have a HTTPInterceptor which sets the HTTP Authorization header to the appropriate kibana index. In the Express.js side, I wrote a middleware which simply reads the HTTP Authorization header, and sets the config.kibana.kibana-index as the contents of the header.
But the issue is that there are other places in the AngularJS side which makes requests to the express.js side, and I cannot find them at all. A output log on the Express.js side shows that nearly all the initial requests (startup requests) have an
undefined value for the Authorization header. Can anyone help me out.
Currently the data flow is as such:
- Cookie is set on end-user browser with their unique kibana index
- AngularJS aspect of Kibana reads the cookie, and sets the Authorization header (only in the main Kibana module)
- Express.JS middleware reads the Authorization header of each request and attempts to modify the kibana-index on the fly.