-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7.x] [Security Solutions][Detection Engine] Adds e2e and unit tests …
…for PR #89947 (#89973) (#90091) * [Security Solutions][Detection Engine] Adds e2e and unit tests for PR #89947 (#89973) ## Summary Adds e2e and unit tests for PR: #89947 * Adds e2e tests for create_index * Adds e2e tests for get_privileges * Adds unit test for use_privilege_user * Adds exhaustive switch for the roles in the e2e tests * Adds some typescript barrel rolls for the .json scripts to make TypeScript a bit more readable when doing imports * Fixes some of the types that were not matched up with the recent privilege endpoint ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios * Fixes the backport for test to work correctly as the messages are different * Fixes one permission change issue between versions
- Loading branch information
1 parent
b4de7f4
commit 6179ac4
Showing
18 changed files
with
1,292 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...curity_solution/server/lib/detection_engine/scripts/roles_users/detections_admin/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import * as detectionsAdminUser from './detections_user.json'; | ||
import * as detectionsAdminRole from './detections_role.json'; | ||
export { detectionsAdminUser, detectionsAdminRole }; |
9 changes: 9 additions & 0 deletions
9
...plugins/security_solution/server/lib/detection_engine/scripts/roles_users/hunter/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import * as hunterUser from './detections_user.json'; | ||
import * as hunterRole from './detections_role.json'; | ||
export { hunterUser, hunterRole }; |
13 changes: 13 additions & 0 deletions
13
x-pack/plugins/security_solution/server/lib/detection_engine/scripts/roles_users/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
export * from './detections_admin'; | ||
export * from './hunter'; | ||
export * from './platform_engineer'; | ||
export * from './reader'; | ||
export * from './rule_author'; | ||
export * from './soc_manager'; | ||
export * from './t1_analyst'; | ||
export * from './t2_analyst'; |
9 changes: 9 additions & 0 deletions
9
...urity_solution/server/lib/detection_engine/scripts/roles_users/platform_engineer/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import * as platformEngineerUser from './detections_user.json'; | ||
import * as platformEngineerRole from './detections_role.json'; | ||
export { platformEngineerUser, platformEngineerRole }; |
9 changes: 9 additions & 0 deletions
9
...plugins/security_solution/server/lib/detection_engine/scripts/roles_users/reader/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import * as readerUser from './detections_user.json'; | ||
import * as readerRole from './detections_role.json'; | ||
export { readerUser, readerRole }; |
9 changes: 9 additions & 0 deletions
9
...ns/security_solution/server/lib/detection_engine/scripts/roles_users/rule_author/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import * as ruleAuthorUser from './detections_user.json'; | ||
import * as ruleAuthorRole from './detections_role.json'; | ||
export { ruleAuthorUser, ruleAuthorRole }; |
9 changes: 9 additions & 0 deletions
9
...ns/security_solution/server/lib/detection_engine/scripts/roles_users/soc_manager/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import * as socManagerUser from './detections_user.json'; | ||
import * as socManagerRole from './detections_role.json'; | ||
export { socManagerUser, socManagerRole }; |
9 changes: 9 additions & 0 deletions
9
...ins/security_solution/server/lib/detection_engine/scripts/roles_users/t1_analyst/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import * as t1AnalystUser from './detections_user.json'; | ||
import * as t1AnalystRole from './detections_role.json'; | ||
export { t1AnalystUser, t1AnalystRole }; |
9 changes: 9 additions & 0 deletions
9
...ins/security_solution/server/lib/detection_engine/scripts/roles_users/t2_analyst/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import * as t2AnalystUser from './detections_user.json'; | ||
import * as t2AnalystRole from './detections_role.json'; | ||
export { t2AnalystUser, t2AnalystRole }; |
Oops, something went wrong.