@@ -1710,6 +1710,40 @@ public void testKibanaSystemRole() {
17101710 );
17111711 assertThat (kibanaRole .indices ().allowedIndicesMatcher (TransportPutMappingAction .TYPE .name ()).test (indexAbstraction ), is (true ));
17121712 assertThat (kibanaRole .indices ().allowedIndicesMatcher (RolloverAction .NAME ).test (indexAbstraction ), is (true ));
1713+ // Implied by the overall view_index_metadata and monitor privilege
1714+ assertViewIndexMetadata (kibanaRole , indexName );
1715+ assertThat (kibanaRole .indices ().allowedIndicesMatcher ("indices:monitor/" ).test (indexAbstraction ), is (true ));
1716+ });
1717+
1718+ Arrays .asList (
1719+ "logs-m365_defender.vulnerability-" + randomAlphaOfLength (randomIntBetween (0 , 13 )),
1720+ "logs-microsoft_defender_endpoint.vulnerability-" + randomAlphaOfLength (randomIntBetween (0 , 13 ))
1721+ ).forEach (indexName -> {
1722+ final IndexAbstraction indexAbstraction = mockIndexAbstraction (indexName );
1723+ assertThat (kibanaRole .indices ().allowedIndicesMatcher ("indices:foo" ).test (indexAbstraction ), is (false ));
1724+ assertThat (kibanaRole .indices ().allowedIndicesMatcher ("indices:bar" ).test (indexAbstraction ), is (false ));
1725+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (TransportDeleteIndexAction .TYPE .name ()).test (indexAbstraction ), is (true ));
1726+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (GetIndexAction .NAME ).test (indexAbstraction ), is (true ));
1727+ assertThat (
1728+ kibanaRole .indices ().allowedIndicesMatcher (TransportCreateIndexAction .TYPE .name ()).test (indexAbstraction ),
1729+ is (false )
1730+ );
1731+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (TransportIndexAction .NAME ).test (indexAbstraction ), is (false ));
1732+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (TransportDeleteAction .NAME ).test (indexAbstraction ), is (false ));
1733+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (TransportSearchAction .TYPE .name ()).test (indexAbstraction ), is (true ));
1734+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (TransportMultiSearchAction .TYPE .name ()).test (indexAbstraction ), is (true ));
1735+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (TransportGetAction .TYPE .name ()).test (indexAbstraction ), is (true ));
1736+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (READ_CROSS_CLUSTER_NAME ).test (indexAbstraction ), is (false ));
1737+ assertThat (
1738+ kibanaRole .indices ().allowedIndicesMatcher (TransportUpdateSettingsAction .TYPE .name ()).test (indexAbstraction ),
1739+ is (true )
1740+ );
1741+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (TransportPutMappingAction .TYPE .name ()).test (indexAbstraction ), is (true ));
1742+ assertThat (kibanaRole .indices ().allowedIndicesMatcher (RolloverAction .NAME ).test (indexAbstraction ), is (true ));
1743+ // Implied by the overall view_index_metadata and monitor privilege
1744+ assertViewIndexMetadata (kibanaRole , indexName );
1745+ assertThat (kibanaRole .indices ().allowedIndicesMatcher ("indices:monitor/" ).test (indexAbstraction ), is (true ));
1746+
17131747 });
17141748
17151749 Arrays .asList (
0 commit comments