Skip to main content
Question

Secure Web Proxy: identifying Cloud Run (Direct VPC egress) workloads with secure tags instead of service accounts

  • Nov 16, 2026 9:43 AM UTC
  • 0 replies
  • 5 views

Kacper_Zajkowski

Hi,

We're designing a Secure Web Proxy (SWP) rule model for a multi-business-unit (BU) organization. For VMs we identify the BU with an organization-level secure tag (purpose GCE_FIREWALL, organization=auto) and source.matchTag() in gateway security policy rules. This works well in our lab: same VPC, VPC peering, Private Service Connect, and across projects.

For Cloud Run with Direct VPC egress we hit a wall:

1. Binding a GCE_FIREWALL tag value to a Cloud Run service fails with:
   "FAILED_PRECONDITION: Only compute instances can be bound to tag values with purposed tag key parents."
2. A tag without purpose binds fine, but SWP doesn't match it. source.matchTag() returns no match and the request ends in default_denied, also after a new revision.
3. source.matchServiceAccount() works for the same Cloud Run services, over both PSC and VPC peering (clientServiceAccount is logged correctly).

Questions:
- Is there any supported way to identify Cloud Run (Direct VPC egress) traffic in SWP by a secure tag or another group-level attribute, rather than by individual service accounts?
- Is secure tag support for Cloud Run in SWP on the roadmap?
- If service accounts are the only option, what's the recommended pattern for grouping many Cloud Run services per BU, given the 2,048-character matcher limit per rule?
- The "Supported identities" table on the SWP policies overview page isn't clear for "Direct VPC for Cloud Run" (footnote 1 on service accounts, secure tags column). Could you confirm what is supported?

We also looked at authorization policies, but they need TLS inspection and still require GCE_FIREWALL tags, so they don't seem to change this for Cloud Run.

Thanks!