Skip to content

[Feedback]: Missing required cluster privileges #2040

@andreabucci

Description

@andreabucci

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:

  1. 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
}
  1. Execute HEAD _index_template/my_template with a different/unprivileged user. This will throw the 403 - Forbidden.

  2. Add the cluster privilege manage_index_templates to a role attached to the user.

  3. Execute HEAD _index_template/my_template again. It will now return 200 - OK.

Thank you!

Metadata

Metadata

Assignees

Labels

Team:DeveloperIssues owned by the Developer Docs Team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions