Using settings from elasticsearch.yml in a plugin


I'm creating a plugin that blacklists certain API calls. Right now I've created a .yml file in the src/main/resources directory of my project, where I read the blacklisted APIs from.
The problem is, if I want to add more blacklisted API's to the list, I have to remove the plugin, change the yml file, rebuild and reinstall the plugin. I'd like my plugin to be able to read directly from elasticsearch.yml, so that I don't have to do this. Is this possible?
Any suggestions would be greatly appreciated.


It's possible. You need to declare some settings for that.

Here is an example of settings:

And how you declare them in the plugin:


1 Like

Thanks a lot! This is exactly what I needed

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