Preview. Audit streaming is available to organisations in the audit streaming pilot.
What Wordsmith sends
Each request is aPOST of one batch, with up to 500 events and 1 MB. The body depends on the destination’s format:
- JSON: a JSON array of events (
Content-Type: application/json). Each event has the fields described in List Audit Events. - CEF: one CEF line per event, separated by newlines (
Content-Type: text/plain; charset=utf-8). The event ID is in theexternalIdextension.
v1 is the hex HMAC-SHA256 of {t}.{body}, keyed with the signing secret Wordsmith showed you when you created the destination. Compute it over the raw request body, before any JSON parsing.
Delivery is at least once. Wordsmith retries a batch until your endpoint accepts it, so the same events can arrive more than once. Deduplicate by event ID.
How Wordsmith reads your response
Wordsmith waits up to 30 seconds for a response. Store the batch, answer, and process it afterwards.
Example receiver
This Python receiver uses only the standard library. It verifies the signature with a 5-minute tolerance and a constant-time comparison, accepts either signing secret during a rotation, and skips batches and events it has already stored.audit_stream.verification and made-up IDs, signed the same way. The receiver above accepts it like any other event; filter it out downstream if you prefer.
Rotate the signing secret
- In Settings > Audit log > Streaming, open the destination and select Rotate secret. Copy the new secret; Wordsmith shows it once.
- Set
WORDSMITH_SIGNING_SECRETSto the new secret, then the old one, separated by a comma. - For 24 hours Wordsmith signs every batch with both secrets. Remove the old secret within that time.
Related pages
- List Audit Events: the event fields, and polling instead of push.
- Microsoft Sentinel, Splunk and Amazon S3 and Security Lake: the packaged integrations.