Interface SamlReplayCache

All Known Implementing Classes:
InMemorySamlReplayCache

@ThreadSafe public interface SamlReplayCache
Atomic SAML assertion replay admission. A shared implementation must make one key visible to all nodes before reporting SamlReplayCache.MarkResult.MARKED; an uncertain write must report SamlReplayCache.MarkResult.INDETERMINATE. The key is a SHA-256, URL-safe encoding of length-prefixed SP, connection, IdP and assertion identifiers, not raw identity data. Live entries must not be evicted to make room. This interface never validates an assertion by itself.
Since:
1.0.0
  • Method Details

    • markIfAbsent

      Atomically admit a previously unseen key until its final possible acceptance time across supported request bindings and time policies. A backend must retain the key through the supplied absolute expiry without rounding that expiry down.
      Parameters:
      key - the Revetsec-generated replay key
      expiresAt - the final possible acceptance time across supported completion contexts
      remaining - positive time budget for this operation
      Returns:
      an explicit outcome; only MARKED permits identity release
      Since:
      1.0.0
    • markIfAbsent

      Atomically admit a replay key within a connection's capacity namespace. The key itself already binds the connection, SP and IdP identifiers. Implementations shared by mutually untrusted IdP connections should override this method and reserve capacity per connection. The default preserves source compatibility for existing stores but supplies no such capacity isolation.
      Parameters:
      connectionId - application-approved IdP connection namespace
      key - the Revetsec-generated replay key
      expiresAt - the final possible acceptance time
      remaining - positive time budget
      Returns:
      an explicit atomic outcome
      Since:
      1.0.0