Replay Protection and Idempotent Acceptance

Prevent an already authenticated request from applying the same state change twice, including concurrent retries.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. A valid message can be old
  2. Couple the duplicate check to the effect

A valid message can be old

Authentication can establish contents and origin even for a previously accepted record. An operation such as approving a workflow transition needs separate evidence of freshness or a stable identity with an acceptance record. A request token can be scoped to the authenticated principal and operation, with a defined lifetime. The system must know whether a repetition should fail or return the previous result.

Couple the duplicate check to the effect

If a service checks a token and commits the effect in separate uncoordinated actions, two simultaneous requests can both see an unused token. A storage transaction can claim the token and apply the effect under one uniqueness rule, or a downstream service can enforce the same idempotent identity. Idempotency keys explain repeated application semantics. Message authentication describes the distinct guarantee about the bytes being accepted.[1][2]

References

  1. Jerome H. Saltzer and Michael D. Schroeder, The Protection of Information in Computer Systems ↩
  2. IETF, RFC 5116: An Interface and Algorithms for Authenticated Encryption ↩