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

[Detection Engine][FTR] Add FTR exception list tests for Serverless prebuilt roles #198420

Merged
merged 7 commits into from
Nov 6, 2024

Conversation

yctercero
Copy link
Contributor

@yctercero yctercero commented Oct 30, 2024

Summary

Adds FTR tests that check our Serverless prebuilt roles against our exception list endpoints.

We have had little coverage or visibility to know if any changes made in elasticsearch-controller introduce a bug in our prebuilt roles.

We could certainly discuss how such tests should be organized - I chose to create an authentication folder that then has a matching folder for the other sections and a file for each prebuilt role. With us nearing GA, I'd like to prioritize having coverage and following up with any improvements.

@yctercero yctercero self-assigned this Oct 30, 2024
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7308

[✅] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/common/trial_license_complete_tier/configs/serverless.config.ts: 25/25 tests passed.
[❌] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/items/trial_license_complete_tier/configs/serverless.config.ts: 21/25 tests passed.
[❌] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/lists/trial_license_complete_tier/configs/serverless.config.ts: 4/25 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7310

[✅] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/common/trial_license_complete_tier/configs/serverless.config.ts: 25/25 tests passed.
[✅] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/items/trial_license_complete_tier/configs/serverless.config.ts: 25/25 tests passed.
[❌] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/lists/trial_license_complete_tier/configs/serverless.config.ts: 0/25 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7311

[✅] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/common/trial_license_complete_tier/configs/serverless.config.ts: 25/25 tests passed.
[✅] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/items/trial_license_complete_tier/configs/serverless.config.ts: 25/25 tests passed.
[❌] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/lists/trial_license_complete_tier/configs/serverless.config.ts: 1/25 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7316

[❌] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/common/trial_license_complete_tier/configs/serverless.config.ts: 7/25 tests passed.
[❌] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/items/trial_license_complete_tier/configs/serverless.config.ts: 17/25 tests passed.
[✅] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/lists/trial_license_complete_tier/configs/serverless.config.ts: 25/25 tests passed.

see run history

@yctercero
Copy link
Contributor Author

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7311

[✅] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/common/trial_license_complete_tier/configs/serverless.config.ts: 25/25 tests passed. [✅] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/items/trial_license_complete_tier/configs/serverless.config.ts: 25/25 tests passed. [❌] x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/authentication/exceptions/lists/trial_license_complete_tier/configs/serverless.config.ts: 1/25 tests passed.

see run history

All passed on rebuild.

@yctercero yctercero added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Detection Engine Security Solution Detection Engine Area backport:version Backport to applied version labels v8.17.0 labels Oct 31, 2024
@yctercero yctercero marked this pull request as ready for review October 31, 2024 21:21
@yctercero yctercero requested review from a team as code owners October 31, 2024 21:21
@yctercero yctercero requested a review from dhurley14 October 31, 2024 21:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-engine (Team:Detection Engine)

Copy link
Contributor

@dhurley14 dhurley14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the tests! Other than my questions about the configuration and directory mismatch, I have one other small nit. I think the authentication/exceptions directory should be renamed to authorization/exceptions. We're not really authenticating roles, more so we are checking if a user (role) is authorized for the specific operations for exceptions. Looks great!

* 2.0.
*/

import { createTestConfig } from '../../../../../../../config/serverless/config.base.essentials';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config is listed under a directory trial_license_complete_tier but it is using the serverless essentials configuration. I think one of these things is incorrect?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I fixed it up!

* 2.0.
*/

import { createTestConfig } from '../../../../../../../config/serverless/config.base.essentials';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as above - essentials config but under the complete tier directory.

@yctercero
Copy link
Contributor Author

@dhurley14 thanks for the feedback! I've updated the folder structure to make more sense and renamed to authorization.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @yctercero

Copy link
Contributor

