Skip to content

Commit eb005b0

Browse files
authored
Add Defender for Cloud to 3rd party integrations permissions required for transform (#133623)
Add logs-microsoft_defender_cloud.assessment data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability and misconfigurations findings) to work. Also adds delete_index on logs-microsoft_defender_cloud.assessment-* to facilitate index removal through ILM policies. Related: For elastic/integrations#14785 Similar to #132445
1 parent 4d2d91f commit eb005b0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/KibanaOwnedReservedRoleDescriptors.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,11 @@ static RoleDescriptor kibanaSystem(String name) {
536536
// For source indices of the Cloud Detection & Response (CDR) packages
537537
// that ships a transform and has ILM policy
538538
RoleDescriptor.IndicesPrivileges.builder()
539-
.indices("logs-m365_defender.vulnerability-*", "logs-microsoft_defender_endpoint.vulnerability-*")
539+
.indices(
540+
"logs-m365_defender.vulnerability-*",
541+
"logs-microsoft_defender_endpoint.vulnerability-*",
542+
"logs-microsoft_defender_cloud.assessment-*"
543+
)
540544
.privileges(
541545
"read",
542546
"view_index_metadata",

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,8 @@ public void testKibanaSystemRole() {
17721772

17731773
Arrays.asList(
17741774
"logs-m365_defender.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
1775-
"logs-microsoft_defender_endpoint.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13))
1775+
"logs-microsoft_defender_endpoint.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
1776+
"logs-microsoft_defender_cloud.assessment-" + randomAlphaOfLength(randomIntBetween(0, 13))
17761777
).forEach(indexName -> {
17771778
final IndexAbstraction indexAbstraction = mockIndexAbstraction(indexName);
17781779
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:foo").test(indexAbstraction), is(false));

0 commit comments

Comments
 (0)