Skip to content

Commit 2b0c81c

Browse files
animehartelasticsearchmachine
andauthored
[Cloud Security] Fix for Deprecated error message (#119796)
* added privileges for score index * [CI] Auto commit changes from spotless * pr comments * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <[email protected]>
1 parent 3c184b9 commit 2b0c81c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import org.elasticsearch.action.admin.indices.alias.TransportIndicesAliasesAction;
1111
import org.elasticsearch.action.admin.indices.delete.TransportDeleteIndexAction;
12+
import org.elasticsearch.action.admin.indices.mapping.put.TransportAutoPutMappingAction;
1213
import org.elasticsearch.action.admin.indices.mapping.put.TransportPutMappingAction;
1314
import org.elasticsearch.action.admin.indices.rollover.RolloverAction;
1415
import org.elasticsearch.action.admin.indices.settings.put.TransportUpdateSettingsAction;
@@ -428,7 +429,6 @@ static RoleDescriptor kibanaSystem(String name) {
428429
RoleDescriptor.IndicesPrivileges.builder()
429430
.indices(
430431
"logs-cloud_security_posture.findings_latest-default*",
431-
"logs-cloud_security_posture.scores-default*",
432432
"logs-cloud_security_posture.vulnerabilities_latest-default*"
433433
)
434434
.privileges(
@@ -440,6 +440,20 @@ static RoleDescriptor kibanaSystem(String name) {
440440
TransportUpdateSettingsAction.TYPE.name()
441441
)
442442
.build(),
443+
// For destination indices of the Cloud Security Posture packages that ships a
444+
// transform (specific for scores indexes, as of 9.0.0 score indices will need to have auto_put priviliges)
445+
RoleDescriptor.IndicesPrivileges.builder()
446+
.indices("logs-cloud_security_posture.scores-default*")
447+
.privileges(
448+
"create_index",
449+
"read",
450+
"index",
451+
"delete",
452+
TransportIndicesAliasesAction.NAME,
453+
TransportUpdateSettingsAction.TYPE.name(),
454+
TransportAutoPutMappingAction.TYPE.name()
455+
)
456+
.build(),
443457
// For source indices of the Cloud Detection & Response (CDR) packages that ships a
444458
// transform
445459
RoleDescriptor.IndicesPrivileges.builder()

0 commit comments

Comments
 (0)