c918e851f1c02c4ff997de4c42f116ed370975c7
[oom.git] / kubernetes / aai / charts / aai-elasticsearch / resources / config / sg / sg_roles.yml
1 # Allows everything, but no changes to searchguard configuration index
2 sg_all_access:
3   readonly: true
4   cluster:
5     - UNLIMITED
6   indices:
7     '*':
8       '*':
9         - UNLIMITED
10   tenants:
11     admin_tenant: RW
12
13 # Read all, but no write permissions
14 sg_readall:
15   readonly: true
16   cluster:
17     - CLUSTER_COMPOSITE_OPS_RO
18   indices:
19     '*':
20       '*':
21         - READ
22
23 # Read all and monitor, but no write permissions
24 sg_readall_and_monitor:
25   cluster:
26     - CLUSTER_MONITOR
27     - CLUSTER_COMPOSITE_OPS_RO
28   indices:
29     '*':
30       '*':
31         - READ
32
33 # For users which use kibana, access to indices must be granted separately
34 sg_kibana_user:
35   readonly: true
36   cluster:
37     - INDICES_MONITOR
38     - CLUSTER_COMPOSITE_OPS
39   indices:
40     '?kibana':
41       '*':
42         - MANAGE
43         - INDEX
44         - READ
45         - DELETE
46     '?kibana-6':
47       '*':
48         - MANAGE
49         - INDEX
50         - READ
51         - DELETE
52     '?kibana_*':
53       '*':
54         - MANAGE
55         - INDEX
56         - READ
57         - DELETE
58     '?tasks':
59       '*':
60         - INDICES_ALL
61     '?management-beats':
62       '*':
63         - INDICES_ALL
64     '*':
65       '*':
66         - indices:data/read/field_caps*
67         - indices:data/read/xpack/rollup*
68         - indices:admin/mappings/get*
69         - indices:admin/get
70
71 # For the kibana server
72 sg_kibana_server:
73   readonly: true
74   cluster:
75       - CLUSTER_MONITOR
76       - CLUSTER_COMPOSITE_OPS
77       - cluster:admin/xpack/monitoring*
78       - indices:admin/template*
79       - indices:data/read/scroll*
80   indices:
81     '?kibana':
82       '*':
83         - INDICES_ALL
84     '?kibana-6':
85       '*':
86         - INDICES_ALL
87     '?kibana_*':
88       '*':
89         - INDICES_ALL
90     '?reporting*':
91       '*':
92         - INDICES_ALL
93     '?monitoring*':
94       '*':
95         - INDICES_ALL
96     '?tasks':
97       '*':
98         - INDICES_ALL
99     '?management-beats*':
100       '*':
101         - INDICES_ALL
102     '*':
103       '*':
104         - "indices:admin/aliases*"
105
106 # For logstash and beats
107 sg_logstash:
108   cluster:
109     - CLUSTER_MONITOR
110     - CLUSTER_COMPOSITE_OPS
111     - indices:admin/template/get
112     - indices:admin/template/put
113   indices:
114     'logstash-*':
115       '*':
116         - CRUD
117         - CREATE_INDEX
118     '*beat*':
119       '*':
120         - CRUD
121         - CREATE_INDEX
122
123 # Allows adding and modifying repositories and creating and restoring snapshots
124 sg_manage_snapshots:
125   cluster:
126     - MANAGE_SNAPSHOTS
127   indices:
128     '*':
129       '*':
130         - "indices:data/write/index"
131         - "indices:admin/create"
132
133 # Allows each user to access own named index
134 sg_own_index:
135   cluster:
136     - CLUSTER_COMPOSITE_OPS
137   indices:
138     '${user_name}':
139       '*':
140         - INDICES_ALL
141
142 ### X-Pack COMPATIBILITY
143 sg_xp_monitoring:
144   readonly: true
145   cluster:
146     - cluster:monitor/xpack/info
147     - cluster:monitor/main
148     - cluster:admin/xpack/monitoring/bulk
149   indices:
150     '?monitor*':
151       '*':
152         - INDICES_ALL
153
154 sg_xp_alerting:
155   readonly: true
156   cluster:
157     - indices:data/read/scroll
158     - cluster:admin/xpack/watcher*
159     - cluster:monitor/xpack/watcher*
160   indices:
161     '?watches*':
162       '*':
163         - INDICES_ALL
164     '?watcher-history-*':
165       '*':
166         - INDICES_ALL
167     '?triggered_watches':
168       '*':
169         - INDICES_ALL
170     '*':
171       '*':
172         - READ
173         - indices:admin/aliases/get
174
175 sg_xp_machine_learning:
176   readonly: true
177   cluster:
178     - cluster:admin/persistent*
179     - cluster:internal/xpack/ml*
180     - indices:data/read/scroll*
181     - cluster:admin/xpack/ml*
182     - cluster:monitor/xpack/ml*
183   indices:
184     '*':
185       '*':
186         - READ
187         - indices:admin/get*
188     '?ml-*':
189       '*':
190         - "*"
191
192 ### LEGACY ROLES, FOR COMPATIBILITY ONLY
193 ### WILL BE REMOVED IN SG7, DO NOT USE ANYMORE
194
195 sg_readonly_and_monitor:
196   cluster:
197     - CLUSTER_MONITOR
198     - CLUSTER_COMPOSITE_OPS_RO
199   indices:
200     '*':
201       '*':
202         - READ
203
204 # Make xpack monitoring work
205 sg_monitor:
206   cluster:
207     - cluster:admin/xpack/monitoring/*
208     - cluster:admin/ingest/pipeline/put       
209     - cluster:admin/ingest/pipeline/get
210     - indices:admin/template/get
211     - indices:admin/template/put
212     - CLUSTER_MONITOR
213     - CLUSTER_COMPOSITE_OPS
214   indices:
215     '?monitor*':
216       '*':
217         - INDICES_ALL
218     '?marvel*':
219       '*':
220         - INDICES_ALL
221     '?kibana*':
222       '*':
223         - READ
224     '*':
225       '*':
226         - indices:data/read/field_caps
227
228 # Make xpack alerting work
229 sg_alerting:
230   cluster:
231     - indices:data/read/scroll
232     - cluster:admin/xpack/watcher/watch/put
233     - cluster:admin/xpack/watcher*
234     - CLUSTER_MONITOR
235     - CLUSTER_COMPOSITE_OPS
236   indices:
237     '?kibana*':
238       '*':
239         - READ
240     '?watches*':
241       '*':
242         - INDICES_ALL
243     '?watcher-history-*':
244       '*':
245         - INDICES_ALL
246     '?triggered_watches':
247       '*':
248         - INDICES_ALL
249     '*':
250       '*':
251         - READ
252
253
254 sg_role_test:
255   cluster:
256     - indices:admin/template/get
257     - indices:admin/template/put
258     - CLUSTER_COMPOSITE_OPS
259   indices:
260     '*':
261       '*':
262         - UNLIMITED