Durability & recovery

Workload identity tokens and issuer rotation

Would let services authenticate to one another with short-lived signed tokens that are bound to an audience and rotate their signing key without a stop.

RoadmapEngine edition 5f8ea3af

What it does

The workload crate can mint and verify Ed25519 identity tokens and rotate the issuer key through an overlap and revoke sequence. The server does not use the token path. It uses the crate's certificate helpers for replication TLS and nothing else.

How it works

A token is signed with Ed25519 and compactly serialised as a header, a payload and a signature. It names an issuer, a key id, a workload id, an audience, an issue time, an expiry and a unique token id. The verifier fails closed. A token with any missing or empty attribute is refused, as is an algorithm other than EdDSA, a wrong issuer or audience, a replayed token id, an expired token, and a token whose lifetime exceeds the verifier's maximum. The default maximum is 15 minutes and the hard cap is 24 hours. A small configurable clock skew is tolerated on the issue time, capped at five minutes, and expiry gets no leeway. The replay guard is held per verifier process and refuses new tokens when it is full.

The issuer signing key is a rotatable secret whose acceptance authority is the real verifier. Rotation first trusts the new key alongside the old one. Revocation removes the old key from the verifier and succeeds once a token signed by the old key is refused for exactly that reason. A revoked key id can never be reinstated by a later rotation, and an adapter restored after a restart checks itself against the rotation ledger. Every phase is idempotent and resumes from a persisted phase.

The crate states that wiring these hops is a separate integration step. The verified claims carry the token's exact expiry for the authorisation layer to enforce.

Where you reach it

  • Librarykynetra_workload: IdentityProvider, Verifier, WorkloadClaims, IssuerSigningKey (engine library, not wired to the server)

Limits

  • Not reachable from the server or the command line. No internal route accepts or issues these tokens.
  • The replay guard is per process and in memory.
  • The server's use of this crate is limited to certificate checks for replication TLS; see that entry.

Evidence

  • TestsCovered in the engine repository by 7 identity tests, 8 rotation-integration tests, 2 expiry-propagation tests and 21 hardening tests (fail-closed verification, replay refusal, untrusted and revoked issuer keys, three successive rotations that never reinstate a key, resumption from every persisted phase)

Test coverage is listed as present in the engine repository at this edition. This page does not report test results.

KynetraDB is in private preview

This is not available in the preview. Request a preview to discuss the current scope.