Multiple proxy routes in elasticsearch plugin

I want to use multiple kibana indexes for multiple users. I've already built a plugin in which I dinnamically change the elasticsearch request payload and path and reroute it to kibana server.
My problem is that the core plugin, elasticsearch, will respond with 404 on PUT/POST/DELETE requests on an index different from configured kibanaIndex.
It is possible to add from a plugin another accepted route in the proxy server or to allow PUT/POST/DELETE on an wildcard like {all*}?

The easiest way to do what you are trying to do is to stand up multiple instances of Kibana, each with its own index in Elasticsearch and a unique, matching kibana.index setting.

You could programmatically change that setting, but there's no way to enforce that setting for a given user, so it could change while the interface is loading for 1 user, and then break on them. It would be a really fragile way to do this...

If you can't stand up multiple Kibana instances, the next best option is probably to run all requests to elasticsearch through a reverse proxy, which could re-write the requests and query the correct kibana index based on the user.

That begs the question, how are you controller "users" in Kibana? How does your plugin know what user is making the request to be able to reroute it?

Thank you for your answer. I categorize my users based on a sid stored in a cookie. The ideea is that i reroute the requests in the same instace of kibana server and i wanted to keep this architecture. If there is not another method to force the elasticsearch plugin to allow put and delete methods on other indexes than .kibana I will create multiple types for visualization/index-pattern etc and i will just change the type of the request

Client-side requests to elasticsearch are run through a proxy, which explicitly prohibits any request that might change data on anything other than the .kibana index. You can do whatever you want from custom server routes, but the whole frontend is Kibana is pretty tightly coupled to client-side requests and that constrained proxy.

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