Skip to content

Google Cloud Service Accounts: Review Credential Ownership Before Deployment

Map each workload to its identity, permissions and credential owner before copying service-account keys into a deployment pipeline.

GuideDeveloper tools

By

Updated 2 min read
Google Cloud Credentials: cloud illustration with IndieTools branding

Before deploying on Google Cloud, identify which workload needs access, which resources it needs and who can revoke that access. A copied service-account key should not become an undocumented permanent dependency.

Google's service-account key guidance recommends using alternatives to user-managed keys where possible. If a key is necessary, its storage, permissions and replacement process need deliberate ownership.

Map workloads to responsibilities

Separate the web application, background workers, deployment pipeline and operator tools. These components may need different resources and should not automatically share one powerful identity.

For each workload, describe the operation it performs. “Reads completed exports from this storage location” is more reviewable than “needs cloud access.”

AI-Promoter describes a marketing automation platform and declares Google Cloud in the technology catalogue. That listing does not expose its identity architecture. Automation products nevertheless illustrate why content generation, storage and publication responsibilities should be distinguishable.

Prefer an identity mechanism over a copied file

Review the authentication methods available for the actual runtime and deployment environment. A managed or federated identity may avoid distributing a long-lived private key.

Do not choose a mechanism only because a local tutorial used a downloaded JSON file. Local development and production have different trust boundaries.

Record the selected mechanism and the reason for any exception. This helps the next maintainer avoid creating another credential when an existing supported identity path would work.

Limit access to the operation

Connect each granted permission to a named task and resource. Test that the workload can complete that task without broad administrative rights.

Also test a nearby operation it should not perform. A worker that reads generated content should not gain the ability to change unrelated infrastructure simply because a broad role made setup easier.

Use separate test resources for these checks. A permission review should not require destructive experiments against production data.

Track copies and consumers

If a key remains necessary, identify where it is stored and which processes load it. Check source archives, build artifacts, local download folders and deployment logs for unintended copies without printing the key itself.

Google's guidance specifically warns that removing an exposed key from a repository is insufficient. The credential must be invalidated through the identity system because other copies may already exist.

Keep the incident procedure beside the normal replacement procedure.

Rehearse replacement safely

Introduce a replacement credential or identity configuration in a controlled environment, confirm the intended workload uses it, and then remove the old access.

Observe background jobs as well as web requests. A rarely scheduled task can retain an obsolete dependency long after the main page appears healthy.

Record the successful operation and the credential reference, excluding secret values. Give the service owner enough information to repeat the process.

The companion Cloud Run file-lifecycle guide examines a separate deployment boundary: what survives when an instance stops. Together, identity and storage reviews make the runtime's responsibilities explicit.

Revisit the identity map whenever a new automation, storage location or publishing integration is introduced. Access should grow because a reviewed task requires it, not because a shared credential happens to permit it.

More guide articles