1. Provision keys and service identity
Create two symmetric Cloud KMS CryptoKeys and one asymmetric decrypt CryptoKeyVersion using an RSA OAEP SHA-256 algorithm. Enter your values once. Every command on this page fills them in automatically. Assign a dedicated Cloud Run service account. At the narrowest practical key scope, grant:
The predefined
roles/cloudkms.cryptoKeyEncrypterDecrypter covers symmetric use. Grant public-key access only for the transfer key, or create a custom role with the exact permissions above. See Cloud KMS IAM guidance.
Bind the runtime identity on each exact key instead of granting a project-wide KMS role:
Labels make the three keys easy to inventory and audit. The exact per-key IAM bindings—not the
labels—enforce access. Do not grant the Cloud Run identity KMS Admin, project Editor, or permission
to change IAM policies.
Cloud Run makes the assigned service identity available through metadata; Keyring requests and refreshes its short-lived token.
2. Store the encryption configuration
Use the complete GCP KMS configuration, with each adapter configured for metadata auth:keyring-encryption-config. Do not set origin_policy for the standard bundled Composio policy.
3. Deploy the service
Choose a telemetry delivery path before deploying. A collector sidecar is recommended; use a direct OTLP endpoint only when a sidecar is not feasible. Use the official Docker Hub image. The container reads Cloud Run’s injectedPORT; set only
HOST=0.0.0.0:
Grant the Cloud Run service identity Secret Manager access to that secret. Google documents secret environment-variable injection.
4. Add the restricted HTTPS edge
Create a global external Application Load Balancer with a serverless NEG pointing to the Cloud Run service. Attach a Cloud Armor policy that:- allows the four Composio backend
/32addresses; - denies all other source addresses by default; and
- optionally rate-limits the allowed sources at a value agreed with Composio.
internal-and-cloud-load-balancing and the default run.app URL disabled. This prevents direct internet traffic from bypassing the load balancer and Cloud Armor. Follow Google’s serverless NEG load-balancer guide and Cloud Run ingress reference.