Skip to content

Conversation

@CohenIdo
Copy link
Contributor

solves:

Summary

With the upcoming release of the Cloud Security Posture integration, we are introducing a new “Latest” transform along with a new index alias: security_solution-cloud_security_posture.misconfiguration_latest.

In #187435, we began querying this new index alias instead of logs-cloud_security_posture.findings_latest-default.

To maintain the same user experience, this PR updates the pre-defined roles in Serverless, allowing users to view findings and access the dashboard page.

@CohenIdo CohenIdo added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Cloud Security Cloud Security team related labels Jun 15, 2025
@CohenIdo CohenIdo marked this pull request as ready for review June 15, 2025 13:31
@CohenIdo CohenIdo requested a review from a team as a code owner June 15, 2025 13:31
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

Copy link
Contributor

@gergoabraham gergoabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @CohenIdo,

could you please do the same additions to these files as well? thanks!

  • src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml
  • x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/roles_users/serverless/es_serverless_resources/roles.yml

(note, i'm not really sure why there are 3 files of these, but added to my todo list to check it sometime)

@CohenIdo
Copy link
Contributor Author

Thanks for this input @gergoabraham !
Done ✅

@CohenIdo CohenIdo requested a review from gergoabraham June 16, 2025 10:53
@CohenIdo CohenIdo force-pushed the update-serverless-predefined-roles branch from c4fb664 to 875b530 Compare June 16, 2025 11:03
@CohenIdo CohenIdo requested a review from a team as a code owner June 16, 2025 11:03
Copy link
Contributor

@gergoabraham gergoabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the changes! one line looks missing, but other than that, lgtm!

- risk-score.risk-score-*
- .asset-criticality.asset-criticality-*
- '.ml-anomalies-*'
- 'security_solution-cloud_security_posture.misconfiguration_latest'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the detections_admin role below this missed the update

Copy link
Contributor

@maxcold maxcold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two Three questions:

  • why do we have only index alias added here but not index pattern itself to cover indexes themselves with suffix like _v1?
  • we don't have patterns for 3p indexes added, do we need to add them?
  • as we are switching from logs-* to security_solution-* index pattern I'd expect it to be in the same bucket with logs-* and sometimes it's the case but not always. Any reason for that? what is the logic behind picking priviliges?

allow_restricted_indices: false
- names:
- '.ml-anomalies-*'
- 'security_solution-cloud_security_posture.misconfiguration_latest'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are switching from logs-cloud_security_posture* to this index security_solution-cloud_security_posture.misconfiguration_latest so I'd expect it to be in one bucket with logs-* to keep exactly the same functionality as before. Any reason to have it with .ml-anomalies-* here and only have read provilige while logs-* has both read and write?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question.
The logs-cloud_security_posture* index fall under the broader logs-* pattern, which currently has broader privileges assigned to each role.
However, we didn’t explicitly grant those privileges, and they’re not necessary for the current user experience. Now that we’re explicitly configuring permissions, I believe read access should be sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed in person, agreed that overall having less priviliges is a good idea, but maybe should be implemented as a separate work item as we are close to the FF. It will be safer to keep the same priviliges as before to avoid any unwanted side effects and extensive testing with different roles

- read
- names:
- .asset-criticality.asset-criticality-*
- 'security_solution-cloud_security_posture.misconfiguration_latest'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well, any reason to not be in the same bucket with logs-* which has only read?

- risk-score.risk-score-*
- .entities.v1.latest.security_*
- '.ml-anomalies-*'
- 'security_solution-cloud_security_posture.misconfiguration_latest'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

- risk-score.risk-score-*
- .entities.v1.latest.security_*
- '.ml-anomalies-*'
- 'security_solution-cloud_security_posture.misconfiguration_latest'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@CohenIdo
Copy link
Contributor Author

CohenIdo commented Jun 16, 2025

why do we have only index alias added here but not index pattern itself to cover indexes themselves with suffix like _v1?
we don't have patterns for 3p indexes added, do we need to add them?

I agree I'll update the code to use security_solution-*.misconfiguration_latest*

as we are switching from logs-* to security_solution-* index pattern I'd expect it to be in the same bucket with logs-* and sometimes it's the case but not always. Any reason for that? what is the logic behind picking priviliges?

Here are my thoughts.

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml changes LGTM

‼️ Please make sure to port the same privilege changes to controller repo

@CohenIdo CohenIdo force-pushed the update-serverless-predefined-roles branch from d52456e to cce45e3 Compare June 17, 2025 10:21
@CohenIdo CohenIdo requested a review from maxcold June 17, 2025 10:35
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@CohenIdo CohenIdo merged commit f5f9c50 into elastic:main Jun 17, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants