Custom Plugin add filter to search query by external access policies

Hi,
I'm wanting to create a custom plugin. The purpose is to make a rest call to an external service to apply access control polices to search requests. Is there any sample code or an article that would assist?
Appreciated

Hi,
I tried the example authorization engine in the examples. However unless I mis-understood it's functionality it doesn't seem to work. I can load the plugin. However being added to the role makes no difference to may access? Any further information regarding this example?

Just to clarify I'm refering to "security-authorization-engine" example

Hi,
So I got the security-authorization-engine example working with the test cases passing. However when I load into Elasticsearch it seems to make no difference :frowning:
I also converted it to a Maven project and set up as below. Am a missing something in the structure?

Hi,
Still no help from anyone :frowning:
As mentioned all test cases work but when I deploy it doesn't work. I've deployed the rescore plugin with no issues. Do I need to add anything to my yml file?
It deploys. Using against 7.15.0. I'm also using native realm, is that an issue? Wouldn't have thought so.

Hi,
Finally worked out the solution. If anyone wants the answer let me know!