You click deploy, everything looks fine, and then your Ubiquiti controller times out behind a VPN you forgot existed. Meanwhile, Cloud Run is happily stateless, scaling out faster than your network auth can catch up. That is the moment every DevOps engineer discovers why identity-aware access for mixed cloud and edge setups matters.
Cloud Run Ubiquiti integration solves a simple but brutal problem: keeping ephemeral services in Google Cloud connected securely to physical gear that expects predictable identity. Ubiquiti’s UniFi and UISP platforms handle edge networking and device management. Cloud Run handles your ephemeral API endpoints or automation logic. Together, they let you push intelligence from the cloud straight into switches, routers, or controllers you own, without mangling your security model.
Here’s the trick. Cloud Run runs workloads behind Google’s managed identity layer. Each instance can authenticate through OpenID Connect (OIDC) or a service account. Ubiquiti gear expects authenticated HTTPS requests, often over constrained local networks. You marry these worlds using token exchange or identity proxying, mapping your Cloud Run service identity to a known, minimal Ubiquiti API user. That creates a fixed trust boundary without punching generous firewall holes.
Set credentials as environment variables using Google Secret Manager, not inline configs. Rotate them automatically, or better yet, rely on short-lived OIDC tokens. If you use Okta, you can federate users who trigger deployments or telemetry updates so Cloud Run picks up their claims for audit trails. Every access stays traceable, even though the service itself is transient.
Featured snippet–ready answer:
To integrate Cloud Run with Ubiquiti, expose your Ubiquiti controller through a secure endpoint, authenticate Cloud Run using OIDC or a managed service account, and proxy API calls through a limited-scope identity that enforces per-request authorization.
A few best practices keep things sane: