Class LockAuditEventCollector

java.lang.Object
io.jans.fido2.service.audit.LockAuditEventCollector

@ApplicationScoped @Named public class LockAuditEventCollector extends Object
Buffers passkey registration/authentication audit events and flushes them to the Lock Server in batches on a schedule, rather than one HTTP call per ceremony. Callers (AttestationService / AssertionService, added in the sub-issues that build on this one) only ever call collect(io.jans.fido2.model.audit.LockAuditEvent), which is non-blocking and never throws — a Lock Server outage or a misconfiguration must never be visible on the registration/authentication request path.

Mirrors AbandonedCeremonyTimer's timer/event/reentrancy-guard shape rather than ScheduledExecutorService, matching how the rest of jans-fido2 schedules recurring work.

  • Constructor Details

    • LockAuditEventCollector

      public LockAuditEventCollector()
  • Method Details

    • collect

      public void collect(LockAuditEvent event)
      Buffers event for the next flush. A no-op, not an error, when delivery is disabled — otherwise a deployment that never enabled this feature would grow the buffer unboundedly with events nothing will ever drain. Also a no-op, logged rather than thrown, once the buffer is at MAX_BUFFER_SIZE — dropping the newest event is preferable to unbounded growth, and this must never make the caller's registration/authentication request fail or block.
    • initTimer

      public void initTimer()
    • process

      @Asynchronous public void process(@Observes LockAuditFlushEvent lockAuditFlushEvent)