@dhurley14 dhurley14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yctercero yctercero merged commit 4c649d9 into elastic:main Nov 6, 2024
22 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11708919154

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 6, 2024
…rebuilt roles (elastic#198420)

## Summary

Adds FTR tests that check our Serverless prebuilt roles against our
exception list endpoints.

We have had little coverage or visibility to know if any changes made in
elasticsearch-controller introduce a bug in our prebuilt roles.

We could certainly discuss how such tests should be organized - I chose
to create an `authentication` folder that then has a matching folder for
the other sections and a file for each prebuilt role. With us nearing
GA, I'd like to prioritize having coverage and following up with any
improvements.

(cherry picked from commit 4c649d9)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 6, 2024
…less prebuilt roles (#198420) (#199192)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Detection Engine][FTR] Add FTR exception list tests for Serverless
prebuilt roles (#198420)](#198420)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Yara
Tercero","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T17:38:01Z","message":"[Detection
Engine][FTR] Add FTR exception list tests for Serverless prebuilt roles
(#198420)\n\n## Summary\r\n\r\nAdds FTR tests that check our Serverless
prebuilt roles against our\r\nexception list endpoints.\r\n\r\nWe have
had little coverage or visibility to know if any changes made
in\r\nelasticsearch-controller introduce a bug in our prebuilt
roles.\r\n\r\nWe could certainly discuss how such tests should be
organized - I chose\r\nto create an `authentication` folder that then
has a matching folder for\r\nthe other sections and a file for each
prebuilt role. With us nearing\r\nGA, I'd like to prioritize having
coverage and following up with
any\r\nimprovements.","sha":"4c649d9f14d6631d23931fc0d32dc28017cbad38","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detection
Engine","backport:version","v8.17.0"],"title":"[Detection Engine][FTR]
Add FTR exception list tests for Serverless prebuilt
roles","number":198420,"url":"https://github.com/elastic/kibana/pull/198420","mergeCommit":{"message":"[Detection
Engine][FTR] Add FTR exception list tests for Serverless prebuilt roles
(#198420)\n\n## Summary\r\n\r\nAdds FTR tests that check our Serverless
prebuilt roles against our\r\nexception list endpoints.\r\n\r\nWe have
had little coverage or visibility to know if any changes made
in\r\nelasticsearch-controller introduce a bug in our prebuilt
roles.\r\n\r\nWe could certainly discuss how such tests should be
organized - I chose\r\nto create an `authentication` folder that then
has a matching folder for\r\nthe other sections and a file for each
prebuilt role. With us nearing\r\nGA, I'd like to prioritize having
coverage and following up with
any\r\nimprovements.","sha":"4c649d9f14d6631d23931fc0d32dc28017cbad38"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198420","number":198420,"mergeCommit":{"message":"[Detection
Engine][FTR] Add FTR exception list tests for Serverless prebuilt roles
(#198420)\n\n## Summary\r\n\r\nAdds FTR tests that check our Serverless
prebuilt roles against our\r\nexception list endpoints.\r\n\r\nWe have
had little coverage or visibility to know if any changes made
in\r\nelasticsearch-controller introduce a bug in our prebuilt
roles.\r\n\r\nWe could certainly discuss how such tests should be
organized - I chose\r\nto create an `authentication` folder that then
has a matching folder for\r\nthe other sections and a file for each
prebuilt role. With us nearing\r\nGA, I'd like to prioritize having
coverage and following up with
any\r\nimprovements.","sha":"4c649d9f14d6631d23931fc0d32dc28017cbad38"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Yara Tercero <[email protected]>
mgadewoll pushed a commit to mgadewoll/kibana that referenced this pull request Nov 7, 2024
…rebuilt roles (elastic#198420)

## Summary

Adds FTR tests that check our Serverless prebuilt roles against our
exception list endpoints.

We have had little coverage or visibility to know if any changes made in
elasticsearch-controller introduce a bug in our prebuilt roles.

We could certainly discuss how such tests should be organized - I chose
to create an `authentication` folder that then has a matching folder for
the other sections and a file for each prebuilt role. With us nearing
GA, I'd like to prioritize having coverage and following up with any
improvements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Detection Engine Security Solution Detection Engine Area v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants