No permissions for [indices:admin/get]

I have a user to whom I have provided the role using the below command.

**bash-4.2$ curl -XPUT -u elastic:XXX -k https://localhost:9200/_opendistro/_security/api/roles/XXXX_role -d '{"cluster": ["CLUSTER_ALL"],"indices": {"XXXX-*":{"*": ["INDICES_ALL","indices:admin/get"]}}}' -H "Content-Type: application/json"**

I getting the below response
{“status”:“OK”,“message”:“‘XXXX_role’ updated.”}

However when I invoke the below command for aliases, I get error

bash-4.2$ curl -u XXXX:XX -k https://localhost:9200/_alias

{“error”:{“root_cause”:[{“type”:“security_exception”,“reason”:“no permissions for [indices:admin/get] and User [name=XXXX, roles=[], requestedTenant=null]”}],“type”:“security_exception”,“reason”:“no permissions for [indices:admin/get] and User [name=XXXX, roles=[], requestedTenant=null]”},“status”:403}

Can anyone help me on what I am doing wrong.

Thanks in Advance.

Deepak Sahu

1 Like

@deepaksahu Did you get this resolved? According to the error message it would appear that there is no role mapped to the user. Did you create the role mapping for the user?