opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
8.89k stars 1.63k forks source link

500 error using _render/template #13651

Closed slylock closed 2 weeks ago

slylock commented 2 weeks ago

Describe the bug

After upgrading from 2.7 to 2.11, use of the _render/template api returns a 500 error, even though I'm logged in to Dev Tools with a user that has permission (all_access role).

Example POST (or GET, either one returns error): POST _render/template/my_search_template { "params": { "my_param": "hello",...

Error: { "error": { "root_cause": [ { "type": "security_exception", "reason": "Unexpected exception indices:data/read/search/template" } ], "type": "security_exception", "reason": "Unexpected exception indices:data/read/search/template" }, "status": 500 }

Related component

Search

To Reproduce

GET _render/template/my_search_template { "params": { "my_param": "hello",...

Expected behavior

Should return rendered template, but gives 500 error.

Additional Details

Plugins Please list all plugins currently enabled.

Screenshots If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

Additional context Add any other context about the problem here.

slylock commented 2 weeks ago

Looks to be a duplicate of #3672

peternied commented 2 weeks ago

[Triage - attendees 1 2 3 4 5 6 7 8] @slylock Thanks for creating this issue - that linked item looks to be merged, has this been fixed in a newer version?

cwperks commented 2 weeks ago

@slylock This is a known issue in 2.11.x.

A fix was released in 2.12.0: https://github.com/opensearch-project/OpenSearch/pull/11170