TECHNOLOGY

SAML assertion replay protection must span authentication replicas

In this article
THE QUICK TAKE

Signature and expiry checks do not consume a bearer assertion; replicated login needs shared replay state retained throughout the actual acceptance window.

A valid assertion can arrive again

A replicated enterprise assistant uses browser single sign-on before opening a workspace. A captured or accidentally resubmitted login response reaches another authentication replica while the assertion remains valid. Signature verification succeeds again. If each replica remembers consumed assertions only in its own memory, the deployment can establish another session from the same bearer evidence. Adding replicas has changed the security boundary even though the identity provider and signing certificate have not changed.

Identify the binding-specific replay requirement

The OASIS SAML profiles specification requires the service provider using the HTTP POST binding to retain used bearer assertion IDs throughout their acceptance window. This is separate from checking the recipient, audience and signature. NotOnOrAfter constrains when evidence can be accepted; it does not make every presentation within that period a fresh authentication. Scope this requirement to the browser profile being implemented rather than borrowing assumptions from an unrelated token protocol.

Make consumption atomic across replicas

Treat the replay record as shared authentication state. An implementation design can namespace the validated assertion identifier by its trusted issuer and service-provider context, then atomically claim it before creating an authenticated session. A separate lookup followed by insertion permits concurrent requests to observe the same empty state. A local cache can accelerate negative decisions, but cannot independently authorize first consumption when another replica may already have consumed the assertion.

Preserve correlation and the acceptance window

For solicited login, validate InResponseTo against the request being completed. The profile separately permits unsolicited responses with different correlation rules; do not make up a request merely to satisfy the solicited path. The OWASP SAML guidance also calls for replay detection and treats unsolicited login as a separate concern. Keep replay records for the full interval in which the validator would accept the assertion, including configured clock-skew allowance. Expiring the record earlier recreates a reusable credential.

Exercise simultaneous delivery and failure

In a controlled identity-provider fixture, submit the same valid response concurrently through different replicas. Expect at most a single successful consumption, with the other attempt explicitly rejected. Repeat after a replica restart and while shared replay storage is unavailable. State the outage policy before testing; silently accepting when storage fails defeats the guarantee. Inspect session creation as well as HTTP status, since a redirect alone does not reveal whether authentication state was issued. These are proposed checks; no login traffic or identity configuration was changed here.

Keep replay protection narrower than authorization

OAuth login correlation explains a different browser authentication flow, while client-history trust addresses what an application may accept from a caller. Assertion consumption supplies neither workspace membership nor permission to execute an AI tool. Use a maintained SAML implementation for signature and profile processing, and document the shared-state contract around it. Avoid retaining complete assertions in diagnostic logs: the identifier and decision evidence should explain rejection without creating another repository of bearer credentials.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles