[Detection Engine] Extracts Rules/Alerts/Exceptions permission to new Rules feature privileges#239634
[Detection Engine] Extracts Rules/Alerts/Exceptions permission to new Rules feature privileges#239634rylnd merged 84 commits intoelastic:mainfrom
Conversation
a72b214 to
76ad1e0
Compare
|
Project deployed, see credentials at: https://buildkite.com/elastic/kibana-deploy-project-from-pr/builds/680 |
This comment was marked as resolved.
This comment was marked as resolved.
|
Mentioned this in the slack, we want to keep current behaviour that allows alerts modifying when "Security" set to "Read", meaning user should be able to modify alerts with the new "Rules" kibana privilege set to "Read". Right now I'm getting this error:
|
|
Cloud deployment initiated, see credentials at: https://buildkite.com/elastic/kibana-deploy-cloud-from-pr/builds/506 |
568bc3e to
599bfec
Compare
75c64d6 to
f4569e9
Compare
d719d76 to
6097515
Compare
f873486 to
9096390
Compare
This does not include changes to existing roles, nor the role migration machinery.
These changes were made automatically in an initial commit that added our new features to roles; those changes have since been reverted (320c34f), and thus there should not currently be any behavioral changes in these files, which makes these stylistic changes even more unnecessary. Note: I also noticed that a few old references had (accidentally?) remained in `security_roles.json` after `320c34f485`; this cleans those up as well.
Instead of requiring siemVX read/all, it now requires securitySolutionRulesV1 read/all
It is unclear on wether "dashboards" and "integrations" should be exclusive to `siemV5` or `securitySolutionRulesV1`. So for now we are showing it when the user has either of those.
This is the current behaviour accoring do the documentation https://www.elastic.co/docs/solutions/security/detect-and-alert/detections-requirements.
Now it requires the `securitySolutionRulesV1.all` privilege
The There is a new component for detections missing privileges that added inside the |
…and updateable rules
This will ensure behaviors are correct for all intermediate SIEM features.
logeekal
left a comment
There was a problem hiding this comment.
Thank for incorporating all the changes from Automatic Migrations. I tested in ECH with all combinations of Dashboards and Rules Privileges and Automatic Migrations is working as expected.
jeramysoucy
left a comment
There was a problem hiding this comment.
LGTM! I appreciate the e2e privilege testing strategy 👍
| INITIALIZE_SECURITY_SOLUTION, | ||
| ], | ||
| savedObject: { | ||
| all: ['alert', ...savedObjects], |
There was a problem hiding this comment.
For a future investigation:
In every siem feature we include 'alert' in the savedObject: all but skip it in the read privilege. I'm wondering if the addition of the 'alert' SO is redundant because that SO access is controlled via the alerting: { rule: ... feature? cc: @ymao1
Conflicts: x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts x-pack/solutions/security/test/serverless/api_integration/test_suites/platform_security/authorization.ts
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
|
* commit '6647f813c9fa03ac0378e3d4756246e8dc4b4c76': (33 commits) [Detection Engine] Extracts Rules/Alerts/Exceptions permission to new Rules feature privileges (elastic#239634) [Agent Builder] Add Intro Tour (elastic#245551) Add datastream lifecycle support to indices metadata (elastic#245548) [Serverless] Update preconfigured connectors (elastic#245445) [Metrics][Discover] Discover to prefer line chars for time series data (elastic#244595) Update dependency @elastic/ebt to ^1.4.1 (main) (elastic#241629) [One Workflow] fix: request bodies with oneof schemas (`kibana.SetAlertsStatus`, etc) (elastic#245344) Update dependency ai to v5 (elastic#244675) Fix Discover trace waterfall behavior with duplicate spans (elastic#244984) [FSH] Migrated fs usage to kbn/fs for sample ingest (elastic#244163) Streamlang: Unskip type coercion test (elastic#245519) [Response Ops][Reporting] Fixing error in calculating delay value between retries (elastic#245431) Add TopNavMenuBeta to navigation plugin (elastic#243578) [scout] support custom servers configuration (elastic#244306) [Fleet] Run agentless background sync without dry run (elastic#245286) Fix Change Password Flaky Test (elastic#245443) Add new gap fill status for rules (elastic#242595) [Kibana Search] Move SLOs higher up in search results (elastic#245518) feat(slo): introduce find SLO instances internal route (elastic#245333) [FSH] Dropped unnecessary `fs` persistence for synthetics project code (elastic#244338) ...


Note: this is a rewritten copy of the changes in #232113. Initial feedback and conversation can be found there.
Epic: https://github.com/elastic/security-team/issues/8799
Added a new Rules feature that controls access to:
In the first iteration, Rules feature doesn't allow more granular customization of a user's role as described in https://github.com/elastic/security-team/issues/8799. Granular controls will be extracted from the Rules feature as sub-features in future iterations.
Note also that this PR does not update existing prebuilt/test roles, as per this suggestion. That work is contained in a followup PR, which will be merged subsequent to this one.
How to test this PR
The extraction of the Rules feature from SIEM opens several new possibilities to configure roles.
Rule: none
This role configuration allows access to the rest of Security Solution without access to Detection Rules and Alerts.
Rule: read
This role configuration should allow users to read rules and visit any rule pages but without the ability to edit rules, alerts, or exceptions.
The minimal Kibana feature configuration:
Required index privileges:
Rule: all
This role configurration should have access to rules, alerts, and exceptions without limitations.
Testing Utils
Testing configs and scripts
This bash script will add/update the kibana roles defined in the config.yml file into your local instance. Usernames will be the same as the role titles and all passwords are set to a default `changeme`Additional areas to test
siemV3) should work correctly. Roles created prior to this PR withsiemV3:allshould map tosiemV4:all+rules:all. Roles withsiemV3:readtosiemV4:readandrules:read.PR Handoff TODOs
mainv3->v4andv4->v5detection_engine.tsxchanges into newly abstracted files implemented heresrc/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.ymlis usedRelease Note
Rules feature privileges are added to ESS. Access to Rules may now be explicitly set on both ESS and Serverless for user roles.
Docs Issue