You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/content/en/docs/core-components/executer.md
+124-53
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,94 @@ description: >
10
10
## Components
11
11
The executor consists of the following components.
12
12
13
+
- Action executor
14
+
- Playbook action executor
15
+
- if-condition executor
16
+
- while-condition executor
17
+
- parallel executor
18
+
19
+
The decomposer interacts with every executor type. They all have separate interfaces to handle new step types in the future without changing the current interfaces.
The action executor consist of the following components
96
+
13
97
- The capability selector
14
98
- Native capabilities (command executors)
15
99
- MQTT capability to interact with: Fin capabilities (third-party executors)
16
100
17
-
### Capability selector (Executor)
18
-
19
101
The capability selector will select the implementation which is capable of executing the incoming command. There are native capabilities based on the CACAO `command-type-ov`:
20
102
21
103
***Currently implemented**
@@ -33,15 +115,15 @@ The capability selector will select the implementation which is capable of execu
33
115
* sigma
34
116
* yara
35
117
36
-
### Native capabilities
118
+
####Native capabilities
37
119
The executor will select a module that is capable of executing the command and pass the details to it. The capability selection is performed based on the agent type (see [Agent and Target Common Properties](https://docs.oasis-open.org/cacao/security-playbooks/v2.0/cs01/security-playbooks-v2.0-cs01.html#_Toc152256509) in the CACAO 2.0 spec). The convention is that the agent type must equal `soarca-<capability identifier>`, e.g. `soarca-ssh` or `soarca-openc2-http`.
38
120
39
121
The result of the step execution will be returned to the decomposer. A result can be either output variables or error status.
40
122
41
-
### MQTT executor -> Fin capabilities
123
+
####MQTT executor -> Fin capabilities
42
124
The Executor will put the command on the MQTT topic that is offered by the module. How a module handles this is described in the link:modules.adoc[module documentation]
Example execution for SSH commands with SOARCA native capability.
117
152
@@ -135,3 +170,39 @@ else capability not available
135
170
end
136
171
```
137
172
173
+
### Playbook action executor
174
+
The playbook executor handles execution of playbook action steps. The variables from the top level playbook are injected into the be executed playbook.
175
+
It could happen that in the downstream playbook the variables `collide` with the top level playbook. In this case the top level playbook variables are `NOT` transferred to the downstream playbook. `Agents and Targets cannot be transferred` between playbooks at this time. Playbooks are only loaded in the executor and then a new Decomposer is created to execute the playbook.
176
+
177
+
The result of the step execution will be returned to the decomposer. A result can be either output variables or error status.
178
+
179
+
```plantuml
180
+
package playbookaction{
181
+
interface IExecutor {
182
+
Variables, err Execute(meta, step, variables)
183
+
}
184
+
}
185
+
class "Decomposer" as decomposer
186
+
class "Action Executor" as exe
187
+
interface "IPlaybookController" as controller
188
+
interface "IDatabaseController" as database
189
+
190
+
playbookaction.IExecutor <|.. exe
191
+
decomposer -> playbookaction.IExecutor
192
+
exe -> controller
193
+
database <- exe
194
+
195
+
```
196
+
197
+
### If condition executor
198
+
The if-condition executor will process a cacao if-condition step and determine it's output.
199
+
200
+
The result of the step comparison will be returned to the decomposer. A result can be either a next step id and/or error status.
201
+
202
+
### While condition executor
203
+
The if-condition executor will process a cacao while-condition step and determine it's output.
204
+
205
+
The result of the step comparison will be returned to the decomposer. A result can be either a next step id and/or error status.
206
+
207
+
### Parallel step executor
208
+
The parallel executor will execute the parallel step. This wil be done in sequence to simplify implementation. As parallel steps must not be depended on each other sequential execution is possible. Later this will be changed.
0 commit comments