We are on elastic version 8.8.1, build_flavor is default and build_type is docker. We have created an user test_user with role role_1 which has access to index_1 and no other index.
We are noticing a security issue that when I login as that user test_user and try to access abc to which it does not have access. When I execute command in dev console or curl multiple times to access index abc, I get security exception which is fine.
ISSUE: But on some attempts it shows the data which should NOT happen. When I execute the command some times I get security exception error (Correct) and sometimes I can see the data (ISSUE) . Has anyone faced this issue? Do we know what is the root cause or any recommendation for next step?
Below are the test and results
curl -XGET --user "test_user:password" "https://o11y-dev-es.idcmgt.intel.com/abc/_count" -H "kbn-xsrf: reporting"
{"error":{"root_cause":[{"type":"security_exception","reason":"action [indices:data/read/search] is unauthorized for user [test_user] with effective roles [test_user] on indices [abc], this action is granted by the index privileges [read,all]"}],"type":"security_exception","reason":"action [indices:data/read/search] is unauthorized for user [test_user] with effective roles [test_user] on indices [abc], this action is granted by the index privileges [read,all]"},"status":403}
curl -XGET --user "test_user:password" "https://o11y-dev-es.idcmgt.intel.com/abc/_count" -H "kbn-xsrf: reporting"
{"count":907938,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0}}
curl -XGET --user "test_user:password" "https://o11y-dev-es.idcmgt.intel.com/abc/_count" -H "kbn-xsrf: reporting"
{"count":907938,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0}}
curl -XGET --user "test_user:password" "https://o11y-dev-es.idcmgt.intel.com/abc/_count" -H "kbn-xsrf: reporting"
{"count":907938,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0}}
curl -XGET --user "test_user:password" "https://o11y-dev-es.idcmgt.intel.com/abc/_count" -H "kbn-xsrf: reporting"
{"error":{"root_cause":[{"type":"security_exception","reason":"action [indices:data/read/search] is unauthorized for user [test_user] with effective roles [test_user] on indices [abc], this action is granted by the index privileges [read,all]"}],"type":"security_exception","reason":"action [indices:data/read/search] is unauthorized for user [test_user] with effective roles [test_user] on indices [abc], this action is granted by the index privileges [read,all]"},"status":403}
curl -XGET --user "test_user:password" "https://o11y-dev-es.idcmgt.intel.com/abc/_count" -H "kbn-xsrf: reporting"
{"error":{"root_cause":[{"type":"security_exception","reason":"action [indices:data/read/search] is unauthorized for user [test_user] with effective roles [test_user] on indices [abc], this action is granted by the index privileges [read,all]"}],"type":"security_exception","reason":"action [indices:data/read/search] is unauthorized for user [test_user] with effective roles [test_user] on indices [abc], this action is granted by the index privileges [read,all]"},"status":403}
Thanks.