-
Notifications
You must be signed in to change notification settings - Fork 123
Support spaces for detection rules #1457
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
Conversation
…tack into support-spaces-for-detection-rules
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.
Pull Request Overview
This PR fixes a defect where Kibana Security Detection Rules were always being created, read, updated, and deleted in the default space, ignoring the space_id parameter. The fix adds the space_id parameter to all API calls that interact with detection rules.
Key Changes:
- Updated CRUD operations to pass
space_idto the Kibana API - Added comprehensive acceptance tests to verify space-specific rule operations
- Enhanced test coverage with import state verification
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/kibana/security_detection_rule/create.go | Passes space_id to CreateRuleWithResponse API call |
| internal/kibana/security_detection_rule/read.go | Passes space_id to ReadRuleWithResponse API call |
| internal/kibana/security_detection_rule/update.go | Passes space_id to UpdateRuleWithResponse API call |
| internal/kibana/security_detection_rule/delete.go | Passes space_id to DeleteRuleWithResponse API call |
| internal/kibana/security_detection_rule/acc_test.go | Adds space-aware tests and fixes destroy check to use space_id |
tobio
left a comment
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.
LGTM
…tack into support-spaces-for-detection-rules
…ata-view-resource * origin/main: (32 commits) chore(deps): update kibana-openapi-spec digest to c99d51c (#1487) [Feature] Introduce elasticsearch alias resource with atomic write index management and nested attributes (#1343) Support setting solution for 8.16+ on Cloud (#1486) Refactor all Kibana connector acceptance tests to use ConfigDirectory pattern (#1484) Support .bedrock and .gen-ai connectors (#1467) Bump golang.org/x/crypto from 0.41.0 to 0.45.0 in /libs/go-kibana-rest (#1481) Bump golang.org/x/crypto from 0.42.0 to 0.45.0 (#1480) fix(deps): update module github.com/go-resty/resty/v2 to v2.17.0 (#1478) chore(deps): update kibana-openapi-spec digest to f1d0789 (#1479) chore(deps): update kibana-openapi-spec digest to 5841714 (#1477) chore(deps): update golang:1.25.4 docker digest to 6981837 (#1476) chore(deps): update kibana-openapi-spec digest to 67de5ef (#1475) chore(deps): update golangci/golangci-lint-action digest to e7fa5ac (#1474) chore(deps): update kibana-openapi-spec digest to b4553b6 (#1472) chore(deps): update actions/checkout action to v6 (#1470) Support publishing experimental resources/datasources within the framework provider (#1464) chore(deps): update actions/setup-go digest to 4dc6199 (#1466) fix(deps): update module github.com/elastic/elastic-transport-go/v8 to v8.8.0 (#1459) Prepare 0.12.2 Release (#1458) Support spaces for detection rules (#1457) ...
Fixes defect for Security Detection Rules where rules were always created and read from the default space regardless of
space_id