Hi
Am using ElasticSearch 7.17, ROR 1.48.
We’ve noticed an odd behaviour when testing some API calls. We accidentally had a password wrong but the error that resulted was really non obvious. Instead of a response that indicated invalid password, the response instead was a 404 index does not exist, with the index name changed to include an ROR suffix. See below - the response from query against an index that does exist but with a bad password is the same as the response from an index that does not exist but with the correct password!
Is this something off in our configuration - if so any idea what it might be, I can’t see anything obviously wrong!
Or is this just a quirk in the way ROR works? If so, would be great to improve on the error messages here in a future release, as it took us a lot longer than it should have to diagnose and solve this problem!
Thanks,
Adrian
curl -s -u myuser:my_incorrect_password -XGET "http://elasticServer:9200/myindex_that_exists/_search?pretty=true" -H 'Content-Type: application/json' -d '{"query":{"match_all":{}}}'
{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index [myindex_that_exists_ROR_IgnPGL4ZhF]",
"resource.type" : "index_or_alias",
"resource.id" : "myindex_that_exists_ROR_IgnPGL4ZhF",
"index_uuid" : "_na_",
"index" : "myindex_that_exists_ROR_IgnPGL4ZhF"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index [myindex_that_exists_ROR_IgnPGL4ZhF]",
"resource.type" : "index_or_alias",
"resource.id" : "myindex_that_exists_ROR_IgnPGL4ZhF",
"index_uuid" : "_na_",
"index" : "myindex_that_exists_ROR_IgnPGL4ZhF"
},
"status" : 404
}
curl -s -u myuser:my_correct_password -XGET "http://elasticServer:9200/myindex_that_does_not_exist/_search?pretty=true" -H 'Content-Type: application/json' -d '{"query":{"match_all":{}}}'
{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index [myindex_that_does_not_exist]",
"resource.type" : "index_or_alias",
"resource.id" : "myindex_that_does_not_exist",
"index_uuid" : "_na_",
"index" : "myindex_that_does_not_exist"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index [myindex_that_does_not_exist_ROR_IgnPGL4ZhF]",
"resource.type" : "index_or_alias",
"resource.id" : "myindex_that_does_not_exist_ROR_IgnPGL4ZhF",
"index_uuid" : "_na_",
"index" : "myindex_that_does_not_exist_ROR_IgnPGL4ZhF"
},
"status" : 404
}