-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DE][Cypress] Add privileges coverage detections area #170380
Conversation
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
@@ -76,11 +85,18 @@ | |||
{ | |||
"feature": { | |||
"ml": ["read"], | |||
"siem": ["read", "read_alerts"], | |||
"siem": ["read", "read_alerts", "endpoint_list_read"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This siem privilege would mean the t1_analyst
would be able to access the endpoint list page, which the FTR test currently expects otherwise. I guess we should update the test per the new privilege.
cc @paul-tavares
Hey @yctercero 👋 Do you think it might make sense to reuse that approach? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically operations team is owners of packages/kbn-es/src/serverless_resources/security_roles.json
due to being owner of kbn-es/*
but we don't have sufficient knowledge to maintain that file. Which team makes sense to transfer ownership to?
I do like that idea. Having worked to update the roles here, it was very easy to miss something. By using your method, we would just copy paste directly. @maximpn any thoughts on updating this? |
@Ikuni17 I think it would be @elastic/security-threat-hunting @elastic/security-detection-engine @elastic/security-detection-rule-management @elastic/security-defend-workflows @elastic/security-threat-hunting-explore |
@Ikuni17 @tomsonpl There is a ticket to add role syncing automation. I've added a comment there why JSON is better for consuming. On top of that An idea in my mind to have one source of truth for roles in Kibana (ideally next to |
@@ -478,31 +478,31 @@ export default ({ getService }: FtrProviderContext) => { | |||
username: 'detections_admin', | |||
has_all_requested: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While working on enabling Serverless roles for FTR tests in the PR I've noticed detections_admin
has different privileges in Serverless than in ESS. I guess your change here will fail in ESS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be a great example for adding similar tests in my user assignment PR!
Should we also add tests to check that some roles are unable to update tags?
💔 Build FailedFailed CI Steps
Test Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @yctercero |
@yctercero I see this PR hasn't been updated in a couple of months, is it still being worked on or can we close it? |
Summary
Adds test coverage around privileges for detection area. ✅ means there is test coverage for use case.
Updates to roles based on latest from
https://github.com/elastic/project-controller/blob/main/internal/project/security/config/roles.yml
. If you notice a role commented out, it needs follow up and a ticket has been opened to follow up in the appropriate repo.Ideally, this will pair with FTRs which would cover API side logic.
Flakey test runner - https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3861