Update Search Guard users/roles/groups

cf. https://github.com/floragunncom/search-guard/tree/master/sgconfig
parent 38389783
UNLIMITED:
readonly: true
permissions:
- "*"
###### INDEX LEVEL ######
INDICES_ALL:
readonly: true
permissions:
- "indices:*"
# for backward compatibility
ALL: ALL:
- "indices:*" readonly: true
permissions:
- INDICES_ALL
MANAGE: MANAGE:
- "indices:monitor/*" readonly: true
- "indices:admin/*" permissions:
- "indices:monitor/*"
- "indices:admin/*"
CREATE_INDEX: CREATE_INDEX:
- "indices:admin/create" readonly: true
- "indices:admin/mapping/put" permissions:
- "indices:admin/create"
- "indices:admin/mapping/put"
MANAGE_ALIASES: MANAGE_ALIASES:
- "indices:admin/aliases*" readonly: true
permissions:
- "indices:admin/aliases*"
# for backward compatibility
MONITOR: MONITOR:
- "indices:monitor/*" readonly: true
permissions:
- INDICES_MONITOR
INDICES_MONITOR:
readonly: true
permissions:
- "indices:monitor/*"
DATA_ACCESS: DATA_ACCESS:
- "indices:data/*" readonly: true
- "indices:admin/mapping/put" permissions:
- "indices:data/*"
- CRUD
WRITE: WRITE:
- "indices:data/write*" readonly: true
- "indices:admin/mapping/put" permissions:
- "indices:data/write*"
- "indices:admin/mapping/put"
READ: READ:
- "indices:data/read*" readonly: true
permissions:
- "indices:data/read*"
- "indices:admin/mappings/fields/get*"
DELETE: DELETE:
- "indices:data/write/delete*" readonly: true
permissions:
- "indices:data/write/delete*"
CRUD: CRUD:
- READ readonly: true
- WRITE permissions:
- READ
- WRITE
SEARCH: SEARCH:
- "indices:data/read/search*" readonly: true
- "indices:data/read/msearch*" permissions:
- SUGGEST - "indices:data/read/search*"
- "indices:data/read/msearch*"
- SUGGEST
SUGGEST: SUGGEST:
- "indices:data/read/suggest*" readonly: true
permissions:
- "indices:data/read/suggest*"
INDEX: INDEX:
- "indices:data/write/index*" readonly: true
- "indices:data/write/update*" permissions:
- "indices:admin/mapping/put" - "indices:data/write/index*"
# no bulk index - "indices:data/write/update*"
- "indices:admin/mapping/put"
- "indices:data/write/bulk*"
GET: GET:
- "indices:data/read/get*" readonly: true
- "indices:data/read/mget*" permissions:
- "indices:data/read/get*"
- "indices:data/read/mget*"
###### CLUSTER LEVEL ######
# CLUSTER
CLUSTER_ALL: CLUSTER_ALL:
- cluster:* readonly: true
permissions:
- "cluster:*"
CLUSTER_MONITOR: CLUSTER_MONITOR:
- cluster:monitor/* readonly: true
permissions:
- "cluster:monitor/*"
CLUSTER_COMPOSITE_OPS_RO: CLUSTER_COMPOSITE_OPS_RO:
- "indices:data/read/mget" readonly: true
- "indices:data/read/msearch" permissions:
- "indices:data/read/mtv" - "indices:data/read/mget"
- "indices:data/read/coordinate-msearch*" - "indices:data/read/msearch"
- "indices:admin/aliases/exists*" - "indices:data/read/mtv"
- "indices:admin/aliases/get*" - "indices:data/read/coordinate-msearch*"
- "indices:admin/aliases/exists*"
- "indices:admin/aliases/get*"
- "indices:data/read/scroll"
CLUSTER_COMPOSITE_OPS: CLUSTER_COMPOSITE_OPS:
- "indices:data/write/bulk" readonly: true
- "indices:admin/aliases*" permissions:
- CLUSTER_COMPOSITE_OPS_RO - "indices:data/write/bulk"
- "indices:admin/aliases*"
\ No newline at end of file - CLUSTER_COMPOSITE_OPS_RO
MANAGE_SNAPSHOTS:
readonly: true
permissions:
- "cluster:admin/snapshot/*"
- "cluster:admin/repository/*"
# This is the internal user database
# The hash value is a bcrypt hash and can be generated with plugin/tools/hash.sh
#password is: admin
admin: admin:
readonly: true
hash: $2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG hash: $2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG
#password is: admin roles:
- admin
#password is: logstash
logstash: logstash:
readonly: true
hash: $2a$12$u1ShR4l4uBS3Uv59Pa2y5.1uQuZBrZtmNfqB3iM/.jL0XoV9sghS2 hash: $2a$12$u1ShR4l4uBS3Uv59Pa2y5.1uQuZBrZtmNfqB3iM/.jL0XoV9sghS2
#password is: logstash roles:
- logstash
#password is: kibanaserver
kibanaserver: kibanaserver:
readonly: true
hash: $2a$12$4AcgAt3xwOWadA5s5blL6ev39OXDNhmOesEoo33eZtrq2N0YrU3H. hash: $2a$12$4AcgAt3xwOWadA5s5blL6ev39OXDNhmOesEoo33eZtrq2N0YrU3H.
#password is: kibanaserver
#password is: kibanaro
kibanaro: kibanaro:
readonly: true
hash: $2a$12$JJSXNfTowz7Uu5ttXfeYpeYE0arACvcwlPBStB1F.MI7f0U9Z4DGC hash: $2a$12$JJSXNfTowz7Uu5ttXfeYpeYE0arACvcwlPBStB1F.MI7f0U9Z4DGC
#password is: kibanaro roles:
- kibanauser
- readall
#password is: readall
readall:
hash: $2a$12$ae4ycwzwvLtZxwZ82RmiEunBbIPiAmGZduBAjKN0TXdwQFtCwARz2
#password is: readall
roles:
- readall
#password is: snapshotrestore
snapshotrestore:
hash: $2y$12$DpwmetHKwgYnorbgdvORCenv4NAK8cPUg8AI6pxLCuWf/ALc0.v7W
roles:
- snapshotrestore
# Allows everything, but no changes to searchguard configuration index
sg_all_access: sg_all_access:
readonly: true
cluster: cluster:
- '*' - UNLIMITED
indices: indices:
'*': '*':
'*': '*':
- '*' - UNLIMITED
tenants:
admin_tenant: RW
sg_kibana: # Read all, but no write permissions
sg_readall:
readonly: true
cluster: cluster:
- CLUSTER_COMPOSITE_OPS_RO - CLUSTER_COMPOSITE_OPS_RO
indices:
'*':
'*':
- READ
# Read all and monitor, but no write permissions
sg_readall_and_monitor:
cluster:
- CLUSTER_MONITOR - CLUSTER_MONITOR
- CLUSTER_COMPOSITE_OPS_RO
indices: indices:
'*': '*':
'*': '*':
- READ - READ
- indices:admin/mappings/fields/get*
# For users which use kibana, access to indices must be granted separately
sg_kibana_user:
readonly: true
cluster:
- MONITOR
- CLUSTER_COMPOSITE_OPS_RO
indices:
'?kibana': '?kibana':
'*': '*':
- MANAGE
- INDEX
- READ - READ
- WRITE - DELETE
- 'indices:admin/mappings/fields/get*' '*':
- 'indices:admin/refresh*' '*':
- indices:data/read/field_caps
# For the kibana server
sg_kibana_server: sg_kibana_server:
readonly: true
cluster: cluster:
- CLUSTER_MONITOR - CLUSTER_MONITOR
- CLUSTER_COMPOSITE_OPS - CLUSTER_COMPOSITE_OPS
- cluster:admin/xpack/monitoring*
- indices:admin/template*
indices: indices:
'?kibana': '?kibana':
'*': '*':
- ALL - INDICES_ALL
'?reporting*':
'*':
- INDICES_ALL
'?monitoring*':
'*':
- INDICES_ALL
# For logstash and beats
sg_logstash: sg_logstash:
readonly: true
cluster: cluster:
- indices:admin/template/get
- indices:admin/template/put
- CLUSTER_MONITOR - CLUSTER_MONITOR
- CLUSTER_COMPOSITE_OPS - CLUSTER_COMPOSITE_OPS
- indices:admin/template/get
- indices:admin/template/put
indices: indices:
'logstash-*': 'logstash-*':
'*': '*':
- CRUD - CRUD
- CREATE_INDEX - CREATE_INDEX
'*beat*':
'*':
- CRUD
- CREATE_INDEX
# Allows adding and modifying repositories and creating and restoring snapshots
sg_manage_snapshots:
readonly: true
cluster:
- MANAGE_SNAPSHOTS
indices:
'*':
'*':
- "indices:data/write/index"
- "indices:admin/create"
# Allows each user to access own named index
sg_own_index:
cluster:
- CLUSTER_COMPOSITE_OPS
indices:
'${user_name}':
'*':
- INDICES_ALL
# In this file users, backendroles and hosts can be mapped to Search Guard roles.
# Permissions for Search Guard roles are configured in sg_roles.yml
sg_all_access:
readonly: true
backendroles:
- admin
sg_logstash: sg_logstash:
users: backendroles:
- logstash - logstash
sg_kibana_server: sg_kibana_server:
readonly: true
users: users:
- kibanaserver - kibanaserver
sg_kibana: sg_kibana_user:
users: backendroles:
- kibanaro - kibanauser
sg_all_access: sg_readall:
readonly: true
backendroles:
- readall
sg_manage_snapshots:
readonly: true
backendroles:
- snapshotrestore
sg_own_index:
users: users:
- admin - '*'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment