Skip to content

Latest commit

 

History

History
224 lines (169 loc) · 6.39 KB

roles.md

File metadata and controls

224 lines (169 loc) · 6.39 KB

roles

Usage

$ ezmesure-admin roles --help

Commands

Name Description
add Create new role
delete [roles...] Delete role(s)
edit [role] Edit role
get Get and display role(s) informations
update Update role informations

Commands details

add

Usage

$ ezmesure-admin roles add --help
Name Type Description
-i, --index-pattern String Index-pattern name (e.g: my-index, m-y-index*)
-s, --space String Space name, case sensitive
-p, --privileges String Privileges (all or read)
-r, --read-only String Create role with read privileges and _read_only suffix

Example :

$ ezmesure-admin roles add my-role --space my-space --index-pattern my-index --privileges read --read-only

role [my-role] created or updated
role [my-role_read_only] created or updated

delete

Usage

$ ezmesure-admin roles delete --help

Example :

$ ezmesure-admin roles delete newRole

role [newRole] deleted succefully

get

Usage

$ ezmesure-admin roles get --help

Options

Name Type Description
-a, --all String Display all data in table
-j, --json Boolean Display data in json
--nd Boolean Display data in nd

Example :

$ ezmesure-admin roles get apm_system

╔═════════════════════════════╤════════════════════════════════════════════════════════════════════════════════════════╤═════════════════════════════╗
║ role                        │ indices                                                                                │ spaces                      ║
╟─────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────╢
║ apm_system                  │ Names:                                                                                 │ Space:                      ║
║                             │ Privileges:                                                                            │ Privileges:                 ║
╚═════════════════════════════╧════════════════════════════════════════════════════════════════════════════════════════╧═════════════════════════════╝

update

Usage

$ ezmesure-admin roles update --help

Options

Name Type Description
--space-add String Add space with privileges
--space-remove String Remove space(s)
--index-add String Add index with privileges
--index-remove String Remove index(ces)

⚠️ --space-add or --index-add adds a new space/index but is also used to update space and index privileges.


The update does not add the new privileges to the old ones, so remember to put them back when you use the command if you need to keep them.

Examples :

Add space(s)
$ ezmesure-admin roles update myRole --space-add <spaceName>:<privileges>
Privileges
all
read
custom
$ ezmesure-admin roles update myRole --space-add my-space:all

role [myRole] updated successfully

If you want to use custom privileges, the name of the feature kibana and the privileges on the feature are separated by a dash, the syntax is as follows

$ ezmesure-admin roles update myRole --space-add my-space:<feature>-<privileges>

Features

  • discover
  • visualize
  • dashboard
  • dev_tools
  • advancedSettings
  • indexPatterns
  • savedObjectsManagement
  • graph
  • monitoring
  • ml
  • apm
  • maps
  • canvas
  • infrastructure
  • logs
  • siem
  • uptime
  • ezreporting
  • discover
  • visualize
  • dashboard
  • dev_tools
  • advancedSettings
  • indexPatterns
  • savedObjectsManagement
  • graph
  • monitoring
  • ml
  • apm
  • maps
  • canvas
  • infrastructure
  • logs
  • siem
  • uptime
  • ezreporting

Example

$ ezmesure-admin roles update myRole --space-add my-space:discover-all

role [myRole] updated successfully

The Kibana feature privileges are separated by a comma, as follows

$ ezmesure-admin roles update myRole --space-add my-space:discover-all,dashboard:read

role [myRole] updated successfully
Remove space(s)

Spaces must be separated by a comma.

$ ezmesure-admin roles update myRole --space-remove my-space,my-other-space

role [myRole] updated successfully
Remove index(ces)

Indices must be separated by a comma.

$ ezmesure-admin roles update myRole --index-remove my-index,my-other-index

role [myRole] updated successfully
Add index(ces)
$ ezmesure-admin roles update myRole --index-add <indexName>:<privileges>
Privileges
all
read
custom
  • create
  • create_index
  • delete
  • delete_index
  • index
  • manage
  • manage_follow_index
  • manage_ilm
  • manage_leader_index
  • monitor
  • read_cross_cluster
  • view_index_metadata
  • write
$ ezmesure-admin roles update myRole --index-add my-index:all

role [myRole] updated successfully