1. [Home](https://quorumauth.com/) /
2. [Solutions](https://quorumauth.com/solutions/) /
3. Machine to machine authentication

Solutions · QuorumAuth

# Machine to machine authentication

> Authenticate services, jobs and scripts with scoped, revocable, short-lived tokens instead of long-lived API keys that leak and never get rotated.

Most of the traffic hitting your APIs is not people. Give every service, job and script a credential you can scope, rotate and revoke in one step, without a redeploy.

Updated December 1, 2026

An API key is like a house key you copy for every helper and never get back. A better way: each helper has a named badge, and at the door they swap it for a ticket that only works for a short time and only for certain rooms. If a badge goes missing, you cancel it, and the doors stop accepting it.

On this page

1. The problem: API keys outlive everyone’s memory of them
2. The approach
3. How it works
4. What QuorumAuth ships for it
5. What changes for your team
6. Where to go next

From a named caller to a short-lived token

1. Named service account or workload → API key or workload identity issued
2. API key or workload identity → Short-lived scoped token exchanged
3. Short-lived scoped token → API verifies it locally presented Revocations stream in live

A flow of four boxes. A caller is registered as a named service account or workload in one organization. It holds an API key, shown once, or gets a workload identity from its runtime. That credential is exchanged for a short-lived, scoped token. Receiving APIs verify the token locally. Rotation and revocation reach every SDK through a live stream.

Your APIs only ever see the short-lived token, never the long-term credential.

## The problem: API keys outlive everyone’s memory of them

Service credentials are created in a hurry and kept forever. An API key is pasted into a CI variable, a cron job and a partner’s config, and three years later nobody knows which of those still uses it. It has full access because scoping it was extra work. It has never been rotated because rotation means finding every copy first.

That is the real cost of [non-human identity](https://quorumauth.com/learn/what-is-non-human-identity/): not the key itself, but the inability to answer “what can this credential do, who holds it, and can I revoke it right now?” When a key leaks, the answer is often “we will rotate it this weekend and see what breaks.”

## The approach

Treat every machine caller as a named principal with its own lifecycle:

- **Named and owned.** Each caller is a service account or an attested workload inside one organization, not an anonymous string.
- **Exchanged, not presented.** The long-term credential is exchanged for a short-lived, scoped token. APIs only ever see the token.
- **Revocable in one step.** Revoking, rotating or removing a role takes effect on live sessions, not just on the next sign-in.

Where the platform can attest the caller, skip the long-term secret entirely and use [workload identity](https://quorumauth.com/learn/what-is-workload-identity/).

## How it works

1. **Register the caller.** Create a service account in your organization, or register a workload’s SPIFFE ID with the capabilities it declares.
2. **Issue a credential.** Generate an API key, whose secret is shown exactly once, or let the workload register its public key. A workload gets its identity from its runtime and needs no stored secret.
3. **Exchange for a token.** The service account exchanges its key, or the workload its SVID over mutual TLS, for a scoped access token. The SDK refreshes the token before it expires.
4. **Verify locally.** Receiving services verify tokens in process. Signing keys are fetched on first use and cached per organization.
5. **Rotate or revoke.** Rotation revokes the prior credential. Revocations reach every SDK through a live stream.

A service account calling an API

1. 1 Service account → QuorumAuth Exchange API key
2. 2 QuorumAuth → Service account Scoped access token
3. 3 Service account → Service account Refresh before it expires The SDK does it
4. 4 Service account → Receiving API Call with the token
5. 5 Receiving API → Receiving API Verify locally Signing keys cached per organization
6. 6 QuorumAuth → Receiving API Stream revocations Rotation revokes the prior credential

A sequence between a service account, QuorumAuth and a receiving API. The service account exchanges its API key for a scoped access token, and QuorumAuth returns it. The SDK refreshes the token before it expires. The service calls the API with the token. The API verifies it locally, with signing keys fetched on first use and cached per organization. QuorumAuth streams revocations to every SDK, and rotation revokes the prior credential.

The key is exchanged once; the API checks tokens without calling home.

## What QuorumAuth ships for it

- **Service accounts.** Create, list, revoke. Listings never expose secrets and carry the creation date. Calls across organizations are refused.
- **Key lifecycle.** API keys returned once; rotation revokes the prior key and names it; a registered public key is the account’s one live key, and replacing it names the key it replaced.
- **Session-aware revocation.** Rotating a key, revoking the account or unbinding its role ends the sessions it already signed in to. A service account cannot be given a person’s role.
- **Workload token exchange.** SVID-to-token exchange over mutual TLS (mTLS) with background refresh inside the issuer’s TTL. Past its grace period, a stale token fails closed and no access token is presented.
- **Declared capabilities become scopes.** A workload gets the scopes for the capabilities it declared, and an undeclared capability confers nothing. Consuming secrets grants read and unwrap, never write.
- **Three token formats.** JWT, Biscuit and Macaroon. Local verification rejects tampered and revoked tokens, and a forged token is refused without fetching extra keys.

## What changes for your team

**Before:** a spreadsheet of API keys, broad access because scoping was extra work, and rotation postponed because nobody knows what will break.

**After:** every machine caller is a named principal in one organization. Its long-term credential never reaches your APIs; only short-lived, scoped tokens do. Rotating a key revokes the old one and names it, and revoking an account ends the sessions it already opened, not just the next one.

For a CTO, that turns “can we revoke this credential now?” from a risk assessment into a routine action. Fintech teams answering to auditors get the same property as [revocable service credentials they can show an auditor](https://quorumauth.com/industries/fintech-authentication-and-key-management/). For platform teams, Kubernetes workloads need no stored secret at all, and everything else follows one service-account lifecycle; see [what platform teams stop operating](https://quorumauth.com/platform/). For application teams, token refresh and verification live in the SDK: services verify tokens locally, without a call per request, and the SDK fails closed when it cannot establish whether a token is still valid.

QuorumAuth authenticates your services. Third-party credentials you hold for other vendors’ APIs are secrets management, so it does not store or rotate them. Machine credentials you have already scattered are replaced by registered service accounts, one caller at a time, rather than discovered for you. Your API gateway and rate limiting stay in place.

## Where to go next

Inventory your machine callers, then move the ones in Kubernetes to [workload identity](https://quorumauth.com/solutions/workload-identity-for-kubernetes/) and the rest to service accounts, or straight to [service accounts without a stored API key](https://quorumauth.com/guides/service-account-without-api-key/) where the caller has an OpenID Connect issuer. To plan revocation, read [how to revoke a JWT before it expires](https://quorumauth.com/guides/revoke-jwt-before-expiry/). When a service acts on behalf of a person, read [AI agent authorization](https://quorumauth.com/solutions/ai-agent-authorization/) for how delegation keeps that chain auditable. Background: [machine-to-machine authentication](https://quorumauth.com/learn/what-is-machine-to-machine-authentication/) and [JWKS](https://quorumauth.com/learn/what-is-a-jwks/). Already on a vendor? Compare [Auth0 client credentials with attested service identity](https://quorumauth.com/compare/auth0-alternative/), or [Okta service apps with attested workloads](https://quorumauth.com/compare/okta-alternative-for-workload-identity/).

## Frequently asked questions

What is machine to machine authentication?

The way one piece of software proves its identity to another with no person involved, such as a backend calling an API, a scheduled job, or a deployment script.

Should I use API keys or workload identity?

Use workload identity wherever the platform can attest the caller, as in Kubernetes, because nothing long-lived is stored. Callers outside it, such as a hosted CI runner or a partner's server, use federation with a token their own OpenID Connect issuer mints, or a key-bound assertion whose key they rotate. Keep a service-account API key only for callers that have neither, and plan to move them.

How fast does a revocation take effect?

Revocations stream to every SDK, and revoking or rotating a service account ends the sessions it had already signed in to. A revoked token is refused even by an SDK that cannot reach the authority.

Which token formats are supported?

JWT, Biscuit and Macaroon. JWT and Biscuit tokens verify locally in the SDK; Macaroons verify through the authority.

## Related reading

[Learn QuorumAuth What is machine-to-machine authentication?Machine-to-machine authentication lets services prove who they are to each other. Compare API keys, client credentials, JWT assertions and mutual TLS (mTLS).Read](https://quorumauth.com/learn/what-is-machine-to-machine-authentication/) [Learn QuorumAuth What is a non-human identity?A non-human identity (NHI) is an identity software uses to act without a person: service accounts, workloads, API keys, bots. Examples, risks and controls.Read](https://quorumauth.com/learn/what-is-non-human-identity/) [Learn QuorumAuth What is workload identity?Workload identity lets software prove who it is from where and how it runs, so services stop sharing static API keys and passwords.Read](https://quorumauth.com/learn/what-is-workload-identity/) [Solutions QuorumAuth Zero trust service authentication Give every service a short-lived, attested identity and mutual TLS, so a stolen credential or a reachable network address no longer grants access.Read](https://quorumauth.com/solutions/zero-trust-service-authentication/) [Solutions QuorumAuth Workload identity for Kubernetes Turn Kubernetes service accounts into attested, auto-rotating workload identities, so pods call your services with no stored credential.Read](https://quorumauth.com/solutions/workload-identity-for-kubernetes/)

## Worked examples

- [Use cases QuorumAuth What API key rotation costs across 200 service secrets, and what QuorumAuth managed SPIFFE gives back See what rotating long-lived API keys costs an engineering team each year, and how QuorumAuth managed SPIFFE removes stored service secrets.Worked use case: an illustrative business, built from the sources and formulas shown. Not a customer story.Read](https://quorumauth.com/use-cases/static-api-key-replacement/)
- [Use cases QuorumAuth Token introspection latency: keep revocation, drop the verifier call See what a token check on every request costs in latency and verifier fleet, and how QuorumAuth verifies tokens inside your service instead.Worked use case: an illustrative business, built from the sources and formulas shown. Not a customer story.Read](https://quorumauth.com/use-cases/token-introspection-latency/)

## Talk to sales about QuorumAuth.

QuorumAuth is sold through our sales team. The Build page shows the drop-in sign-in on your origin and how to reach sales about your stack.

[Go to Build and contact sales →](https://quorumauth.com/onboarding/)
