Skip to content

Commit

Permalink
Add privileges required for CDR misconfiguration features to work on …
Browse files Browse the repository at this point in the history
…AWS SecurityHub integration
  • Loading branch information
kcreddy committed Sep 6, 2024
1 parent c805f90 commit c15b5f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ 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-*")
.indices("logs-wiz.vulnerability-*", "logs-wiz.cloud_configuration_finding-*", "logs-aws.securityhub_findings-*")
.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 @@ -1611,7 +1611,8 @@ public void testKibanaSystemRole() {

Arrays.asList(
"logs-wiz.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-wiz.cloud_configuration_finding-" + randomAlphaOfLength(randomIntBetween(0, 13))
"logs-wiz.cloud_configuration_finding-" + randomAlphaOfLength(randomIntBetween(0, 13)),
"logs-aws.securityhub_findings-" + 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 c15b5f4

Please sign in to comment.