-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Hello, Team!
Our documentation mentions that HEAD /_template/{name}
requires the cluster privilege manage_index_templates
, but HEAD /_index_template/{name}
does not list it:
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-index-template
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-template
However, lacking this permission throws a 403/Forbidden
error.
Can we please update the _index_template
page with the information below?
Required authorization
Cluster privileges: manage_index_templates
Steps to test/reproduce:
- Create an index_template:
PUT _index_template/my_template
{
"index_patterns": ["my-index-*"],
"template": {
"settings": {
"number_of_shards": 1
},
"mappings": {
"properties": {
"timestamp": {
"type": "date"
},
"mensagem": {
"type": "text"
}
}
}
},
"priority": 1
}
-
Execute
HEAD _index_template/my_template
with a different/unprivileged user. This will throw the403 - Forbidden
. -
Add the cluster privilege
manage_index_templates
to a role attached to the user. -
Execute
HEAD _index_template/my_template
again. It will now return200 - OK
.
Thank you!