# authorizeIndexAction never gets called for custom AuthorizationEngine plugin

**URL:** <https://discuss.elastic.co/t/authorizeindexaction-never-gets-called-for-custom-authorizationengine-plugin/320921>\
**Category:** Elasticsearch\
**Created:** [December 9, 2022, 7:23pm UTC](https://discuss.elastic.co/t/authorizeindexaction-never-gets-called-for-custom-authorizationengine-plugin/320921 "2022-12-09T19:23:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamsandor](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@adamsandor](https://discuss.elastic.co/u/adamsandor)\
**Post date:** [December 9, 2022, 7:23pm UTC](https://discuss.elastic.co/t/authorizeindexaction-never-gets-called-for-custom-authorizationengine-plugin/320921/1 "2022-12-09T19:23:16Z")

</div>

I'm building a plugin that would execute some custom authorization logic, namely integrating the OpenPolicyAgent into the authorization flow of ES. I have implemented the `org.elasticsearch.xpack.core.security.authz.AuthorizationEngine` interface in my plugin. It works as far as I'm seeing one method of my plugin being called by ES, but only that one (`validateIndexPermissionsAreSubset`).  
The one where I see I could actually modify the authorization of the search or getting of documents is (as far as I understand from the docs) is `authorizeIndexAction`. That one however never get's called. But neither do `resolveAuthorizationInfo` or `authorizeClusterAction`. Can anyone help me out if I'm on the right track here and what could be the problem?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 6, 2023, 7:23pm UTC](https://discuss.elastic.co/t/authorizeindexaction-never-gets-called-for-custom-authorizationengine-plugin/320921/2 "2023-01-06T19:23:36Z")

</div>

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