Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs(gcp): enhance service account impersonation instructions and add troubleshooting guidance

Victor Hugo dos Santosdfb0c0a8daac
diff --git a/docs/integrations/app-connections/gcp.mdx b/docs/integrations/app-connections/gcp.mdx
index 45aba6d487..04739f47cd 100644
--- a/docs/integrations/app-connections/gcp.mdx
+++ b/docs/integrations/app-connections/gcp.mdx
@@ -92,16 +92,38 @@ Infisical supports [service account impersonation](https://cloud.google.com/iam/
</Step>
<Step title="Enable Service Account Impersonation">
To enable service account impersonation, you'll need to grant the **Service Account Token Creator** role to the Infisical instance's service account. This configuration allows Infisical to securely impersonate the new service account.
- - Navigate to the IAM & Admin > Service Accounts section in your Google Cloud Console
- - Select the newly created service account
- - Click on the "PERMISSIONS" tab
- - Click "Grant Access" to add a new principal
- If you're using Infisical Cloud US, use the following service account: [email protected]
-
- If you're using Infisical Cloud EU, use the following service account: [email protected]
+ 1. Navigate to the **IAM & Admin > Service Accounts** section in your Google Cloud Console.
+ 2. Select the newly created service account.
+ 3. Click on the **PERMISSIONS** tab.
+ 4. Click **Grant Access** to add a new principal.
+ 5. In the **New principals** field, enter the Infisical service account email for your environment:
+ - **Infisical Cloud US:** `[email protected]`
+ - **Infisical Cloud EU:** `[email protected]`
+ - **Self-hosted:** use the service account you created for your instance (the one whose credentials are set in `INF_APP_CONNECTION_GCP_SERVICE_ACCOUNT_CREDENTIAL`).
+ 6. In the **Role** field, select **Service Account Token Creator**.
+ 7. Click **Save**.
![Service Account Page](/images/app-connections/gcp/service-account-grant-access.png)
+
+ <Note>
+ **Troubleshooting: "One or more users named in the policy do not belong to a permitted customer."**
+
+ If granting access fails with the error *"One or more users named in the policy do not belong to a permitted customer."*, your Google Cloud organization has the Domain Restricted Sharing organization policy (`iam.allowedPolicyMemberDomains`) enabled. This policy only permits identities that belong to allowlisted Google organizations, so the Infisical service account is rejected until it is explicitly allowed.
+
+ To resolve this, add Infisical's Google Cloud Customer ID to the policy's allowed values **before** granting the service account a role:
+
+ 1. In the Google Cloud Console, navigate to **IAM & Admin > Organization Policies**.
+ 2. Search for and open the **Domain restricted sharing** (`iam.allowedPolicyMemberDomains`) policy.
+ 3. Add a custom value containing Infisical's Google Cloud Customer ID, using the `is:` prefix:
+
+ ```
+ is:C03rsjmyl
+ ```
+
+ This is **Infisical's Google Cloud Customer ID**, not your own. Infisical uses a single Google Cloud organization, so this one Customer ID covers both the US and EU service accounts.
+ 4. Save the policy, then retry adding the Infisical service account as a principal (Step 4 above).
+ </Note>
</Step>
</Steps>