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

[Actions] Add support for system actions in Rules APIs #161726

Closed
wants to merge 149 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
1352e52
Add isSystemAction to ActionResult type and default it to false
cnasikas Jun 28, 2023
09b82f6
Disallow registering system actions
cnasikas Jun 28, 2023
dc1a2c8
Add test
cnasikas Jun 28, 2023
bb7e9a5
Fix alerting types
cnasikas Jun 28, 2023
774b389
Fix integration tests
cnasikas Jun 28, 2023
83ee747
Fix triggers_actions_ui types
cnasikas Jun 28, 2023
d2b8e67
Fix cases types
cnasikas Jun 28, 2023
31f1f39
Fix cases tests
cnasikas Jun 28, 2023
85ca6a4
Fix integration tests
cnasikas Jun 28, 2023
b070bd9
Fix cases tests
cnasikas Jun 28, 2023
a8e7143
Merge branch 'main' into system_actions_registration
kibanamachine Jun 29, 2023
b50a3e0
Fix types from other plugins
cnasikas Jun 29, 2023
ee5df7b
Merge branch 'system_actions_registration' of github.com:cnasikas/kib…
cnasikas Jun 29, 2023
1caf874
Rename preconfiguredConnectors to inMemoryConnectors
cnasikas Jun 29, 2023
2aabeed
Create system actions
cnasikas Jun 29, 2023
3cf469a
Prevent create/update/delete of system actions
cnasikas Jun 30, 2023
8c1246c
Fix types
cnasikas Jun 30, 2023
0d7aea1
Merge branch 'main' into load_system_actions_in_memory
cnasikas Jun 30, 2023
52ef0e5
Fix types
cnasikas Jun 30, 2023
d763161
Remove cases from basic
cnasikas Jul 1, 2023
5c3245e
Convert preconfigured to in-memory
cnasikas Jul 1, 2023
31bc750
Merge branch 'main' into load_system_actions_in_memory
cnasikas Jul 1, 2023
d35a7f9
Get in-memory connectors after they have been created in the route co…
cnasikas Jul 1, 2023
34ee2ab
Register test system action in integration tests
cnasikas Jul 1, 2023
86b279c
Add integration tests
cnasikas Jul 1, 2023
57b4d3a
Fix i18n
cnasikas Jul 2, 2023
a162163
Fix types
cnasikas Jul 2, 2023
2ea3c9c
Fix integration test
cnasikas Jul 2, 2023
7362b97
Fixes
cnasikas Jul 2, 2023
cbaeb1f
Merge branch 'main' into load_system_actions_in_memory
cnasikas Jul 3, 2023
a1b5d51
Filtered out system connectors in telemetry
cnasikas Jul 3, 2023
45c4690
Add the ability to pass additional privileges to the actions authoriz…
cnasikas Jul 3, 2023
2db46a0
Perform system actions RBAC
cnasikas Jul 3, 2023
9ebb327
Fix types and tests
cnasikas Jul 3, 2023
45f0265
Add unit tests
cnasikas Jul 4, 2023
e62faae
Add integration tests
cnasikas Jul 4, 2023
15da2b9
Add integration tests
cnasikas Jul 4, 2023
d7b05a9
Forbid registration of system action types in preconfigured connectors
cnasikas Jul 5, 2023
4b42071
Add system connector references
cnasikas Jul 5, 2023
813804c
Merge branch 'main' into forbid_system_action_from_config
cnasikas Jul 6, 2023
a8f3d0b
Add telemetry for system connectors
cnasikas Jul 6, 2023
17d3c6e
Merge branch 'main' into system_actions_rbac
cnasikas Jul 6, 2023
637a6b3
Merge branch 'main' into system_actions_rbac
cnasikas Jul 7, 2023
3a7e947
Merge branch 'main' into system_actions_refs
cnasikas Jul 7, 2023
eca005d
Fix tests
cnasikas Jul 8, 2023
0020ee9
Enhancements
cnasikas Jul 9, 2023
356432c
Pass params to system actions when getting kibana privileges
cnasikas Jul 9, 2023
4259f54
Fix integration tests
cnasikas Jul 9, 2023
c44f49d
Add integration tests for enqueue
cnasikas Jul 11, 2023
4035d11
Add integration tests for bulk_enqueue
cnasikas Jul 11, 2023
be7ec67
Add integration tests for spaces_only
cnasikas Jul 11, 2023
2c565b1
Fix integration tests
cnasikas Jul 11, 2023
a9e3bd5
Merge branch 'main' into system_actions_rbac
cnasikas Jul 11, 2023
72e9d72
Small improvements
cnasikas Jul 11, 2023
abe3edf
Merge branch 'system_actions_rbac' into system_actions_refs
cnasikas Jul 11, 2023
de1f454
Improvements
cnasikas Jul 12, 2023
4a07a54
Create connector adapter registry
cnasikas Jul 7, 2023
f9da335
Expose connector adapter registry
cnasikas Jul 12, 2023
e5d0f96
Create connector adapter registry
cnasikas Jul 7, 2023
da14afa
Expose connector adapter registry
cnasikas Jul 12, 2023
7e82056
Finilize :wadapter interface
cnasikas Jul 13, 2023
eb3386e
Improve ExecutionHandler
cnasikas Jul 13, 2023
0a871c2
Execute system actions
cnasikas Jul 14, 2023
19d348e
Merge branch 'main' into connector_adapters
cnasikas Jul 20, 2023
f0a0d84
Merge branch 'main' into connector_adapters
cnasikas Jul 20, 2023
1a0f5e5
Merge branch 'main' into connector_adapters
cnasikas Jul 20, 2023
3e5559f
Run system actions and refactor run method
cnasikas Jul 21, 2023
26abe18
Pass connector adapter to task runner factory
cnasikas Jul 22, 2023
d68323d
Fix types
cnasikas Jul 22, 2023
a54dd07
Merge branch 'main' into system_actions_refs
cnasikas Jul 22, 2023
25a93f0
Fixes
cnasikas Jul 22, 2023
f479dff
Allow to disable system actions
cnasikas Jul 22, 2023
637a98f
Allow rules client to get system actions
cnasikas Jul 22, 2023
95b1091
Merge branch 'main' into connector_adapters
cnasikas Jul 23, 2023
c626412
Configure system actions frequency
cnasikas Jul 23, 2023
5fbe8f5
Merge branch 'connector_adapters' of github.com:cnasikas/kibana into …
cnasikas Jul 23, 2023
a04b5ae
Merge branch 'main' into system_actions_refs
kibanamachine Jul 24, 2023
4d6599c
Merge branch 'main' into connector_adapters
cnasikas Jul 24, 2023
0910a65
Do not rely on actions config to create executables for system actions
cnasikas Jul 24, 2023
df6cbd6
Merge branch 'main' into connector_adapters
cnasikas Jul 25, 2023
e2952cd
Merge branch 'main' into connector_adapters
cnasikas Jul 26, 2023
2528b5c
Merge branch 'main' into connector_adapters
cnasikas Jul 28, 2023
b9cf042
Prevent users changing the system action config when creating a rule
cnasikas Jul 28, 2023
9b0cc28
Merge branch 'main' into system_actions_refs
cnasikas Jul 28, 2023
4fa0b02
PR feedback
cnasikas Jul 28, 2023
96115ef
Merge branch 'system_actions_refs' of github.com:cnasikas/kibana into…
cnasikas Jul 28, 2023
7ec5688
Merge branch 'system_actions_refs' into connector_adapters
cnasikas Jul 28, 2023
d52771a
Validate system actions when updating rules
cnasikas Jul 28, 2023
1f125f2
Fix types
cnasikas Jul 29, 2023
df156bf
Fix tests
cnasikas Jul 29, 2023
3fd1090
Merge branch 'main' into connector_adapters
cnasikas Jul 29, 2023
4bfae91
Fix UI types
cnasikas Jul 30, 2023
7b9b3d7
Merge branch 'main' into connector_adapters
cnasikas Jul 31, 2023
eca4a95
More fixes
cnasikas Jul 31, 2023
4fe215a
Write more tests
cnasikas Jul 31, 2023
f9ad053
Merge branch 'main' into connector_adapters
cnasikas Aug 1, 2023
82607cf
Add more tests
cnasikas Aug 3, 2023
6d87ec9
Merge branch 'main' into connector_adapters
cnasikas Aug 3, 2023
34ded88
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Aug 3, 2023
ea290e7
Improvements
cnasikas Aug 3, 2023
0d024cb
Merge branch 'main' into connector_adapters
cnasikas Aug 4, 2023
83b794c
Add UI tests
cnasikas Aug 4, 2023
9fa63c7
Add integration test for creating a rule
cnasikas Aug 4, 2023
82719c3
Merge branch 'connector_adapters' of github.com:cnasikas/kibana into …
cnasikas Aug 4, 2023
6331611
Merge branch 'main' into connector_adapters
cnasikas Aug 29, 2023
03d160e
Merge branch 'main' into connector_adapters
cnasikas Sep 1, 2023
dc8c755
Fix jest tests
cnasikas Sep 1, 2023
bd6921e
Add test for when updating a rule
cnasikas Sep 4, 2023
325bb5f
Add test for when bulk updating the actions of a rule
cnasikas Sep 5, 2023
abe3223
Create system actions raw schema
cnasikas Sep 6, 2023
e1eebcb
Add integration test to test connector adapters
cnasikas Sep 6, 2023
50a0e14
Merge branch 'main' into connector_adapters
cnasikas Sep 6, 2023
2c755c8
Validate rule action params when updating a rule
cnasikas Sep 6, 2023
05a5daf
Add more tests for system action execution
cnasikas Sep 7, 2023
98fbd60
Covert RuleActionTypes to object from enum
cnasikas Sep 7, 2023
11a7705
Add support of system actions in security solution
cnasikas Sep 7, 2023
2579bed
Improve security UI types
cnasikas Sep 8, 2023
1265e19
Security: Add tests for the bulk actions route
cnasikas Sep 8, 2023
34cb87f
Add more test for Security solution
cnasikas Sep 8, 2023
b71c2a6
Fix jest tests
cnasikas Sep 8, 2023
c1d0648
Merge branch 'main' into connector_adapters
cnasikas Sep 8, 2023
8057459
Merge branch 'main' into connector_adapters
cnasikas Sep 11, 2023
8e0cdc7
Merge branch 'system_actions_mvp' into connector_adapters
cnasikas Sep 12, 2023
1cfe7a8
Merge branch 'system_actions_mvp' into connector_adapters
cnasikas Sep 13, 2023
2d1a340
Remove type from APIs schemas
cnasikas Sep 15, 2023
8316419
Fix raw rule types
cnasikas Sep 15, 2023
0aa0ac6
Do not persist the type of the action when creating a rule
cnasikas Sep 16, 2023
6f6bb65
Expose isSystemAction from the actions client
cnasikas Sep 16, 2023
4cd4a2f
Add isSystemAction to the rules context
cnasikas Sep 16, 2023
0c8449f
Make the type required for default actions
cnasikas Sep 16, 2023
6f572f1
Remove security solution changes
cnasikas Sep 16, 2023
cacba48
Transform raw actions to domain actions
cnasikas Sep 16, 2023
00043d3
Rewrite actions request fixes
cnasikas Sep 16, 2023
62343dd
Fix SO types
cnasikas Sep 16, 2023
2e0883b
Transform bulk edit operations
cnasikas Sep 16, 2023
f137579
Merge branch 'system_actions_mvp' into connector_adapters
cnasikas Sep 16, 2023
e0d2226
Validate actions schema
cnasikas Sep 17, 2023
e3aefe9
Validate actions in update method
cnasikas Sep 17, 2023
85036a5
Add tests for bulk edit route
cnasikas Sep 17, 2023
fa60333
Add tests for update route
cnasikas Sep 17, 2023
742a0d6
Add tests for get/resolve/clone routes
cnasikas Sep 17, 2023
53aac58
Remove triggers_actions_ui code
cnasikas Sep 17, 2023
88ce36f
Fix public APIs
cnasikas Sep 17, 2023
a3f33bf
Remove type from legacy objects
cnasikas Sep 17, 2023
70c84d9
Remove type from create/update legacy routes
cnasikas Sep 17, 2023
25fca6e
Fix bug with actionsClient context (this)
cnasikas Sep 17, 2023
132a46d
Remove type from legacy find
cnasikas Sep 18, 2023
b6e2578
Fix rewriteBodyRes
cnasikas Sep 18, 2023
47ca6e4
Improvements and fixes
cnasikas Sep 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const createActionsClientMock = () => {
delete: jest.fn(),
update: jest.fn(),
getAll: jest.fn(),
getAllSystemActions: jest.fn(),
getBulk: jest.fn(),
getOAuthAccessToken: jest.fn(),
execute: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ import {
} from '../lib/get_execution_log_aggregation';
import { connectorFromSavedObject, isConnectorDeprecated } from '../application/connector/lib';
import { ListTypesParams } from '../application/connector/methods/list_types/types';
import { getAllSystemActions } from '../application/connector/methods/get_all/get_all';

interface ActionUpdate {
name: string;
Expand Down Expand Up @@ -481,6 +482,13 @@ export class ActionsClient {
return getAll({ context: this.context, includeSystemActions });
}

/**
* Get all system connectors
*/
public async getAllSystemActions(): Promise<FindConnectorResult[]> {
return getAllSystemActions({ context: this.context });
}

/**
* Get bulk actions with in-memory list
*/
Expand Down
Loading