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:
-
Install Cortex XSOAR.
-
In Cortex XSOAR, install the PrivX content pack.
-
In the PrivX Web UI, go to Administration → Roles and click Add Role.
-
Enter a name for the role, select the
connections-authorizepermission. -
Enable Use with PrivX Desktop so the XSOAR API client can use this role.
-
Save the changes.
-
-
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.
-
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 4096Generating public/private rsa key pair.Enter file in which to save the key (~/.ssh/id_rsa): id_rsa_testEnter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in id_rsa_testYour public key has been saved in id_rsa_test.pub% cat id_rsa_test.pubssh-rsa AAAAB3NzaC1yc2EA....GSCjSzEHDclQ== user@host -
In Cortex XSOAR, configure the PrivX integration with the following attributes. Use the credentials and TLS trust anchor from the PrivX API Clients page.
Setting Value 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 port Enter the HTTPS port of the PrivX endpoint. The default is 443.OAuth client ID Enter the OAuth client ID. For default PrivX installations, use privx-externalto identify the client as API client.OAuth client secret Enter the OAuth client secret. API client ID Enter the ID of the PrivX API client you created. API client secret Enter the secret for that API client. PrivX CA certificate Paste 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 key The privx-get-certcommand 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. -
On the integration page in Cortex XSOAR, click Test. Verify that the test returns Success.
-
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