Trying to create role for some applications and got error

Hello!
I try to create some basic roles for some application what connecting to ES 6.8.15, but stuck on simple query:
curl -XGET http://localhost:9200/images/_search -u server:password

output:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "action [indices:data/read/search[phase/query]] is unauthorized for user [server]"
      }
    ],
    "type" : "search_phase_execution_exception",
    "reason" : "all shards failed",
    "phase" : "query",
    "grouped" : true,
    "failed_shards" : [
      {
        "shard" : 0,
        "index" : "images",
        "node" : "-1JT9cU7QjqAZ-B83Iiitg",
        "reason" : {
          "type" : "security_exception",
          "reason" : "action [indices:data/read/search[phase/query]] is unauthorized for user [server]"
        }
      }
    ]
  },
  "status" : 403
}

roles.yml:

application:
  indices:
    - names: [ '*' ]
      privileges: [ 'all' ]

If I add some cluster privileges to 'all', I got something like:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "action [indices:data/read/search] is unauthorized for user [server]"
      }
    ],
    "type" : "security_exception",
    "reason" : "action [indices:data/read/search] is unauthorized for user [server]"
  },
  "status" : 403
}

& I can't understand WHAT privilege need to add for this query?

Resolved problem after creating role from curl X POST...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.