elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

Introduce role description field

Open slobodanadamovic opened this issue 10 months ago • 3 comments

This PR introduces new description field to roles definitions.

Role API:

POST /_security/role/viewer
{
  "description": "Grants permission to view all indices.",
  "indices": [
    {
      "names": [ "*" ],
      "privileges": [ "read" , "view_index_metadata"]
    }
  ]
}

File-based role:

viewer:
  description: 'Grants permission to view all indices.' 
  indices:
    - names: [ '*' ]
      privileges: [ 'read', 'view_index_metadata' ]

Note: I will address the doc changes in a followup PR.

slobodanadamovic avatar Apr 04 '24 09:04 slobodanadamovic

Hi @slobodanadamovic, I've created a changelog YAML for you.

elasticsearchmachine avatar Apr 04 '24 10:04 elasticsearchmachine

Pinging @elastic/es-security (Team:Security)

elasticsearchmachine avatar Apr 26 '24 06:04 elasticsearchmachine

Additionally, we could add descriptions for all existing pre-defined roles. But, I would prefer to do this in a follow up (maybe as part of doc changes).

slobodanadamovic avatar Apr 26 '24 11:04 slobodanadamovic