X-Opaque-Id being ignored

The OpenDistro docs here show that you can attach an X-Opaque-Id header to a request and the response headers should return it. This is not happening on my AWS Elasticsearch Service (v 7.9). The headers are sometimes showing up in the task list, but not in the response headers. I’m unable to use the task cancellation API because my searches do not retain the X-Opaque-Id headers. By contrast, our cluster running vanilla Elasticsearch (not OpenDistro) on EC2 handles this just fine.

❮ curl -i --http1.1 -H 'X-Opaque-Id: 12345' --basic -u "${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" "${ELASTICSEARCH_URL}/_tasks?group_by=parents"
HTTP/1.1 200 OK
Date: Wed, 18 Aug 2021 02:27:56 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 19373
Connection: keep-alive
Access-Control-Allow-Origin: *

It turns out this is AWS Elasticsearch Service not accepting custom headers. Be warned!

hey @cigrainger - I’ve been looking into this. I’m not sure if this is a feature or a bug :thinking:

I hope to have an answer to that question by next week.

1 Like

Hi @cigrainer, Thanks for bringing this up. Since this is specific to the Amazon Elasticsearch Service, could you please reach out to the AWS customer support team who can help you with this.

1 Like