Skip to main content
Version: v46

Cortex XSOAR

You can integrate PrivX with Cortex XSOAR by Palo Alto Networks to retrieve secrets and request short-lived SSH certificates from PrivX. The integration uses a PrivX API client. The roles assigned to the client determine what it can access.

To integrate PrivX with Cortex XSOAR, do the following:

  1. Install Cortex XSOAR.

  2. In Cortex XSOAR, install the PrivX content pack.

  3. In the PrivX Web UI, go to Administration → Roles and click Add Role.

    1. Enter a name for the role, select the connections-authorize permission.

    2. Enable Use with PrivX Desktop so the XSOAR API client can use this role.

    3. Save the changes.

      Example of configured PrivX role for XSOAR configuration
  4. Go to Deployment → API Clients and click Add API Client. Assign the role you created to the API client. Ensure that the client also has a role that grants access to the required account on the target host. Save the API client.
    For more information, see API Client Integration.

    Example of configured PrivX role for XSOAR configuration
  5. If you plan to use privx-get-cert, choose an existing SSH public key or generate a key pair. For example, run the following commands to generate an RSA key pair and display the public key. When prompted, enter a passphrase for the private key or press Enter to leave it empty.

    % ssh-keygen -t rsa -b 4096
    Generating public/private rsa key pair.
    Enter file in which to save the key (~/.ssh/id_rsa): id_rsa_test
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in id_rsa_test
    Your public key has been saved in id_rsa_test.pub

    % cat id_rsa_test.pub
    ssh-rsa AAAAB3NzaC1yc2EA....GSCjSzEHDclQ== user@host
  6. In Cortex XSOAR, configure the PrivX integration with the following attributes. Use the credentials and TLS trust anchor from the PrivX API Clients page.

    SettingValue
    Your PrivX server address (FQDN or IP)Enter the fully qualified domain name (FQDN) or IP address of the PrivX server. If your PrivX servers are behind a load balancer, enter the load balancer address.
    Your PrivX server HTTPS portEnter the HTTPS port of the PrivX endpoint. The default is 443.
    OAuth client IDEnter the OAuth client ID. For default PrivX installations, use privx-external to identify the client as API client.
    OAuth client secretEnter the OAuth client secret.
    API client IDEnter the ID of the PrivX API client you created.
    API client secretEnter the secret for that API client.
    PrivX CA certificatePaste the TLS Trust Anchor from the PrivX API Clients page. Cortex XSOAR uses it to verify the identity of the PrivX HTTPS endpoint.
    [Optional] User's public keyThe privx-get-cert command requires an SSH public key to request a short-lived certificate from PrivX. Paste the contents of your public key file (for example, id_rsa_test.pub) into this field, or supply the public key as a command argument.
  7. On the integration page in Cortex XSOAR, click Test. Verify that the test returns Success.

    Example of testing XSOAR configuration
  8. Run the Cortex XSOAR command for the operation you want to test. Replace the example values with those from your deployment.

    !privx-get-cert username=xsoar hostname=10.1.12.15
    !privx-get-cert username=xsoar hostname=10.1.12.15 service=SSH role-id=b4a9749e-bc9b-5e96-4c63-9bfd58b74e7b

    !privx-get-secret name=the-secret
    !privx-get-secret name=another-secret