This guide walks you through creating a GCP Cloud KMS key, creating a service account with the required permissions, allowing KnoxCall to impersonate that service account, and onboarding it as your tenant’s wrapping key.Documentation Index
Fetch the complete documentation index at: https://docs.knoxcall.com/llms.txt
Use this file to discover all available pages before exploring further.
How GCP authentication works
KnoxCall uses its own GCP credentials (configured on the KnoxCall control plane) to impersonate a service account you create in your GCP project. That service account is grantedroles/cloudkms.cryptoKeyEncrypterDecrypter on your key. You never give KnoxCall your service account’s key — only the right to impersonate it.
Prerequisites
- GCP project with billing enabled
- Permission to create KMS key rings, keys, service accounts, and IAM bindings
- KnoxCall Owner or Admin role
Step 1: Enable the Cloud KMS API and create a key
Step 2: Create a service account for KnoxCall
Create a dedicated service account in your project that KnoxCall will impersonate:knoxcall-kms-sa@YOUR_PROJECT.iam.gserviceaccount.com.
Step 3: Grant the service account KMS permissions
Grantroles/cloudkms.cryptoKeyEncrypterDecrypter on the specific key (not the project or key ring — follow least privilege):
Step 4: Allow KnoxCall to impersonate the service account
KnoxCall’s GCP principal needsroles/iam.serviceAccountTokenCreator on the service account you created. Find KnoxCall’s GCP principal email in your admin UI under Settings → Security → Tenant KMS and run:
<KNOXCALL_GCP_PRINCIPAL> with the email shown in the admin UI.
Step 5: Onboard via admin UI
- Go to Settings → Security → Tenant KMS
- Click Add provider → GCP Cloud KMS
- Fill in:
- Service account —
knoxcall-kms-sa@YOUR_PROJECT.iam.gserviceaccount.com - Key resource name — the full
projects/.../cryptoKeys/...path from Step 1 - Project ID —
YOUR_PROJECT(optional — inferred from the service account if omitted)
- Service account —
- Click Verify and save
Step 6: Onboard via API
provider is "gcp" (not "gcp_cloud_kms"). The kms_key_ref contains the full GCP resource path — the config only contains authentication references.
Step 7: Verify the configuration
config.sealed_since is null and the keys array contains one active version.
Session duration impact
BYOK tenants have a 5-minute session TTL (vs 1 hour for standard tenants). Self-hosted proxy agents renew sessions every 4 minutes. Ensure your infrastructure does not block frequent outbound HTTPS to
api.knoxcall.com.Revoking access
To lock KnoxCall out within one cache TTL (5 minutes):- Remove the
roles/cloudkms.cryptoKeyEncrypterDecrypterbinding from the service account, or - Remove the
roles/iam.serviceAccountTokenCreatorbinding that allows KnoxCall to impersonate the SA
sealed_since timestamp. No data is lost — you can unseal at any time by restoring the IAM grant.
Troubleshooting
PERMISSION_DENIED during verify:
- Confirm
knoxcall-kms-sahasroles/cloudkms.cryptoKeyEncrypterDecrypteron the key specifically (not just the key ring or project) - Confirm KnoxCall’s GCP principal has
roles/iam.serviceAccountTokenCreatoronknoxcall-kms-sa - Verify the service account email in
impersonate_service_accountis spelled correctly (case-sensitive)
Error creating impersonated credentials:
- The
roles/iam.serviceAccountTokenCreatorbinding is missing or applied at the wrong resource - Run:
gcloud iam service-accounts get-iam-policy knoxcall-kms-sa@YOUR_PROJECT.iam.gserviceaccount.comand verify KnoxCall’s principal appears
- Ensure the location in
kms_key_refexactly matches the location used when creating the key ring (globalis not the same asus-central1) - The full resource path is case-sensitive
- The service account’s impersonation grant expires or is revoked by a GCP policy
- Check IAM audit logs in Cloud Console for
GenerateAccessTokendenials
AWS KMS setup
Cross-account IAM role setup for AWS
Azure Key Vault setup
Managed Identity or Federated Credentials for Azure
Sealed state and unseal
What to do when KMS becomes unreachable
Tenant KMS API reference
Full endpoint reference