Repository navigation
added doc for upload-custome-integration #1867
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
6b24521
added doc for upload-custome-integration
Shir2611 7d7dc28
small fixes to the phrasing
Shir2611 03cec4f
code review
Shir2611 6568d9e
demo notes
Shir2611 60e8c16
Merge branch 'master' into demisto-sdk-upload-custome-integration
Shir2611 5de2aae
code review
Shir2611 274eeb6
Merge branch 'master' into demisto-sdk-upload-custome-integration
Shir2611 fc9d214
changed the clone to ssh
Shir2611 cbd1ba2
revert
Shir2611 1a116f0
Merge branch 'master' into demisto-sdk-upload-custome-integration
Shir2611 a73b8e6
tech writer approved
Shir2611 2b6319f
bold
Shir2611 8a978ff
empty commit
Shir2611 4a962bf
code review
Shir2611 955388f
final notes
Shir2611 86bc8ed
changed the sdk ver
Shir2611 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
259 changes: 259 additions & 0 deletions
259
docs/integrations/manage-custom-content-for-connectors.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,259 @@ | ||
| --- | ||
| id: manage-custom-content-for-connectors | ||
| title: Manage custom content for connectors | ||
| description: Learn how Cortex XSIAM manages custom content for connectors, including viewing source code and duplicating sub-capabilities (integrations) using the demisto-sdk. | ||
| --- | ||
|
|
||
| :::note | ||
| This topic applies to the following Cortex products: **Cortex XSIAM**, **Cortex XDR**, **Cortex Cloud**, **Cortex AgentiX**, and **Cortex Data Security**. It does not apply to standalone Cortex XSOAR deployments. | ||
| ::: | ||
|
|
||
|
Shir2611 marked this conversation as resolved.
|
||
| Cortex is transitioning to a unified connector experience that consolidates all vendor security capabilities, including log ingestion, automation, and threat intelligence, into a single entry in the catalog. Within a connector, these individual services are referred to as sub-capabilities (integrations). | ||
|
|
||
| --- | ||
|
|
||
| ## Availability | ||
|
|
||
| The method for managing custom content depends on your onboarding date and the implementation status of the specific vendor: | ||
|
|
||
| <ul className="bullet-list"> | ||
| <li><strong>New customers (onboarded after July 26, 2026):</strong> All services in the catalog follow the unified connector experience and require external management for custom content.</li> | ||
| <li><strong>Existing customers (onboarded before July 26, 2026):</strong> You may see a mix of legacy integrations and unified connectors. The product UI will automatically direct you to the external workflow for sub-capabilities (integrations) that have been transitioned to the unified experience.</li> | ||
| </ul> | ||
|
|
||
| --- | ||
|
|
||
| ## Duplicate and view source code | ||
|
|
||
| The method for managing source code depends on whether the service is currently part of a unified connector. | ||
|
|
||
| <ul className="bullet-list"> | ||
| <li><strong>Legacy integrations:</strong> For services not yet transitioned to the unified experience, you can continue to use the <strong>Duplicate</strong> and <strong>View Source</strong> options directly within the product UI. Upon duplication, the item transitions to a custom content status, and you can modify the source code using the built-in editor.</li> | ||
| <li><strong>Connector sub-capabilities (integrations):</strong> For vendors using the unified connector experience, the built-in UI editor is not supported. To view the source code of a sub-capability (integration), you can do so directly in <strong>GitHub</strong>. To duplicate a sub-capability (integration) and upload it as custom content, you must perform a manual flow using the <code>demisto-sdk</code>.</li> | ||
| </ul> | ||
|
|
||
|
Shir2611 marked this conversation as resolved.
|
||
| --- | ||
|
|
||
| ## External management workflow | ||
|
|
||
| When you select **Duplicate** or **View Source** for a sub-capability (integration) on the **Data Sources & Integrations** page, Cortex provides the names of all the collector's sub-capabilities (integrations) so you can select the one relevant to you. You will need this name to locate the relevant files in the official repository. | ||
|
|
||
| ### Option 1: View Source in GitHub | ||
|
|
||
| If you only need to review the code without making changes: | ||
|
|
||
| 1. Copy the **Integration Name** provided for the sub-capability (integration) on the **Data Sources & Integrations** page in the Cortex tenant. | ||
| 2. Navigate to the official [Cortex Content GitHub Repository](https://github.com/demisto/content). | ||
| 3. Search for the integration folder under the `Packs/` directory using the name you copied (such as, `Packs/<PackName>/Integrations/<IntegrationName>/`). | ||
| 4. Review the YAML and Python/PowerShell files directly in the repository. | ||
|
|
||
| ### Option 2: Duplicate and modify via the SDK | ||
|
|
||
| To modify an existing sub-capability (integration) and upload it as custom content, you must use the SDK. | ||
|
|
||
| #### Prerequisites | ||
|
|
||
| Before starting, ensure you have: | ||
|
|
||
|
Shir2611 marked this conversation as resolved.
|
||
| 1. **[Python 3.10 or higher](https://www.python.org/downloads/)** installed on your workstation. | ||
| 2. **[Git](https://git-scm.com/downloads)** installed and configured with access to GitHub. | ||
| 3. **Cortex tenant credentials** (Instance Administrator privileges required). | ||
|
|
||
| --- | ||
|
|
||
| #### Step 1: Install or update demisto-sdk | ||
|
|
||
| The custom upload flow requires `demisto-sdk` version **1.39.10 or higher**. | ||
|
|
||
| Run the following command to install or upgrade: | ||
|
|
||
| ```bash | ||
| pip install --upgrade demisto-sdk | ||
|
Shir2611 marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| Verify the version and confirm the command is available: | ||
|
|
||
|
Shir2611 marked this conversation as resolved.
|
||
| ```bash | ||
| demisto-sdk upload-custom-integration --version | ||
| ``` | ||
|
|
||
| :::note | ||
| For full installation instructions and system requirements, see the [Demisto-SDK Installation Guide](https://cortex-docs.paloaltonetworks.com/demisto-sdk-development-guide/demisto-sdk-guide/install-demisto-sdk). | ||
| ::: | ||
|
|
||
| --- | ||
|
|
||
| #### Step 2: Clone or sync the content repository | ||
|
|
||
| :::note Planning to contribute back to the official repository? | ||
| If you intend to submit your changes as a pull request to `demisto/content`, you should **fork** the repository first instead of cloning it directly. See the [Contributing Guide](../contributing/contributing) for the full fork-based contribution workflow. | ||
| ::: | ||
|
|
||
| Clone the official [`demisto/content`](https://github.com/demisto/content) repository locally. | ||
|
|
||
| **Option A: SSH** *(recommended for local uploads only)* | ||
|
|
||
| ```bash | ||
| git clone git@github.com:demisto/content.git | ||
| ``` | ||
|
|
||
| **Option B: HTTPS** | ||
|
|
||
| ```bash | ||
| git clone https://github.com/demisto/content.git | ||
| ``` | ||
|
|
||
| :::note | ||
| If you already have a local copy, ensure it is up to date before proceeding: | ||
|
|
||
| ```bash | ||
| git checkout master | ||
| git pull origin master --rebase | ||
| ``` | ||
| ::: | ||
|
|
||
|
Shir2611 marked this conversation as resolved.
|
||
| --- | ||
|
|
||
| #### Step 3: Configure environment variables | ||
|
|
||
| To allow `demisto-sdk` to authenticate with your platform instance, create a `.env` file in the root directory of your cloned content repository (`content/.env`). | ||
|
|
||
| **How to obtain credentials from the Cortex tenant:** | ||
|
|
||
| 1. Log in to the Cortex tenant. | ||
| 2. Navigate to **Settings → Configurations** → search for **API Keys**. | ||
| 3. **API URL** (`DEMISTO_BASE_URL`): Click **Copy API URL** in the top right corner. | ||
| 4. **API Key** (`DEMISTO_API_KEY`): | ||
| - Click **New Key** (top right corner). | ||
| - Set **Key Type** to `Standard`. | ||
| - Set **Role** to `Instance Administrator`. | ||
| - Click **Generate** and copy the key immediately from the window. | ||
| 5. **Auth ID** (`XSIAM_AUTH_ID`): | ||
| - Close the key window to view the API Keys table. | ||
| - Locate the row for your newly created API key. | ||
| - Copy the numerical ID in the **ID** column (such as, `4`). | ||
|
|
||
| **Populate `content/.env`** | ||
|
|
||
| Add your credentials to `content/.env`: | ||
|
|
||
| ```bash | ||
| DEMISTO_BASE_URL=https://api-your-tenant-url.xdr.us.paloaltonetworks.com | ||
| DEMISTO_API_KEY=your_copied_api_key_here | ||
| XSIAM_AUTH_ID=your_key_id_number_here | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| #### Step 4: Duplicate and update YAML | ||
|
|
||
| 1. **Locate the sub-capability (integration)**: Find the directory you want to duplicate under the Packs directory (such as, `Packs/<PackName>/Integrations/<IntegrationName>/`). | ||
| 2. **Add the `_copy` marker**: Open the integration's `.yml` file in your favorite IDE (such as, VS Code) and update both the `commonfields.id` and `name` fields to include the `_copy` marker. | ||
|
|
||
|
Shir2611 marked this conversation as resolved.
|
||
| :::note | ||
| If either field is missing this marker, the upload command will block execution to prevent tenant corruption. | ||
|
|
||
| Updating the `display` field with the `_copy` marker is not mandatory, but it is recommended. Doing so makes it easier to distinguish your custom duplicate from the original sub-capability (integration) in the Cortex XSIAM UI. | ||
| ::: | ||
|
|
||
| :::warning Critical System ID Conflict Risk | ||
| If you upload a custom sub-capability (integration) whose ID matches an official system integration's ID, any subsequent attempt to update or install the system pack containing that integration will **fail with a platform system error**. The `_copy` marker suffix is required to protect your instance. | ||
| ::: | ||
|
|
||
| For example: | ||
|
|
||
|
Shir2611 marked this conversation as resolved.
|
||
| ```yaml | ||
| # BEFORE | ||
| commonfields: | ||
| id: PolarSecurity | ||
| name: Polar Security | ||
| display: Polar Security | ||
|
|
||
| # AFTER (Required Duplication Convention) | ||
| commonfields: | ||
| id: PolarSecurity_copy | ||
| name: Polar Security_copy | ||
|
Shir2611 marked this conversation as resolved.
|
||
| display: Polar Security_copy | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| #### Step 5: Upload the custom sub-capability (integration) | ||
|
|
||
| Run the `upload-custom-integration` command, passing the path to your modified directory or direct YAML file. | ||
|
|
||
| **Recommended (upload using directory path)** | ||
|
|
||
| ```bash | ||
| demisto-sdk upload-custom-integration -i 'Packs/MyPack/Integrations/MyIntegration' | ||
| ``` | ||
|
|
||
| **Alternative (upload using direct YAML file)** | ||
|
|
||
| ```bash | ||
| demisto-sdk upload-custom-integration -i 'Packs/MyPack/Integrations/MyIntegration/MyIntegration.yml' | ||
| ``` | ||
|
|
||
| **Expected command output:** | ||
|
|
||
| ```text | ||
| Running Demisto-SDK CLI | ||
| Uploading Packs/MyPack/Integrations/MyIntegration/MyIntegration.yml to https://api-your-tenant... | ||
| UPLOAD SUMMARY: | ||
|
|
||
| SUCCESSFUL UPLOADS: | ||
| ┌───────────────────┬─────────────┬──────────────┬──────────────┐ | ||
| │ NAME │ TYPE │ PACK NAME │ PACK VERSION │ | ||
| ├───────────────────┼─────────────┼──────────────┼──────────────┤ | ||
| │ MyIntegration.yml │ Integration │ My Pack │ 1.0.0 │ | ||
| └───────────────────┴─────────────┴──────────────┴──────────────┘ | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| #### Step 6: Verify in the Cortex tenant | ||
|
|
||
| 1. Log in to the Cortex tenant. | ||
| 2. Navigate to **Settings → Data Sources & Integrations → Add New**. | ||
| 3. Locate your sub-capability (integration); it will display a **Custom** badge. | ||
| 4. Click **Add** to configure and use your custom duplicate. | ||
|
Shir2611 marked this conversation as resolved.
Shir2611 marked this conversation as resolved.
|
||
|
|
||
| --- | ||
|
|
||
| ## Troubleshooting & FAQ | ||
|
|
||
| ### Error: Missing `_copy` Marker | ||
|
|
||
| If you see an error like the one below, the SDK has blocked the upload to prevent ID conflicts: | ||
|
|
||
| ```text | ||
| Invalid value: | ||
| Integration field(s) missing the '_copy' marker: | ||
| commonfields.id = 'MyIntegration' and name = 'MyIntegration' | ||
| ``` | ||
|
|
||
| **Fix**: Open your YAML file and append `_copy` to both `commonfields.id` and `name`. | ||
|
|
||
| --- | ||
|
|
||
| ### Bypassing Validation (`--force-id`) | ||
|
|
||
| :::warning | ||
| Using `--force-id` is strongly discouraged. Only use this flag if you are an advanced administrator explicitly maintaining custom IDs outside standard system pack boundaries. | ||
|
Shir2611 marked this conversation as resolved.
|
||
|
|
||
| Before using this flag, verify ALL of the following: | ||
| 1. Your chosen ID is completely unique and does NOT match the original integration ID. | ||
| 2. Your chosen ID does NOT match any integration ID published on the Marketplace. | ||
| ::: | ||
|
|
||
| If you must upload without the `_copy` marker, pass the `--force-id` flag: | ||
|
|
||
| ```bash | ||
| demisto-sdk upload-custom-integration -i <path> --force-id | ||
| ``` | ||
|
|
||
| This will log a high-visibility CLI warning before proceeding: | ||
|
|
||
| ```text | ||
| [WARNING] Uploading custom content without the '_copy' marker risks conflicting with official system pack IDs... Proceeding because --force-id was explicitly set. | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.