Skip to content
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

[Security Solution] Rule find requests failing due to migration error #198647

Closed
xcrzx opened this issue Nov 1, 2024 · 4 comments
Closed

[Security Solution] Rule find requests failing due to migration error #198647

xcrzx opened this issue Nov 1, 2024 · 4 comments
Labels
8.16 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management area impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@xcrzx
Copy link
Contributor

xcrzx commented Nov 1, 2024

Summary

Requests to /kbn/internal/alerting/rules/_find fail when called with the fields param. This occurs when documents created under the first rule model version are read after another rule model version is added. Migration fails as a result of the attempt to migrate a partial document due to the fields parameter in the find API.

Steps to Reproduce

  1. Create rules under the first rule model version.
  2. Introduce the second rule model version. Here's the second model version introduced by ResponseOps: https://github.com/elastic/kibana/pull/190019/files#diff-12c3ecfb676c8d71cfbd3ca6e4ce29223604dfa58d35a3a108ee6399da34f8da
  3. Attempt a find API call with specified fields (e.g., this call used on the rules management table).
  4. Observe 500 Server Error due to failed migration

Root Cause

Proposed Solution

  • To mitigate the problem short-term we can remove the fields param from the find request
  • Consider either disabling migration on partial reads or enforcing a full read before migration.
  • Another potential approach is modifying the find API to include all required fields when performing migrations.
@xcrzx xcrzx added 8.16 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management area impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team labels Nov 1, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@xcrzx xcrzx added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Nov 1, 2024
@xcrzx
Copy link
Contributor Author

xcrzx commented Nov 1, 2024

Lowering the impact as the error is only reproducible during down migrations, not up.

Will be fixed on the Core side: #198655

@xcrzx xcrzx closed this as completed Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.16 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management area impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

No branches or pull requests

2 participants