1

I'm attempting to make a request to an Elastic.co hosted ElasticSearch instance. I'm receiving this error:

AuthorizationException(403, 'security_exception', 'action [indices:monitor/stats] is unauthorized for user [my-username]')

What is this specifically telling me that I don't have access to? What does indices: mean, and what does monitor or monitor/stats mean? What is this error message trying to tell me?

skyler
  • 465
  • 3
  • 7
  • 17

2 Answers2

1

I think these are index permissions

https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html

monitor - 
All cluster read-only operations, like cluster health and state, hot threads, node info, node and cluster stats, and pending cluster tasks.
Andrei Sura
  • 166
  • 2
1

Depending on the security privileges Andrei shared you wish to use, you would need to first create a new custom role choosing the privileges which go within -> https://www.elastic.co/guide/en/elasticsearch/reference/current/defining-roles.html

I wonder if you can use the built-in roles to get where you want to be -> https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html

Try to update an existing user to assign a new role using the user api -> https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api.html#security-user-apis

POST /_xpack/security/user/jacknich
{
  "password" : "j@rV1s",
  "roles" : [ "admin", "other_role1" ],
  "full_name" : "Jack Nicholson",
  "email" : "jacknich@example.com",
  "metadata" : {
    "intelligence" : 7
  }
}
Thad Megow
  • 11
  • 1