-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Closed
Copy link
Labels
:Data Management/Indices APIsAPIs to create and manage indices and templatesAPIs to create and manage indices and templates
Description
Due to: #31308
There is an issue with security when retrieving all aliases and no indices exist.
Reproduction:
- Use a 6.4.0-SNAPSHOT build with
xpack.security.enabled: trueinelasticsearch.yml - Configure a file realm user with superuser role
- Start elasticsearch and start an x-pack trial
- Then attempt to retrieve all aliases:
~/elasticsearch-6.4.0-SNAPSHOT λ curl -XGET -u"foo:bar" "localhost:9200/_aliases"
{}
~/elasticsearch-6.4.0-SNAPSHOT λ curl -XPOST "localhost:9200/_xpack/license/start_trial?acknowledge=true"
{"acknowledged":true,"trial_was_started":true,"type":"trial"}
~/elasticsearch-6.4.0-SNAPSHOT λ curl -XGET -u"foo:bar" "localhost:9200/_aliases"
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","index":"_all"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","index":"_all"},"status":404}
With 38b1a5f reverted, the correct behavior can be seen:
~/elasticsearch-6.4.0-SNAPSHOT λ curl -XGET -u"foo:bar" "localhost:9200/_aliases"
{}
~/elasticsearch-6.4.0-SNAPSHOT λ curl -XPOST "localhost:9200/_xpack/license/start_trial?acknowledge=true"
{"acknowledged":true,"trial_was_started":true,"type":"trial"}
~/elasticsearch-6.4.0-SNAPSHOT λ curl -XGET -u"foo:bar" "localhost:9200/_aliases"
{}
Metadata
Metadata
Assignees
Labels
:Data Management/Indices APIsAPIs to create and manage indices and templatesAPIs to create and manage indices and templates