Hello!
I have the same problem with templates as @silver_searcher.
My configured role is
{
"test-user-role" : {
"reserved" : false,
"hidden" : false,
"cluster_permissions" : [
"cluster_composite_ops",
"cluster_manage_index_templates"
],
"index_permissions" : [
{
"index_patterns" : [
"test*"
],
"dls" : "",
"fls" : [ ],
"masked_fields" : [ ],
"allowed_actions" : [
"crud",
"create_index",
"manage_aliases"
]
}
],
"tenant_permissions" : [ ],
"static" : false
}
}
I have tried to create template by ‘test-user’ user with above role
curl -u test-user:*** -XPUT http://localhost:9200/_index_template/test -H "Accept:application/json" -H "Content-Type:application/json" -d'{
"index_patterns": [
"test*"
],
"template": {
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1
}
}
}'
but I have received the following error:
{"error":{"root_cause":[{"type":"security_exception","reason":"no permissions for [indices:admin/index_template/put] and User [name=test-user, backend_roles=[], requestedTenant=null]"}],"type":"security_exception","reason":"no permissions for [indices:admin/index_template/put] and User [name=test-user, backend_roles=[], requestedTenant=null]"},"status":403}
Moreover, I noticed that cluster_manage_index_templates
action group contains indices:admin/template/*
permissions, not indices:admin/index_template/*
that are specified in error.
Besides, adding indices:admin/index_template/put
permission does not solve the problem.