Join our Newsletter — 33% off our NHI Course
Home› FAQ› Governance, Ownership & Risk› Should teams use workload identity federation or direct…
Governance, Ownership & Risk

Should teams use workload identity federation or direct service account keys for GCP access?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 10, 2026 Domain: Governance, Ownership & Risk

Use federation when the workload can present a trustworthy subject and the cloud can exchange that subject for scoped access at runtime. Use downloaded keys only as a compatibility fallback, because keys expand blast radius, weaken provenance, and turn identity governance into secret distribution management.

Why federated workload access is the better default for GCP

For GCP access, workload identity federation should be the first choice when the workload can prove itself through a trusted external subject and exchange that proof for short-lived cloud access at runtime. That keeps credentials ephemeral, narrows blast radius, and preserves a cleaner separation between workload identity and secret handling.

FederaCloud Workload Identity Guide tion also fits the broader pattern of secretless access used across modern cloud platforms, where the goal is to bind access to workload attestation or federation rather than to a copied credential. In practice, that means the cloud trusts the presented subject, not a long-lived artifact that must be stored, rotated, and protected everywhere the workload runs.

The operational advantage is not just convenience. Federation reduces the number of places an access secret can leak, makes rotation largely a provider-side concern, and gives teams a more auditable access path. It is also easier to align with least-privilege design because the trust boundary is explicit and the resulting token can be scoped tightly to the workload’s actual runtime needs.

When direct service account keys still appear, and why they are the exception

Downloaded service account keys are a compatibility fallback, not a preferred operating model. They can be necessary when a legacy system cannot participate in federation, but they shift the problem from runtime trust to secret lifecycle management, which is harder to govern at scale and easier to misuse across environments.

Ultimate Guide to NHIs The underlying issue is that a key is a reusable bearer secret, so anyone who obtains it can often impersonate the service account until the key is revoked. That makes keys especially risky in CI/CD, developer laptops, shared automation, and third-party integrations where distribution grows faster than visibility.

Where keys are unavoidable, teams should treat them as an exception with a defined owner, expiry, and replacement plan. The decision is less about whether a key works and more about whether the workload’s trust model can tolerate the blast radius if that key is copied, logged, backed up, or left behind in an image or repository.

What good GCP access governance looks like in practice

Good practice is to prefer federation for new workloads, then inventory and progressively retire direct keys where legacy constraints remain. A useful rule is: if the workload can present a trustworthy subject at runtime, do not add a static secret just to make the integration feel simpler.

For cloud-native and CI/CD scenarios, that often means designing around CI/CD Pipeline Identity Security Guide patterns such as short-lived token exchange, tightly scoped publishing access, and explicit trust policies. For platform teams, the practical measure of success is whether access can be issued, constrained, and withdrawn without hunting through dozens of copied keys.

When you do keep a key, track it like a high-risk credential: know who owns it, where it is used, when it was last rotated, and what system will fail if it is revoked. The strongest programs do not simply “allow keys for exceptions”, they prove that every exception is temporary, bounded, and observable.

Risk and Threat Considerations

Static service account keys increase exposure because they are portable, reusable, and difficult to bound once distributed. The main failure mode is not only theft, it is drift: keys get embedded in scripts, images, secrets stores, and backups until the original owner no longer knows where they exist.

Failure mechanism: A copied key becomes a standing credential that can be replayed from anywhere, so compromise of one system, developer workstation, or pipeline can become broad cloud access until the key is rotated or disabled.

Impact: Attackers can gain persistent access, move laterally into other cloud resources, and abuse the service account’s permissions for data access, resource creation, or further credential harvesting.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5 sets the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-9 — Service Identification and AuthenticationGCP workload federation and keys both concern service-to-service authentication.
IA-5 — Authenticator ManagementService account keys are authenticators that need issuance, rotation, and revocation control.
AC-6 — Least PrivilegeFederation enables narrower scoped access than broad reusable keys.
Recommendation — Use IA-9 to prefer short-lived federated credentials over reusable service account keys. Apply IA-5 to govern key lifecycle, rotation, and revocation for any unavoidable service account keys. Apply AC-6 to scope each workload's access to the minimum permissions it needs.
ISO/IEC 27001:2022A.5.17 — Authentication informationService account keys are authentication information that requires controlled handling and rotation.
A.8.5 — Secure authenticationThe question is about choosing a stronger authentication model for cloud workloads.
Recommendation — Protect and rotate authentication information with controlled issuance and revocation. Prefer secure, short-lived authentication methods over exported long-lived keys.

Practitioner Guidance

What to prioritise: Use federation first for any workload that can present a verifiable external subject, then reserve direct keys only for documented legacy exceptions. If a key exists, treat its presence as a control gap to be justified, not a neutral implementation choice.

What to verify: Confirm that the federated path actually issues short-lived credentials, that the trust policy is narrowly scoped, and that there is a clear owner and decommission date for any remaining key. If the workload still depends on a key, verify where it is stored, how it is rotated, and whether it appears in build logs or images.

Practitioner takeaway: The right comparison is not federation versus keys as two equivalent options, it is runtime trust with bounded exposure versus static secret distribution with larger blast radius.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 10, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org