Repository navigation
@checodo/better-auth-audit-log@0.3.0
Minor Changes
-
4dbc521: Send audit events to more places with the new
destinationsoption: a SIEM, a log service, or a webhook, each with its own event filter,transform, and batching. Sending runs in the background and is best effort; a failing or slow destination never fails the request.auth.api.flushAuditDestinations()sends waiting batches before shutdown.The new
@checodo/better-auth-audit-log/destinationsentry point hashttpDestination(JSON or NDJSON, optional Standard Webhooks signature, never follows redirects) andconsoleDestination.A custom
storagenow only needswrite: withoutread,listEventsanswersREAD_NOT_SUPPORTED(501); withoutdeleteOlderThan,retentionis refused at startup anddeleteExpiredAuditEventsanswersDELETE_NOT_SUPPORTED(501). Existing storages keep working. -
46134cf: Export audit events and verify the hash chain over HTTP, for admins.
GET /audit-log/export(auth.api.exportAuditEvents): NDJSON or CSV, newest first, with the same filters aslistEvents. Up to 10,000 events per request; thex-next-cursorresponse header continues the export, unaffected by new events. CSV cells that a spreadsheet would run as a formula get a leading'.POST /audit-log/verify-chain(auth.api.verifyAuditChain): now also reachable over HTTP, at most 10,000 links per request. The newafterSequenceandlimitoptions check the chain in parts; the result's newnextSequencecontinues the check.- Both are admins only over HTTP (new error codes
YOU_ARE_NOT_ALLOWED_TO_EXPORT_EVENTS,YOU_ARE_NOT_ALLOWED_TO_VERIFY_THE_CHAIN,INVALID_CURSOR) and rate limited to 10 requests a minute. Calls from server code without headers need no session, as before.