What Is Workload Identity and Why Should You Stop Using Static Cloud Keys?

A static cloud key stored on a server is a credential that works until someone remembers to rotate it. Workload identity replaces that with a credential that's issued fresh, per request, and expires by design.

Close-up of server cooling fans in a data center
Photo by Winston Chen on Unsplash

A static cloud credential — an access key downloaded once and placed in a configuration file, an environment variable, or a secrets manager — works exactly the same way for as long as it exists, whether it’s being used by the legitimate service it was created for or by whoever else eventually gets hold of it. Workload identity replaces this model with credentials that are issued automatically, scoped narrowly, and expire on their own, removing the long-lived static secret from the equation entirely.

The core idea

Workload identity lets a workload — a VM, a container, a Kubernetes pod, a CI/CD pipeline — prove its identity to a cloud provider using an identity mechanism native to the platform it’s already running on, rather than a separately issued static credential it has to store and protect. The cloud provider verifies that identity (often via a signed token from the underlying platform) and, if the trust relationship allows it, issues short-lived, temporary credentials scoped to what that specific workload is allowed to do. No static key is generated, stored, or needs rotating, because the credential is requested fresh each time it’s needed and expires shortly after.

This is the same underlying pattern as GitHub Actions OIDC for CI/CD, generalized to any workload: an ambient, platform-verified identity replacing a portable static secret.

Where this shows up across major platforms

AWS IAM roles for EC2 instances and ECS/EKS workloads let a compute resource assume a role automatically, without ever having an access key stored on the instance — the AWS SDK, when running on that instance, retrieves temporary credentials from the instance metadata service automatically, and those credentials rotate on their own throughout the instance’s lifetime.

Google Cloud’s Workload Identity Federation extends this further, allowing workloads running outside Google Cloud entirely (in another cloud, or in an on-premises environment, or in GitHub Actions) to authenticate using their own platform’s native identity, federated into GCP’s IAM without any GCP-specific static credential ever being generated for that external workload.

Azure Managed Identities provide the equivalent for Azure resources — a VM, a function, an App Service instance can have an identity automatically managed by Azure, with credentials retrieved and rotated transparently by the platform.

Why the static-key model is worse than it initially appears

A static key’s risk isn’t just “it might leak.” It’s that the key, once created, has no natural expiration and no built-in mechanism forcing anyone to verify it’s still needed or still appropriately scoped — it persists exactly as originally configured until someone actively intervenes. Combined with the fact that static keys are portable (they can be copied, embedded in code, committed to a repository, or exfiltrated and used from anywhere), a leaked static key gives an attacker exactly the same access the legitimate workload has, usable from anywhere, for as long as the key remains valid — which in practice is often indefinitely, since key rotation discipline tends to be inconsistent in most organizations.

Workload identity credentials, by contrast, are typically scoped to be usable only from the specific platform context that requested them, are short-lived by default, and require no manual rotation process to maintain that short lifespan — the security property comes from the architecture itself, not from an operational discipline that has to be maintained correctly over time.

Migrating from static keys to workload identity

Start with the highest-risk static credentials first — keys with broad permissions, keys used in externally reachable services, keys that have existed longest without rotation — rather than attempting a full simultaneous migration, which is often impractical across a large existing environment.

Confirm the workload’s actual runtime platform supports the corresponding identity mechanism before planning the migration — a workload running on a platform without native workload identity support (some older on-premises or hybrid setups) may need an intermediate solution, like a secrets manager with automated rotation, as a partial improvement rather than the full architectural change.

Update IAM policies to trust the workload identity mechanism specifically, scoped as narrowly as the static key’s replacement role should be — this is also a natural opportunity to right-size permissions that may have accumulated excess over the static key’s lifetime, rather than simply replicating the old key’s exact permission set under the new mechanism.

Decommission the static key only after confirming the workload identity path is fully functional, running both in parallel briefly if needed to avoid an availability gap, then removing the static credential entirely rather than leaving it as an unused, still-valid fallback.

A practical checklist

  • Identify workloads still using static cloud credentials, prioritized by permission scope and exposure
  • Confirm the platform-native workload identity mechanism available for each workload’s actual runtime environment
  • Configure IAM trust relationships scoped narrowly to the specific workload identity, not broadly
  • Migrate and verify functionality before decommissioning the static credential
  • Treat any remaining static credential, after this process, as requiring active justification for why workload identity wasn’t a viable replacement

The shift from static keys to workload identity isn’t primarily about convenience, even though it does remove manual rotation overhead. It’s about changing the credential’s fundamental risk profile — from a portable secret that persists until someone acts, to an ephemeral one that expires by default.

IAMCloud Security