I created a plugin to manage index templates and index settings, however I'm seeing an error that
action [indices:admin/template/get] is unauthorized for user [_system]
I tried adding the superuser role to the _system user, but the error message did not go away. Is there a way to have a plugin run as the elastic user or is there a way to grant the _system user the correct permissions?
For now you can use OriginSettingClient with TASKS_ORIGIN as shown in this piece of code:
The client will internally issue all requests with the _xpack user.
NB: This approach relies on the internals of ES code. There is no backwards compatibility guarantee at this level. The code can change in any future release and possibly break your plugin.
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.