Run script during external plugin installation

Hi,

I am developing a custom external plugin in Kibana using React.

As far as I know, anyone can install the plugin into Kibana, given they have access to /usr/share/kibana folder

I want to run a a script during my plugin installation, so that I can may be restrict plugin installation or ask for extra key/input from user to authorize the installation. How can I achieve this?

Thanks

Hi @Sheereen,

I'm aware of the setup lifecycle function for a plugin, so perhaps you could use some saved context to see if this is the first time the plugin is being used. But I'm not aware of any way to do this on install. You would also need to be comfortable changing this between version as the plugin API isn't stable or backward compatible.

I'm not sure which actions you're wanting to do on installation, but I would ensure they adhere to the security best practices to avoid introducing a vulnerability that could impact your cluster.

Hope that helps!

1 Like

Thanks a lot carly for the detailed explanation. :grinning: