Skip to content

Commit 4c71f92

Browse files
mohitjha-elasticsarog
authored andcommitted
[Sentinel One] - Fix Cannot execute ILM policy delete step (elastic#133793) (elastic#134113)
This PR focuses on the short term solution which add the logs-sentinel_one.application-* and logs-sentinel_one.application_risk-* indices under the kibana_system role with deletion privileges to prevent a failed deletion error when the index enters the deletion phase for the ILM lifecycle, in upcoming PR. As it ships transform pipeline too hence read, write permissions are also required. Current behavior: It shows permission issue while deleting the index. (cherry picked from commit bfde47a)
1 parent 69d834f commit 4c71f92

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

docs/changelog/133793.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 133793
2+
summary: "[Sentinel One] Add `manage`, `create_index`, `read`, `index`, `write`, `delete`, permission for third party agent indices `kibana_system`"
3+
area: Authorization
4+
type: enhancement
5+
issues:
6+
- 133703

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ static RoleDescriptor kibanaSystem(String name) {
489489
.indices(
490490
"logs-m365_defender.vulnerability-*",
491491
"logs-microsoft_defender_endpoint.vulnerability-*",
492-
"logs-microsoft_defender_cloud.assessment-*"
492+
"logs-microsoft_defender_cloud.assessment-*",
493+
"logs-sentinel_one.application_risk-*"
493494
)
494495
.privileges(
495496
"read",
@@ -498,10 +499,11 @@ static RoleDescriptor kibanaSystem(String name) {
498499
TransportDeleteIndexAction.TYPE.name()
499500
)
500501
.build(),
501-
// For ExtraHop and QualysGAV specific actions. Kibana reads, writes and manages this index
502+
// For ExtraHop, QualysGAV, and SentinelOne Application Dataset specific actions. Kibana reads, writes and manages this
503+
// index
502504
// for configured ILM policies.
503505
RoleDescriptor.IndicesPrivileges.builder()
504-
.indices("logs-extrahop.investigation-*", "logs-qualys_gav.asset-*")
506+
.indices("logs-extrahop.investigation-*", "logs-qualys_gav.asset-*", "logs-sentinel_one.application-*")
505507
.privileges(
506508
"manage",
507509
"create_index",

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,8 @@ public void testKibanaSystemRole() {
16991699
Arrays.asList(
17001700
"logs-m365_defender.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
17011701
"logs-microsoft_defender_endpoint.vulnerability-" + randomAlphaOfLength(randomIntBetween(0, 13)),
1702-
"logs-microsoft_defender_cloud.assessment-" + randomAlphaOfLength(randomIntBetween(0, 13))
1702+
"logs-microsoft_defender_cloud.assessment-" + randomAlphaOfLength(randomIntBetween(0, 13)),
1703+
"logs-sentinel_one.application_risk-" + randomAlphaOfLength(randomIntBetween(0, 13))
17031704
).forEach(indexName -> {
17041705
final IndexAbstraction indexAbstraction = mockIndexAbstraction(indexName);
17051706
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:foo").test(indexAbstraction), is(false));
@@ -1892,11 +1893,12 @@ public void testKibanaSystemRole() {
18921893
assertThat(kibanaRole.indices().allowedIndicesMatcher(RolloverAction.NAME).test(indexAbstraction), is(true));
18931894
});
18941895

1895-
// Tests for third-party agent indices (ExtraHop, QualysGAV) that `kibana_system` has full management access to
1896+
// Tests for third-party agent indices (ExtraHop, QualysGAV, SentinelOne) that `kibana_system` has full management access to
18961897
// This includes read, write, create, delete, and all ILM-related management actions.
18971898
Arrays.asList(
18981899
"logs-extrahop.investigation-" + randomAlphaOfLength(randomIntBetween(1, 10)),
1899-
"logs-qualys_gav.asset-" + randomAlphaOfLength(randomIntBetween(1, 10))
1900+
"logs-qualys_gav.asset-" + randomAlphaOfLength(randomIntBetween(1, 10)),
1901+
"logs-sentinel_one.application-" + randomAlphaOfLength(randomIntBetween(1, 10))
19001902
).forEach((index_qualys_extra_hop) -> {
19011903
final IndexAbstraction indexAbstraction = mockIndexAbstraction(index_qualys_extra_hop);
19021904

0 commit comments

Comments
 (0)