The Simplest Way to Make Cloud Run and Port Work Like They Should
Teams pair cloud run and port to build self-service portals for serverless apps. Port triggers deployment jobs and reads live service states from Google Cloud. This setup lets developers ship containers without learning complex cloud console views. Platform teams keep control over rules, budgets, and regions behind the scenes. Yet linking these two tools takes careful planning around keys and roles. Bad identity choices can leave your cloud projects open to broad mistakes. How cloud run and p
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair cloud run and port to build self-service portals for serverless apps. Port triggers deployment jobs and reads live service states from Google Cloud.
This setup lets developers ship containers without learning complex cloud console views. Platform teams keep control over rules, budgets, and regions behind the scenes. Yet linking these two tools takes careful planning around keys and roles. Bad identity choices can leave your cloud projects open to broad mistakes.
How cloud run and port share data and permissions
Port acts as a central catalog for all your software services and resources. Cloud Run runs your stateless containers on Google Cloud when web requests arrive. To work together, Port needs a way to read and update service states.
Most teams set up an event pipeline between Google Cloud and the portal. When a container deploys or scales, Google Cloud sends an event message out. A small worker or webhook catches that message and updates the catalog entry. Developers then see live URLs, revision names, and health statuses in one place.
For self-service actions, the flow moves in the other direction. A developer clicks a button in Port to spin up a new service. Port sends a payload to a runner, pipeline tool, or cloud webhook. That runner logs in to Google Cloud using a service account role. It then creates or updates the container service and reports the result back.
Common failure modes and how to scope roles
The biggest risk in this setup is using one giant service account key. Teams often give their portal runner project-wide admin rights to save setup time. If that static key leaks, an attacker can delete apps or read secrets. Long-lived keys sitting in pipeline variables create a silent risk for every team.
Shared service accounts also ruin your cloud audit logs during an incident. When ten developers click a deploy button, Google Cloud sees one robot identity. You must dig through two different log systems to find who changed what. Unlogged API calls or broad tokens make security reviews slow and painful.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, stop using static JSON keys for your portal runners. Use federated identity so your runner trades a short token for cloud rights. Scope each service account role to the exact action it needs to run. Create one role for reading service states and another role for deploying containers.
You should also lock down network paths between your runners and cloud APIs. Put your runners in a private network when they talk to internal services. Check every incoming webhook signature so fake requests cannot trigger cloud changes. Map every portal action to a real user email in your log messages.
Keeping day two operations clean and safe
Once your catalog and container services link up, focus on day two tasks. Developers will need to inspect logs, check variables, and test live endpoints. Do not hand out broad cloud console roles just for quick debugging sessions.
Instead, keep daily checks inside clear, scoped workflows that log every single action. Mask sensitive fields like emails, phone numbers, card numbers, and national IDs. When masking rewrites matched fields in results, teams can debug safely without leaks. Good boundaries let developers move fast while security teams sleep well at night.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
How should Port authenticate to Google Cloud for Cloud Run updates?
Use workload identity federation instead of downloadable service account keys. This lets your automation runner request short-lived tokens scoped to specific container tasks.
Can developers deploy to Cloud Run from Port without full cloud console roles?
Yes, Port can trigger a scoped CI runner when a user clicks deploy. The runner handles the cloud call while the user stays inside the portal.
How do we track which developer triggered a Cloud Run change from Port?
Pass the caller email from the portal payload into your runner job logs. You can also attach user labels to the cloud revision during deployment.
Related guides
In this post