Elasticsearch put role API

I started using the create role API and it works as expected: https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html

I got the list of default roles in elastic search, /_security/role but I don't know to create the following roles and not able to find the proper docs for it.

I want to segregate the user based on the following needs,

  1. Role which has the privilege to perform only READ / WRITE in all the indices in Elastic Search (This role should not have privilege to CREATE / DELETE indices
  2. Role which has the privilege to perform only operations on Kibana
  3. Role which has the privilege to perform only operations on Logstash

Thanks,
Harry

For your first role creation, try the following

POST /_security/role/my_admin_role
{
  "cluster": ["all"],
    "indices" : [
      {
        "names" : [
          "*"
        ],
        "privileges" : [
          "read",
          "write"
        ],
        "field_security" : {
          "grant" : [
            "*"
          ],
          "except" : [ ]
        },
        "allow_restricted_indices" : false
      }
    ],
    "applications" : [ ],
    "run_as" : [ ],
    "metadata" : { },
    "transient_metadata" : {
      "enabled" : true
    }
}

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