For the complete documentation index, see llms.txt. This page is also available as Markdown.

Phase 2: Platform service accounts

This phase creates the main service account used by Cortex to monitor your GCP resources.

Note: All GCP resources that support labels must include the following labels:

  • managed_by=paloaltonetworks

  • Any additional labels you configured in the GCP onboarding wizard in Cortex.

To add a label to a GCP resource, use the label flag:

--labels managed_by=paloaltonetworks,<your_key>=<your_value>

2.1 Create the Platform Service Account (Required)

Create a service account that Cortex will use as the primary identity for accessing your resources.

gcloud iam service-accounts create <PLATFORM_SA_NAME> \
    --display-name="Cortex Platform Service Account"

Where <PLATFORM_SA_NAME> is your chosen service account ID (e.g., cortex-platform).

2.2 Grant predefined managed roles to the Platform Service Account (Required)

Module: Assets Discovery

Bind the following predefined roles to the platform service account:

gcloud projects add-iam-policy-binding <PROJECT_ID> \
    --member="serviceAccount:<PLATFORM_SA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
    --role="roles/cloudfunctions.viewer"

gcloud projects add-iam-policy-binding <PROJECT_ID> \
    --member="serviceAccount:<PLATFORM_SA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
    --role="roles/container.clusterViewer"

gcloud projects add-iam-policy-binding <PROJECT_ID> \
    --member="serviceAccount:<PLATFORM_SA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
    --role="roles/storage.objectViewer"

gcloud projects add-iam-policy-binding <PROJECT_ID> \
    --member="serviceAccount:<PLATFORM_SA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
    --role="roles/firebaserules.viewer"

gcloud projects add-iam-policy-binding <PROJECT_ID> \
    --member="serviceAccount:<PLATFORM_SA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
    --role="roles/viewer"

Where:

  • <PLATFORM_SA_NAME> is the platform service account name

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

After running the last command, the following prompt is displayed:

Choose "None" by entering 2.

2.3 Create the Custom Role and grant it to the Platform Service Account (Required)

Module: Assets Discovery

Create a custom role with granular permissions not covered by the built-in roles.

2.3.1 Create the Custom Role

Where <CLOUD_VIEWER_ROLE_ID> is your chosen role ID (e.g., CortexCloudViewer).

2.3.2 Grant the Custom Role to the Platform Service Account

Where:

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

  • <PLATFORM_SA_NAME> is the Platform Service Account name

  • <CLOUD_VIEWER_ROLE_ID> is your chosen role ID (e.g., CortexCloudViewer).

2.4 Grant the Service Account Token Creator role to the Outpost Service Account (Required)

Allow the Outpost Service Account (provided by Cortex) to impersonate the Platform Service Account:

Where:

  • <PLATFORM_SA_NAME> is the Platform Service Account name

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

  • <OUTPOST_SERVICE_ACCOUNT_EMAIL> is the value listed in the identifiers JSON file

2.5 Agentless Disk Scanning (ADS) (Optional)

Module: ADS

Execute the steps in this section if you enabled Agentless Disk Scanning in the GCP onboarding wizard in Cortex.

2.5.1 Create the ADS Connector Role

Where:

  • <ADS_CONNECTOR_ROLE_ID> is your chosen role ID (e.g., CortexAdsConnector).

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

2.5.2 Grant the ADS Connector role to the Platform Service Account

Grant the ADS Connector role to the Platform Service Account and apply an IAM condition to restrict permissions to resources prefixed with cortex-scan-*:

Where:

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

  • <PLATFORM_SA_NAME> is the Platform Service Account name

  • <ADS_CONNECTOR_ROLE_ID> is your chosen role ID (e.g., CortexAdsConnector).

2.5.3 Create the ADS Outpost role

Where:

  • <ADS_OUTPOST_ROLE_ID> is your chosen role ID (e.g., CortexAdsOutpost)

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

2.5.4 Grant the ADS Outpost role to the Outpost Service Account

Grant the ADS Outpost role to the Outpost Service Account and apply an IAM condition to restrict permissions to resources prefixed with cortex-scan-*:

Where:

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

  • <OUTPOST_SERVICE_ACCOUNT_EMAIL> is the value listed in the identifiers JSON file

  • <ADS_OUTPOST_ROLE_ID> is your chosen role ID (e.g., CortexAdsOutpost)

2.6 Automation (Optional)

Module: AUTOMATION

Execute the steps in this section if you enabled Automation in the GCP onboarding wizard in Cortex.

2.6.1 Create the Automation role

Where:

  • <AUTOMATION_ROLE_ID> is your chosen name for the role (e.g. CortexAutomation)

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

2.6.2 Grant the Automation role to the Platform Service Account

Where:

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

  • <PLATFORM_SA_NAME> is the Platform Service Account name

  • <AUTOMATION_ROLE_ID> is your chosen name for the role (e.g. CortexAutomation)

2.7 DSPM: Platform Service Account (Optional)

Module: DSPM

Execute the steps in this section if you enabled Data Security Posture Management (DSPM) in the GCP onboarding wizard in Cortex.

2.7.1 Create the DSPM Connector role

Where:

  • <DSPM_CONNECTOR_ROLE_ID> is your chosen name for the role (e.g. CortexDspmConnector)

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

2.7.2 Grant the DSPM Connector role to the Platform Service Account

Where:

  • <PROJECT_ID> is the ID of the GCP project you are onboarding to Cortex

  • <PLATFORM_SA_NAME> is the Platform Service Account name

  • <DSPM_CONNECTOR_ROLE_ID> is your chosen name for the role (e.g. CortexDspmConnector)

Last updated

Was this helpful?