Indices rule - Index not found scenario
readonlyrest: enable: true access_control_rules: - name: "user A indices" indices: ["index_a"] auth_key: userA:secret - name: "user B indices" indices: ["indexB"] auth_key: userB:secret$ curl -v -u userA:secret "http://127.0.0.1:9200/index_a?pretty" HTTP/1.1 200 OK content-type: application/json; charset=UTF-8 content-length: 611 { "index_a" : { "aliases" : { }, "mappings" : { ... } "settings" : { ... } } }$ curl -i -u userA:secret "http://127.0.0.1:9200/nonexistent?pretty" 18:15:28 HTTP/1.1 404 Not Found content-type: application/json; charset=UTF-8 content-length: 634 { "error" : { "root_cause" : [ ... ], "type" : "index_not_found_exception", "reason" : "no such index [nonexistent_ROR_ZA1FXDsR7M]", "resource.type" : "index_or_alias", "resource.id" : "nonexistent_ROR_ZA1FXDsR7M", "index_uuid" : "_na_", "index" : "nonexistent_ROR_ZA1FXDsR7M" }, "status" : 404 }$ curl -v -u userA:secret "http://127.0.0.1:9200/index_b?pretty" HTTP/1.1 404 Not Found content-type: application/json; charset=UTF-8 content-length: 610 { "error" : { "root_cause" : [ ... ], "type" : "index_not_found_exception", "reason" : "no such index [index_b_ROR_QcskliAl8A]", "resource.type" : "index_or_alias", "resource.id" : "index_b_ROR_QcskliAl8A", "index_uuid" : "_na_", "index" : "index_b_ROR_QcskliAl8A" }, "status" : 404 }$ curl -i -u userA:secret "http://127.0.0.1:9200/index*?pretty" 19:58:29 HTTP/1.1 200 OK content-type: application/json; charset=UTF-8 content-length: 611 { "index_a" : { "aliases" : { }, "mappings" : { ... }, "settings" : { ... } } }$ curl -i -u userA:secret "http://127.0.0.1:9200/index_userA*?pretty" 20:05:10 HTTP/1.1 200 OK content-type: application/json; charset=UTF-8 content-length: 4 { }$ curl -i -u userA:secret "http://127.0.0.1:9200/index_b*?pretty" 20:14:34 HTTP/1.1 200 OK content-type: application/json; charset=UTF-8 content-length: 4 { }
Last updated