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] Create tool to generate fixtures from historical Kibana versions #126389

Open
2 of 4 tasks
madirey opened this issue Feb 24, 2022 · 1 comment
Open
2 of 4 tasks
Assignees
Labels
enhancement New value added to drive a business result Feature:Functional Testing Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team v8.2.0

Comments

@madirey
Copy link
Contributor

madirey commented Feb 24, 2022

Summary

The migration to AAD in 8.0 highlighted several shortcomings in our ability to reliably test backwards compatibility in the Security Solution. A large part of that problem stems from the fact that we have a severe lack of data fixtures used by our automated tests that are based on reproducible, representative data from historical versions. This issue will be used to track progress towards the goal of improving this situation.

  • Create a tool to create a cloud deployment, generate alerts, and capture data as fixtures
    • Also dump metadata timestamp that can be used to construct relative times for tests
  • Implement a process for generating fixtures at the end of each feature freeze and integrating with tests
  • Generate and commit fixtures for 8.1, 8.0, 7.17

General Approach/Strategy

Modify kbn-alert-load to use for fixture generation and export to its own repository. Include a base rule definition for each type and override for each version as needed. Use ecctl with “--docker_image” parameter to spin up the desired version(s) of Kibana in the Cloud, load the source data, create the rules, and wait for alerts to be generated. Once generated, export the alerts to their own versioned files/directories. Check these fixtures into Kibana.

Open questions

What should the source data look like? How do we generate it?
Should we use alerts from the previous and current version as part of the source data?
Which rule configurations to test?
How do we modify the fixture data to construct the relative timestamp?
How many alerts? More than one page?
Cardinality of data?

@madirey madirey added enhancement New value added to drive a business result Feature:Functional Testing Team:Detections and Resp Security Detection Response Team Team:Detection Alerts Security Detection Alerts Area Team v8.2.0 labels Feb 24, 2022
@madirey madirey self-assigned this Feb 24, 2022
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Functional Testing Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team v8.2.0
Projects
None yet
Development

No branches or pull requests

3 participants