This integration script is designed to sync tasks between a runZero SaaS instance and a self-hosted runZero console. It retrieves tasks from a SaaS instance, downloads their data, and uploads them to a self-hosted site. Optionally, it can hide the tasks in the SaaS instance after a successful sync.
- Superuser access to the Custom Integrations configuration in runZero.
- SaaS Organization ID
- SaaS Site ID
- Self-hosted Organization ID
- Self-hosted Site ID
- API Tokens for both the SaaS and self-hosted instances
-
Obtain Required IDs and Tokens
- SaaS Organization ID (
ORG-UUID-REPLACE) - SaaS Site ID (
SITE-UUID-REPLACE) - Self-hosted Organization ID (
ORG-UUID-REPLACE) - Self-hosted Site ID (
SITE-UUID-REPLACE) - API Tokens for both SaaS and self-hosted instances
- SaaS Organization ID (
-
Create the Credential for the Custom Integration
- Go to runZero Credentials.
- Select
Custom Integration Script Secrets. - Use the
access_keyfield for the SaaS token. - Use the
access_secretfield for the self-hosted token.
-
Create the Custom Integration
- Go to runZero Custom Integrations.
- Add a Name and Icon for the integration (e.g., "Task Sync").
- Toggle
Enable custom integration scriptto input the finalized script. - Click
Validateto ensure it has valid syntax. - Click
Saveto create the Custom Integration.
-
Create the Custom Integration Task
- Go to runZero Ingest.
- Select the Credential and Custom Integration created in the previous steps.
- Update the task schedule to recur at the desired timeframes.
- Select the Explorer you'd like the Custom Integration to run from.
- Click
Saveto kick off the first task.
- To automatically hide tasks in the SaaS instance after sync, set the
HIDE_TASKS_ON_SYNCflag toTruein the script.
- Task Sync Failures: Ensure that both the SaaS and self-hosted tokens are valid and have the necessary permissions.
- Data Transfer Issues: Confirm that the self-hosted console is reachable from the machine running this script.
- Network Timeouts: Increase the timeout in the
sync_task()function if syncing large tasks.
This integration is provided under the MIT License. See the LICENSE file for more details.