Skip to content

Commit

Permalink
add CDR related data streams to kibana_system priviliges (#112655)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcold authored Sep 11, 2024
1 parent bb872e6 commit d16a27e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,19 @@ static RoleDescriptor kibanaSystem(String name) {
// For source indices of the Cloud Detection & Response (CDR) packages that ships a
// transform
RoleDescriptor.IndicesPrivileges.builder()
.indices("logs-wiz.vulnerability-*", "logs-wiz.cloud_configuration_finding-*", "logs-aws.securityhub_findings-*")
.indices(
"logs-wiz.vulnerability-*",
"logs-wiz.cloud_configuration_finding-*",
"logs-google_scc.finding-*",
"logs-aws.securityhub_findings-*",
"logs-aws.inspector-*",
"logs-amazon_security_lake.findings-*",
"logs-qualys_vmdr.asset_host_detection-*",
"logs-tenable_sc.vulnerability-*",
"logs-tenable_io.vulnerability-*",
"logs-rapid7_insightvm.vulnerability-*",
"logs-carbon_black_cloud.asset_vulnerability_summary-*"
)
.privileges("read", "view_index_metadata")
.build(),
// For alias indices of the Cloud Detection & Response (CDR) packages that ships a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,15 @@ public void testKibanaSystemRole() {
Arrays.asList(
"logs-wiz.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-wiz.cloud_configuration_finding-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-aws.securityhub_findings-" + randomAlphaOfLength(randomIntBetween(0, 13))
"logs-google_scc.finding-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-aws.securityhub_findings-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-aws.inspector-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-amazon_security_lake.findings-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-qualys_vmdr.asset_host_detection-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-tenable_sc.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-tenable_io.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-rapid7_insightvm.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-carbon_black_cloud.asset_vulnerability_summary-" + randomAlphaOfLength(randomIntBetween(0, 13))
).forEach(indexName -> {
final IndexAbstraction indexAbstraction = mockIndexAbstraction(indexName);
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:foo").test(indexAbstraction), is(false));
Expand Down

0 comments on commit d16a27e

Please sign in to comment.