You deploy data tools fast, but they never seem to stay secure once the team numbers climb. Somewhere between service account sprawl and quick ad-hoc queries, the system turns into a quiet compliance nightmare. Running Redash on Cloud Run looks clean at first, until the question hits: how do you keep it both stateless and safe?
Cloud Run is Google Cloud’s managed container execution platform. It shines when you want dynamic scaling, short-lived builds, and tight IAM integration. Redash gives teams a shared space to visualize, schedule, and share SQL queries without repeating the same connection setup fifty times. When combined, Cloud Run and Redash build a fully serverless analytics point, but only if your identity model and data access rules travel correctly between them.
Here’s how the logic usually works. Cloud Run handles request authentication at the perimeter using Identity Tokens, mapped to a service or human account validated through your provider, often Okta or Google Identity. Redash then inherits those permissions via environment variables or injected secrets that reach its query runners. The result is isolation of credentials, consistent RBAC alignment, and audit trails that actually mean something when you read them six months later.
Connecting Cloud Run and Redash starts with keeping state out of the container. Store configurations in Secret Manager or Vault, never in environment files baked into the image. Use Cloud IAM roles to define who can invoke the Cloud Run service and narrow those down with OIDC-based federation from your identity provider. For query sources, assign per-database credentials managed through Redash’s own data source settings, rotated regularly using automation hooks or pub/sub triggers when new secrets roll out.
Common issues appear when service accounts used by Redash query runners inherit broader database permissions than intended. Counter this by creating dedicated IAM bindings per data source, then mapping them tightly to Redash user groups. Rotate tokens weekly, log query execution identities, and lock down egress in Cloud Run’s networking settings so analytics code cannot slip data off your domain.