← Back to section · Digital Security
Machine Identity Authentication: When the 'User' Is Another Program
Service accounts, API keys, workload identities — machine-to-machine authentication has no password to type and no phone to tap. Its core tension is key sprawl and long-lived credentials, and the remedy is to make credentials short, automatic and provably sourced.
Authentication with no human in it
Every design in human authentication assumes a person on the other side: someone who can type a password, check a phone, present a face. Machine-to-machine authentication removes all of those assumptions: the caller is a process, a container, a scheduled job, and it must prove — unattended — “I am the workload that is authorised to run”. Machine identities also outnumber human ones by a wide margin: in a mid-sized system, services, jobs, pipelines and function instances add up to tens or hundreds of times the headcount, and they are born and die on a timescale of minutes. An identity system that manages machines the way it manages people’s accounts will inevitably lose control.
The historical form of the machine credential is the API key and the service account: a random string or a static key pair, placed in a configuration file or an environment variable and presented on each call. Its simplicity is real, and so are its problems: such credentials are usually long-lived, broadly privileged, and copied again and again through their lives — into code repositories, container images, tickets and chat logs. Every copy enlarges the exposure, and because there is no “person” who would notice a strange login, stolen static credentials commonly lie dormant for years. Leaked cloud access keys hold a perennial place in breach statistics for exactly this reason.
The root-of-trust question: why should we believe you are that instance?
Machine authentication answers a different question from human authentication. Human authentication asks what you know and what you hold; machine authentication really wants to ask whether you are the instance the scheduler just started, running the reviewed image. Degrading that question into “do you know a pre-agreed secret” is the congenital compromise of the API-key model: a secret can be stolen, copied and handed over, and has no binding whatsoever to which instance is running.
Modern workload identity systems replace the root of trust — from “knowing a secret” to “provable origin”. Cloud platforms show the pattern most clearly: at instance launch, the platform issues an identity document or a callable metadata credential, signed by the platform’s key and valid for minutes to hours, which the caller exchanges for an access token at the target service — the instance itself never has to custody any long-term secret. SPIFFE is the open-standard form of this idea: it defines an identity for each workload, of the form spiffe://trust-domain/…, and implementations such as SPIRE verify the workload’s runtime attributes at startup (which node, which namespace, which service account) and then issue a short-lived SVID — an X.509 certificate or a JWT. Workloads authenticate to each other with SVIDs over mutual TLS, with identity bound to key, automatically rotated and short-lived.
A typical migration: from static keys to federated identity
Turning the consensus into a path, the most typical scene is a CI/CD pipeline accessing cloud resources. The old way generated a pair of cloud access keys and stored them in the pipeline platform’s “secrets” configuration, unchanged for years. The problems are threefold: the key pair is long-lived, usually broadly privileged, and every pipeline run and every member with configuration rights forms part of its exposure. The new way is OIDC federation: when the pipeline runs, the platform issues a short-lived OIDC token for that specific run, stating claims such as repository, branch and workflow; the cloud side has pre-configured trust in that platform’s issuer together with conditions on the claims, and when the token arrives it verifies the signature, checks the claims, and exchanges it on the spot for a cloud credential valid for tens of minutes. No long-term secret exists anywhere in the chain: there is no key to steal, only a temporary pass worth a few dozen minutes even if taken, and bound to a specific repository and branch. This interoperability between GitHub Actions and the major clouds is now an out-of-the-box configuration item, and its adoption speed demonstrates something: the bottleneck in modernising machine identity was never missing technology, but the patience to inventory and migrate the legacy stock.
The same applies between services: replace the static API keys scattered across services, one by one, with runtime-injected short-lived certificates or tokens, usually starting with the most privileged few. Every step of the migration can run dual-track — issue the new credential first, observe the old key unused for a while, then delete it — so no maintenance window is needed, only a complete inventory of the existing stock. Which returns to inventory again: most organisations, the first time they seriously inventory machine credentials, find far more than expected, with a fair share whose owners have left or been decommissioned. An ownerless credential is a risk much nearer than quantum computing.
Engineering points: short, automatic, auditable
Whatever the system, the engineering consensus for machine identity is by now stable. First, credentials must be short-lived: compress validity from “forever” to hours, and a leak’s value collapses with it, along with the need for elaborate revocation machinery. Second, issuance must be fully automatic: credentials are injected by the platform into memory at runtime, never written to disk and never committed to a repository; CI/CD pipelines use OIDC federation to exchange directly for cloud credentials instead of storing cloud keys as static pipeline secrets — a migration every major cloud and code platform has been pushing in recent years. Third, least privilege per workload: one identity per service, never several services sharing one broadly-privileged key, so the blast radius of a single leaked credential stays controllable. Fourth, audit everything: every credential issuance and use must be logged, because when a machine identity is abused, the logs are the only trail there is.
The quantum view here is surprisingly calm: the mainstream credential forms for machine identity — signatures on short-lived JWTs, certificates for mTLS — do face the same signature-algorithm migration, but short lifetimes mean migration completes naturally within rotation cycles, with no stockpile of long-lived credentials as baggage. The enduring task remains the classical one: find the long-lived API keys scattered everywhere and eliminate them. Fix the sprawl first, then talk quantum — an ordering that holds with particular force for machine identity.
Tags: Machine IdentityAPI KeysSPIFFEWorkload Identity