kibana-own-home icon indicating copy to clipboard operation
kibana-own-home copied to clipboard

Import kibana dashboard in a shared tenant

Open leadwire-apm opened this issue 6 years ago • 3 comments

Hi,

  • I installed Kibana /own_home behind a reverse proxy
  • I use a basic auth : admin-login/admin-passwd to log in the reverse proxy
  • I have a shared tenant named "common1"
  • I use explicit kibana index

I want to import dashbords by command line in the shared tenant "common1", so I specifie the tenant in the requets uri (in the same way as to display a different tenant)

curl --insecure -u admin-login:admin-passwd -XPOST https://localhost/common1/api/kibana/dashboards/import -H 'kbn-xsrf:true' -H 'Content-type:application/json' -d @./dashboards.json

Unfortunately, when I run the import command, objects are stored in the .kibana_admin-login index and not in .kibana-common1

How can I specifie explicitly the desired tenant ?

leadwire-apm avatar Aug 23 '18 15:08 leadwire-apm

In the searchguard (entreprise edition), there is a way to import objects in a specified tenant (using the header sg_tenant). Is it possible to do the same operation with own_home ?

curl \
   -u admin-login:admin-passwd \
   -H "sg_tenant: common1" \
   -H 'Content-Type: application/json' \
   -H "kbn-xsrf: true" \
   -XPOST "http://localhost/api/kibana/dashboards/import" \
  -d @./dashboards.json

leadwire-apm avatar Aug 30 '18 06:08 leadwire-apm

I had the same issue when importing index-patterns

Is there a way to properly manage kibana saved_objects api when using this plugin ?

leadwire-apm avatar Sep 14 '18 22:09 leadwire-apm

This problem does not occure when using the gui. I also was able to import dashboard by adding a valid own-home-cookie to curl command (a cookie of a user who has already selected the explicit common index).

I think the problem is about selecting the current index.

WassimDhib avatar Oct 08 '18 09:10 WassimDhib