@TimV you can follow the steps to reproduce
Create the ROLE
curl -XPUT -H 'Content-Type: application/json' -k -u user:password
https://hostname:9200/_xpack/security/role/test
-d'{
"cluster": [],
"indices": [
{"names": ["testing"],
"privileges": ["read","view_index_metadata"]
}
]
}'
Create the user
curl -XPUT -H 'Content-Type: application/json' -k -u user:password
https://hostname:9200/_xpack/security/user/user_name
-d'{
"password": "password",
"roles" : ["kibana_user","test"],
}'
Create index with alias
curl -XPUT -H 'Content-Type: application/json' -k -u user:password
https://hostname:9200/failed-000001
-d'{
"aliases": {
"testing":{
"is_write_index": true
}
}
}'
Posting the doc
curl -XPOST -H 'Content-Type: application/json' -k -u user:password
https://hostname:9200/testing/_doc
-d'{
"name": "test"
}'
able to search the data with alias name
GET testing/_search
but unable to query the data with index or index pattern
GET failed-000001/_search
Error is
"reason" : "action [indices:data/read/search] is unauthorized..."
with index pattern getting no doc
GET failed*/_search
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 0,
"successful" : 0,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 0,
"relation" : "eq"
},
"max_score" : 0.0,
"hits" : [ ]
}
}