@@ -218,7 +218,6 @@ public void testIsReserved() {
218218 assertThat (ReservedRolesStore .isReserved ("transform_admin" ), is (true ));
219219 assertThat (ReservedRolesStore .isReserved ("watcher_user" ), is (true ));
220220 assertThat (ReservedRolesStore .isReserved ("watcher_admin" ), is (true ));
221- assertThat (ReservedRolesStore .isReserved ("kibana_dashboard_only_user" ), is (true ));
222221 assertThat (ReservedRolesStore .isReserved ("beats_admin" ), is (true ));
223222 assertThat (ReservedRolesStore .isReserved (XPackUser .ROLE_NAME ), is (true ));
224223 assertThat (ReservedRolesStore .isReserved (AsyncSearchUser .ROLE_NAME ), is (true ));
@@ -1037,44 +1036,6 @@ public void testReportingUserRole() {
10371036 assertNoAccessAllowed (reportingUserRole , RestrictedIndicesNames .ASYNC_SEARCH_PREFIX + randomAlphaOfLengthBetween (0 , 2 ));
10381037 }
10391038
1040- public void testKibanaDashboardOnlyUserRole () {
1041- final TransportRequest request = mock (TransportRequest .class );
1042- final Authentication authentication = mock (Authentication .class );
1043-
1044- RoleDescriptor roleDescriptor = new ReservedRolesStore ().roleDescriptor ("kibana_dashboard_only_user" );
1045- assertNotNull (roleDescriptor );
1046- assertThat (roleDescriptor .getMetadata (), hasEntry ("_reserved" , true ));
1047- assertThat (roleDescriptor .getMetadata (), hasEntry ("_deprecated" , true ));
1048-
1049- Role dashboardsOnlyUserRole = Role .builder (roleDescriptor , null ).build ();
1050- assertThat (dashboardsOnlyUserRole .cluster ().check (ClusterHealthAction .NAME , request , authentication ), is (false ));
1051- assertThat (dashboardsOnlyUserRole .cluster ().check (ClusterStateAction .NAME , request , authentication ), is (false ));
1052- assertThat (dashboardsOnlyUserRole .cluster ().check (ClusterStatsAction .NAME , request , authentication ), is (false ));
1053- assertThat (dashboardsOnlyUserRole .cluster ().check (PutIndexTemplateAction .NAME , request , authentication ), is (false ));
1054- assertThat (dashboardsOnlyUserRole .cluster ().check (ClusterRerouteAction .NAME , request , authentication ), is (false ));
1055- assertThat (dashboardsOnlyUserRole .cluster ().check (ClusterUpdateSettingsAction .NAME , request , authentication ), is (false ));
1056- assertThat (dashboardsOnlyUserRole .cluster ().check (MonitoringBulkAction .NAME , request , authentication ), is (false ));
1057- assertThat (dashboardsOnlyUserRole .cluster ().check (DelegatePkiAuthenticationAction .NAME , request , authentication ), is (false ));
1058-
1059- assertThat (dashboardsOnlyUserRole .runAs ().check (randomAlphaOfLengthBetween (1 , 12 )), is (false ));
1060-
1061- final String randomApplication = "kibana-" + randomAlphaOfLengthBetween (8 , 24 );
1062- assertThat (dashboardsOnlyUserRole .application ().grants (new ApplicationPrivilege (randomApplication , "app-random" , "all" ), "*" ),
1063- is (false ));
1064-
1065- final String application = "kibana-.kibana" ;
1066- assertThat (dashboardsOnlyUserRole .application ().grants (new ApplicationPrivilege (application , "app-foo" , "foo" ), "*" ), is (false ));
1067- assertThat (dashboardsOnlyUserRole .application ().grants (new ApplicationPrivilege (application , "app-all" , "all" ), "*" ), is (false ));
1068- assertThat (dashboardsOnlyUserRole .application ().grants (new ApplicationPrivilege (application , "app-read" , "read" ), "*" ), is (true ));
1069-
1070- final String applicationWithRandomIndex = "kibana-.kibana_" + randomAlphaOfLengthBetween (8 , 24 );
1071- assertThat (dashboardsOnlyUserRole .application ().grants (
1072- new ApplicationPrivilege (applicationWithRandomIndex , "app-random-index" , "all" ), "*" ), is (false ));
1073-
1074- assertNoAccessAllowed (dashboardsOnlyUserRole , RestrictedIndicesNames .RESTRICTED_NAMES );
1075- assertNoAccessAllowed (dashboardsOnlyUserRole , RestrictedIndicesNames .ASYNC_SEARCH_PREFIX + randomAlphaOfLengthBetween (0 , 2 ));
1076- }
1077-
10781039 public void testSuperuserRole () {
10791040 final TransportRequest request = mock (TransportRequest .class );
10801041 final Authentication authentication = mock (Authentication .class );
0 commit comments