|
11 | 11 | import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsAction;
|
12 | 12 | import org.elasticsearch.action.admin.cluster.state.ClusterStateAction;
|
13 | 13 | import org.elasticsearch.action.admin.cluster.stats.ClusterStatsAction;
|
| 14 | +import org.elasticsearch.action.admin.indices.close.CloseIndexAction; |
14 | 15 | import org.elasticsearch.action.admin.indices.create.CreateIndexAction;
|
15 | 16 | import org.elasticsearch.action.admin.indices.delete.DeleteIndexAction;
|
16 | 17 | import org.elasticsearch.action.admin.indices.get.GetIndexAction;
|
| 18 | +import org.elasticsearch.action.admin.indices.mapping.put.PutMappingAction; |
17 | 19 | import org.elasticsearch.action.admin.indices.recovery.RecoveryAction;
|
18 | 20 | import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsAction;
|
19 | 21 | import org.elasticsearch.action.admin.indices.template.delete.DeleteIndexTemplateAction;
|
@@ -277,6 +279,18 @@ public void testKibanaSystemRole() {
|
277 | 279 | assertThat(kibanaRole.indices().allowedIndicesMatcher(MultiSearchAction.NAME).test(index), is(true));
|
278 | 280 | assertThat(kibanaRole.indices().allowedIndicesMatcher(GetAction.NAME).test(index), is(true));
|
279 | 281 | assertThat(kibanaRole.indices().allowedIndicesMatcher(READ_CROSS_CLUSTER_NAME).test(index), is(false));
|
| 282 | + |
| 283 | + // Tasks index |
| 284 | + final String taskIndex = org.elasticsearch.tasks.TaskResultsService.TASK_INDEX; |
| 285 | + // Things that kibana_system *should* be able to do |
| 286 | + assertThat(kibanaRole.indices().allowedIndicesMatcher(CreateIndexAction.NAME).test(taskIndex), is(true)); |
| 287 | + assertThat(kibanaRole.indices().allowedIndicesMatcher(PutMappingAction.NAME).test(taskIndex), is(true)); |
| 288 | + assertThat(kibanaRole.indices().allowedIndicesMatcher(IndexAction.NAME).test(taskIndex), is(true)); |
| 289 | + assertThat(kibanaRole.indices().allowedIndicesMatcher(GetAction.NAME).test(taskIndex), is(true)); |
| 290 | + // Things that kibana_system *should not* be able to do |
| 291 | + assertThat(kibanaRole.indices().allowedIndicesMatcher(DeleteIndexAction.NAME).test(taskIndex), is(false)); |
| 292 | + assertThat(kibanaRole.indices().allowedIndicesMatcher(DeleteAction.NAME).test(taskIndex), is(false)); |
| 293 | + assertThat(kibanaRole.indices().allowedIndicesMatcher(CloseIndexAction.NAME).test(taskIndex), is(false)); |
280 | 294 | }
|
281 | 295 |
|
282 | 296 | public void testKibanaUserRole() {
|
|
0 commit comments