Skip to content

Commit

Permalink
PAPP-35103 added queue_offline session functionality for queueing com…
Browse files Browse the repository at this point in the history
…mands if decice is offline
  • Loading branch information
grokas-splunk committed Dec 4, 2024
1 parent 84a4d25 commit a806930
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions crowdstrikeoauthapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,12 @@
"contains": [
"crowdstrike device id"
]
},
"queue_offline": {
"data_type": "boolean",
"description": "Queue commands for offline devices, will execute when system comes back online",
"default": false,
"order": 1
}
},
"output": [
Expand All @@ -1800,6 +1806,10 @@
"crowdstrike device id"
]
},
{
"data_path": "action_result.parameter.queue_offline",
"data_type": "boolean"
},
{
"data_path": "action_result.data.*.errors",
"data_type": "string"
Expand Down
6 changes: 5 additions & 1 deletion crowdstrikeoauthapi_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,11 @@ def _handle_create_session(self, param):
self.save_progress("In action handler for: {0}".format(self.get_action_identifier()))
action_result = self.add_action_result(ActionResult(dict(param)))

params = {"device_id": param["device_id"], "origin": "phantom"}
params = {
"device_id": param["device_id"],
"origin": "phantom",
"queue_offline": param.get("queue_offline", False) # default to False to maintain original behavior
}

ret_val, resp_json = self._make_rest_call_helper_oauth2(action_result, CROWDSTRIKE_RTR_SESSION_ENDPOINT, json_data=params, method="post")

Expand Down

0 comments on commit a806930

Please sign in to comment.