Skip to content

Instantly share code, notes, and snippets.

@lemig
Created March 31, 2017 10:00
Show Gist options
  • Save lemig/42a22f46520f68fa05f28cad953aa242 to your computer and use it in GitHub Desktop.
Save lemig/42a22f46520f68fa05f28cad953aa242 to your computer and use it in GitHub Desktop.
Search Guard roles
# Allows any action on the cluster.
sg_all_access:
cluster:
- '*'
indices:
'*':
'*':
- '*'
# Allows reading data from all indices.
sg_readall:
indices:
'*':
'*':
- READ
# Permissions for a Logstash client.
logstash:
cluster:
- indices:admin/template/get
- indices:admin/template/put
indices:
'logstash-*':
'*':
- CRUD
- CREATE_INDEX
'*beat*':
'*':
- CRUD
- CREATE_INDEX
# Permissions for the Kibi transport client.
kibitransport:
cluster:
- cluster:monitor/nodes/liveness
# Permissions for the Kibi server process.
kibiserver:
cluster:
- cluster:monitor/nodes/info
- cluster:monitor/health
- cluster:monitor/state
- cluster:monitor/nodes/stats
- KIBI_CLUSTER
indices:
'*':
'*':
- indices:data/read/search
- indices:data/read/get
- indices:data/write/index
- indices:monitor/stats
- indices:admin/mapping/put
- indices:admin/get
- indices:admin/refresh
- indices:admin/refresh[s]
- indices:admin/mappings/get
'?kibi':
'*':
- ALL
# Permissions for a Sentinl user.
sentinl:
cluster:
- KIBI_CLUSTER
indices:
'*':
'*':
- KIBI_READONLY
'watcher_alarms*':
'*':
- KIBI_READWRITE
- indices:admin/template/get
- indices:admin/template/put
- CREATE_INDEX
'/(watcher|watcher_alarms)/':
'*':
- KIBI_READWRITE
- indices:admin/template/get
- indices:admin/template/put
- CREATE_INDEX
# Permissions for a Kibi administrator (read-write access to the .kibi index).
kibiadmin:
cluster:
- KIBI_CLUSTER
- cluster:admin/plugin/siren/license/put
indices:
'*':
'*':
- KIBI_READONLY
- indices:data/read/scroll/clear
- indices:data/write/index
- indices:data/write/read
- indices:data/write/delete
- indices:data/write/update
'watcher':
'*':
- KIBI_READWRITE
'?kibi':
'*':
- KIBI_READWRITE
# Permissions for a Kibi user (read only access to the .kibi index).
kibiuser:
cluster:
- KIBI_CLUSTER
indices:
'?kibi':
'*':
- KIBI_READONLY
'watcher':
'*':
- KIBI_READONLY
'watcher_alarms*':
'*':
- KIBI_READONLY
'/(article|investment|company|investor)/':
'*':
- KIBI_READONLY
'*':
'*':
- KIBI_MSEARCH
# Permissions for a Kibi user (read only), with no access to the investor index.
kibinoinvestor:
cluster:
- KIBI_CLUSTER
indices:
'?kibi':
'*':
- KIBI_READONLY
'/(article|company|investment)/':
'*':
- KIBI_READONLY
'*':
'*':
- KIBI_MSEARCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment