Facing issue when doing reindexing remotely with X-Pack enabled
Eg:
POST /_reindex { "source": { "remote": { "host": "http://<whitelist-ip>" }, "index": "stage_de" }, "dest": { "index": "live_de" } }
Getting error stating authentication token is missing(validated authentication token is passed in the header):
{ "error": { "root_cause": [ { "type": "status_exception", "reason": "body={\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}" } ], "type": "status_exception", "reason": "body={\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}", "caused_by": { "type": "response_exception", "reason": "GET http://10.203.102.174:9200/: HTTP/1.1 401 Unauthorized\n{\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}" } }, "status": 401 }
While below is working fine(Non remote reindex request)
POST /_reindex
{ "source": { "index": "stage_de" }, "dest": { "index": "live_de" } }
However, the above issue does not appear when X-Pack is disabled