Audit Log Service · View 10 of 40 · 3 · Structure
Decisions
- There is no redaction path. Validation and detection may accept or reject, nothing else: a record that had to be edited to be storable was never a faithful account of the action.
- tenant_id is assigned from the authenticated producer identity and is never read from the payload. A producer that claims another tenant is rejected, not trusted.
- The secret detector runs before commit, not after. A record that cannot be deleted must not contain something that must be rotated.
Latency budget
- Token validation with cached JWKS ≈ 0.3 ms; schema validation ≈ 0.4 ms; secret scan over 1.2 KB with a compiled rule set ≈ 0.2 ms; dedup round trip ≈ 1 ms.
- The remainder of the 25 ms p50 is the Kafka acks=all round trip across three zones. That is where the budget actually goes.
- In-estate producers reach a private endpoint directly; only off-estate traffic pays for Front Door.
Risks
- A rejection is a refused audit record, which is itself information. It goes to a quarantine topic and is sealed under the same retention lock — but a producer whose events are all being rejected has a silent gap until someone reads the rejection metrics.
- The dedup window is Valkey, and Valkey is ephemeral. Losing it produces duplicate records within a 24 h window: visible, reconcilable by idempotency key, and deliberately preferred over putting a durable store on the hot path.