splunk-soar-sdk 1.3.4__py3-none-any.whl → 1.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- soar_sdk/abstract.py +8 -1
- soar_sdk/app.py +3 -1
- soar_sdk/app_client.py +9 -1
- {splunk_soar_sdk-1.3.4.dist-info → splunk_soar_sdk-1.4.0.dist-info}/METADATA +1 -1
- {splunk_soar_sdk-1.3.4.dist-info → splunk_soar_sdk-1.4.0.dist-info}/RECORD +8 -8
- {splunk_soar_sdk-1.3.4.dist-info → splunk_soar_sdk-1.4.0.dist-info}/WHEEL +0 -0
- {splunk_soar_sdk-1.3.4.dist-info → splunk_soar_sdk-1.4.0.dist-info}/entry_points.txt +0 -0
- {splunk_soar_sdk-1.3.4.dist-info → splunk_soar_sdk-1.4.0.dist-info}/licenses/LICENSE +0 -0
soar_sdk/abstract.py
CHANGED
|
@@ -63,6 +63,11 @@ class SOARClient(Generic[SummaryType]):
|
|
|
63
63
|
"""Object governing interaction with the SOAR container API. Subclasses must define."""
|
|
64
64
|
pass
|
|
65
65
|
|
|
66
|
+
@abstractmethod
|
|
67
|
+
def get_executing_container_id(self) -> int:
|
|
68
|
+
"""Return the current Container ID passed in the Connector Run Action JSON."""
|
|
69
|
+
pass
|
|
70
|
+
|
|
66
71
|
def get(
|
|
67
72
|
self,
|
|
68
73
|
endpoint: str,
|
|
@@ -202,7 +207,9 @@ class SOARClient(Generic[SummaryType]):
|
|
|
202
207
|
return "https://localhost:9999/"
|
|
203
208
|
|
|
204
209
|
@abstractmethod
|
|
205
|
-
def update_client(
|
|
210
|
+
def update_client(
|
|
211
|
+
self, soar_auth: SOARClientAuth, asset_id: str, container_id: int = 0
|
|
212
|
+
) -> None:
|
|
206
213
|
"""Hook to update the SOAR API client before any actions run with the input data.
|
|
207
214
|
|
|
208
215
|
An example of what this function might do is authenticate the API client.
|
soar_sdk/app.py
CHANGED
|
@@ -187,7 +187,9 @@ class App:
|
|
|
187
187
|
|
|
188
188
|
self.__logger.handler.set_handle(handle)
|
|
189
189
|
soar_auth = App.create_soar_client_auth_object(input_data)
|
|
190
|
-
self.soar_client.update_client(
|
|
190
|
+
self.soar_client.update_client(
|
|
191
|
+
soar_auth, input_data.asset_id, input_data.container_id
|
|
192
|
+
)
|
|
191
193
|
return self.actions_manager.handle(input_data, handle=handle)
|
|
192
194
|
|
|
193
195
|
@staticmethod
|
soar_sdk/app_client.py
CHANGED
|
@@ -45,6 +45,7 @@ class AppClient(SOARClient[SummaryType]):
|
|
|
45
45
|
|
|
46
46
|
self._summary: Optional[SummaryType] = None
|
|
47
47
|
self._message: Optional[str] = None
|
|
48
|
+
self.__container_id: int = 0
|
|
48
49
|
|
|
49
50
|
@property
|
|
50
51
|
def client(self) -> httpx.Client:
|
|
@@ -66,10 +67,17 @@ class AppClient(SOARClient[SummaryType]):
|
|
|
66
67
|
"""The SOAR Vault API."""
|
|
67
68
|
return self._vault_api
|
|
68
69
|
|
|
69
|
-
def
|
|
70
|
+
def get_executing_container_id(self) -> int:
|
|
71
|
+
"""Return the current Container ID passed in the Connector Run Action JSON."""
|
|
72
|
+
return self.__container_id
|
|
73
|
+
|
|
74
|
+
def update_client(
|
|
75
|
+
self, soar_auth: SOARClientAuth, asset_id: str, container_id: int = 0
|
|
76
|
+
) -> None:
|
|
70
77
|
"""Update the SOAR client with the given authentication and asset ID."""
|
|
71
78
|
self.authenticate_soar_client(soar_auth)
|
|
72
79
|
self._containers_api.set_executing_asset(asset_id)
|
|
80
|
+
self.__container_id = container_id
|
|
73
81
|
|
|
74
82
|
def authenticate_soar_client(self, soar_auth: SOARClientAuth) -> None:
|
|
75
83
|
"""Authenticate the SOAR client with the given authentication credentials."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splunk-soar-sdk
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: The official framework for developing and testing Splunk SOAR Apps
|
|
5
5
|
Project-URL: Homepage, https://github.com/phantomcyber/splunk-soar-sdk
|
|
6
6
|
Project-URL: Documentation, https://github.com/phantomcyber/splunk-soar-sdk
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
soar_sdk/__init__.py,sha256=RzAng-ARqpK01SY82lNy4uYJFVG0yW6Q3CccEqbToJ4,726
|
|
2
|
-
soar_sdk/abstract.py,sha256=
|
|
2
|
+
soar_sdk/abstract.py,sha256=2fYEc_xdhz635RnUn5Fn7odTuNkzqQ_YjKF25A-KjNM,7863
|
|
3
3
|
soar_sdk/action_results.py,sha256=gAQwHjXbkkzOJTmQnLwBjKjwbuz8mSPyqIVcirVS598,10114
|
|
4
4
|
soar_sdk/actions_manager.py,sha256=vYglKejmPX1MldTzafCVE2K60UiSLhNGfYcVOxD4YwU,5884
|
|
5
|
-
soar_sdk/app.py,sha256=
|
|
5
|
+
soar_sdk/app.py,sha256=lCCOLKfpUxE9WgLYn_S83riHe4vL2Kzcgda2ra4xNs4,29207
|
|
6
6
|
soar_sdk/app_cli_runner.py,sha256=uk9V-cbAHx1tzK_1gCYpfdF7IJ_ZwuWV2Ak4NMOvKGA,11873
|
|
7
|
-
soar_sdk/app_client.py,sha256=
|
|
7
|
+
soar_sdk/app_client.py,sha256=UVCMFYweaYcFk7WrtoVsCoprYZ7JlzMBR108ZQRV8SE,6051
|
|
8
8
|
soar_sdk/asset.py,sha256=_PZnbroenzfyGup7wcFsyJG_2TFcy19hf0Gi1gkBdsQ,10611
|
|
9
9
|
soar_sdk/async_utils.py,sha256=gND8ZiVTqDYLQ88Ua6SN1mInJaEcfa168eOaRoURt3E,1441
|
|
10
10
|
soar_sdk/colors.py,sha256=--i_iXqfyITUz4O95HMjfZQGbwFZ34bLmBhtfpXXqlQ,1095
|
|
@@ -96,8 +96,8 @@ soar_sdk/views/components/pie_chart.py,sha256=LVTeHVJN6nf2vjUs9y7PDBhS0U1fKW750l
|
|
|
96
96
|
soar_sdk/webhooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
97
|
soar_sdk/webhooks/models.py,sha256=-rjuFA9cRX5zTLp7cHSHVTkt5eVJD6BdESGbj_qkyHI,4540
|
|
98
98
|
soar_sdk/webhooks/routing.py,sha256=BKbURSrBPdOTS5UFL-mHzFEr-Fj04mJMx9KeiPrZ2VQ,6872
|
|
99
|
-
splunk_soar_sdk-1.
|
|
100
|
-
splunk_soar_sdk-1.
|
|
101
|
-
splunk_soar_sdk-1.
|
|
102
|
-
splunk_soar_sdk-1.
|
|
103
|
-
splunk_soar_sdk-1.
|
|
99
|
+
splunk_soar_sdk-1.4.0.dist-info/METADATA,sha256=eEoL_4B-eXIvwDIamcQukIMzBWwVl6utKHZkfhDtrYE,7355
|
|
100
|
+
splunk_soar_sdk-1.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
101
|
+
splunk_soar_sdk-1.4.0.dist-info/entry_points.txt,sha256=CgBjo2ZWpYNkt9TgvToL26h2Tg1yt8FbvYTb5NVgNuc,51
|
|
102
|
+
splunk_soar_sdk-1.4.0.dist-info/licenses/LICENSE,sha256=gNCGrGhrSQb1PUzBOByVUN1tvaliwLZfna-QU2r2hQ8,11345
|
|
103
|
+
splunk_soar_sdk-1.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|