feat: add gcp-cloud-run-invoke compute provider with OIDC#49
feat: add gcp-cloud-run-invoke compute provider with OIDC#49brucearctor wants to merge 1 commit into
Conversation
Adds a new compute provider that uses LaunchStrategyInvoke to trigger Cloud Run services via HTTP POST with OIDC identity tokens. Supports two authentication modes: - Workload Identity (default): uses idtoken.NewTokenSource for environments with attached service accounts (GKE, Compute Engine, Cloud Run) - SA Impersonation: uses impersonate.IDTokenSource with the intermediary delegate chain for cross-project or Temporal Cloud scenarios The existing gcp-cloud-run provider uses LaunchStrategyWorkerSet to scale WorkerPools. This new provider complements it by enabling per-task invocation, analogous to how aws-lambda works.
|
Still a work in progress ... but again, sketch. OIDC and workload identity desired [ rather than SA key ]. BUT, how to acknowledge source? If Cloud 'on' GCP --> https://docs.cloud.google.com/iam/docs/workload-identity-federation something like that. I am happy to configure workload identity on my side, or also things like https://docs.cloud.google.com/iam/docs/workload-identity-federation-with-kubernetes I can dig in more. Assuming collaboration desired. Or, at least early tester. |
|
@02strich ! :-p We just spoke on the street leaving/going to replay as well. I do not expect this to be used -- I opened a PR to start another method for communicating. Even better to meet in person, and setup email/etc. I'll happily close this, and take things to email, any helpful design docs, and getting wider collab going. |
Summary
Adds a new
gcp-cloud-run-invokecompute provider that usesLaunchStrategyInvoketo trigger Cloud Run services via HTTP POST with OIDC identity tokens. This is the GCP analog to the existingaws-lambdaprovider.Authentication
Supports two authentication modes:
service_accountis configured, usesidtoken.NewTokenSourcewhich transparently leverages the host's default credentials (GKE Workload Identity, attached SA on Compute Engine/Cloud Run).service_accountis configured, usesimpersonate.IDTokenSourcewith the intermediary delegate chain for cross-project or Temporal Cloud scenarios.Both paths produce OIDC identity tokens with the Cloud Run service URL as the audience, which is what Cloud Run's IAM invoker check requires.
Relationship to existing
gcp-cloud-runproviderThe existing
gcp-cloud-runprovider usesLaunchStrategyWorkerSetto manage Cloud Run WorkerPool instance counts. This new provider complements it by enabling per-task invocation semantics, similar to howaws-lambdaworks.Config