I have a custom plugin created, I want to get current user login details to check whether the user is admin or not. I found out Elasticseach API client.security.authenticate() this can be used to do so, but I did not get any proper way to use it.
Can anybody reply with the procedure to do so? How can I use this call in kibana plugin public/components/app.tsx or in server.route call?
Which privileges do you need the user to have? There are a lot of different options. You could look at the user and roles settings to determine what you need and then we could find a programmatic way to check.
I am developing for kibana-7.10.2.
I don't want to give any privileges to user. I want to check what privileges user has. For example: user1 logged in through kibana and that user has backend role as admin. then that user1 should be able to access plugin page. if it does not has backend role as admin, that user shouldn't be able to access the plugin page.
yes, for above scenario I want to do it programmatically in kibana client side or server side.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.