Skip to content

Auditing your DataRecs tenant

DataRecs keeps a signed audit trail for your tenant. It records what people, API keys and DataRecs itself did, with who, what, when and the outcome. This guide shows how you or your external auditor can read that trail, export a period of it, and check offline that the export is complete and unaltered. You need only your own DataRecs login or API key, the DataRecs CLI and the published signing-key fingerprints.

Each audit event says:

  • Who acted, as actor.type and actor.id:
    • USER: a person in your tenant;
    • API_KEY: one of your API keys;
    • SYSTEM: DataRecs itself, for example a scheduled run;
    • SUPPORT_OPERATOR: a member of DataRecs staff acting on your tenant. These events also carry the staff member’s email address, so you know who to contact.
  • What happened, as event_class and event_type, and the resource it touched.
  • When, as occurred_at, and the outcome (SUCCESS, DENIED or FAILED).

Events are only ever added. Every event is linked to the one before it by a hash chain and signed with your cell’s signing key, held in a hardware-backed key management service. Removing, reordering or editing an event breaks the chain or a signature, and verification reports it.

Terminal window
datarecs audit-events list --from 2026-11-01T00:00:00Z --to 2026-11-21T00:00:00Z
datarecs audit-events list --actor-type SUPPORT_OPERATOR
datarecs audit-events list --outcome DENIED
datarecs audit-events get <event-id>

Results are paged; pass --cursor from one response to get the next page.

  1. Pin the fingerprints and your tenant ID.

    • Take your cell’s signing-key fingerprints from the Audit signing keys page. That page is published separately from your cell, which is what lets you trust it.
    • Pin every version listed for your cell, not just the newest. An export that spans a key rotation has events signed by more than one version.
    • Your tenant ID is the 16-character ID shown by datarecs auth status. An external auditor should get it from you directly, not from the export.
  2. Fetch and check the key directory. This fails, and writes nothing, unless a key matches your pin and no entry has been tampered with:

    Terminal window
    datarecs audit-events keys fetch \
    --trust-anchor-fingerprint <fingerprint-v1> \
    --trust-anchor-fingerprint <fingerprint-v2> \
    --output audit-signing-keys.json
  3. Create an export, and download it with its signed manifest:

    Terminal window
    datarecs audit-events exports create --from 2026-11-01T00:00:00Z --to 2026-11-21T00:00:00Z
    datarecs audit-events exports download <export-id> --output export.ndjson.gz

    The download writes the export and, beside it, its signed manifest, export.ndjson.gz.manifest.json.

    exports create also takes --format csv or --format ocsf-ndjson, and filters such as --event-type, --actor-id and --outcome. Use the default ndjson for a full, verifiable trail.

  4. Verify offline:

    Terminal window
    datarecs audit-events exports verify export.ndjson.gz \
    --manifest export.ndjson.gz.manifest.json \
    --trusted-keys-directory audit-signing-keys.json \
    --trust-anchor-fingerprint <fingerprint-v1> \
    --trust-anchor-fingerprint <fingerprint-v2> \
    --tenant-id <your-tenant-id>

    The result is JSON. "ok": true means:

    • every event’s signature checks against a key you pinned;
    • the hash chain has no gaps or edits;
    • the file matches the signed manifest (its SHA-256 and row count);
    • every event carries the tenant ID you passed with --tenant-id. The tenant ID is part of what each signature covers, so it can’t be changed after signing.

    Anything else is "ok": false, with an issues list naming each problem, for example ARCHIVE_SHA256_MISMATCH for a modified file or TENANT_SCOPE_MISMATCH for another tenant’s export.

    Always pass --tenant-id. Without it, verification shows only that the export is internally consistent: every event names the same tenant. A genuine export from a different tenant on the same cell would also pass.

Your auditor can run step 4 on their own machine with no DataRecs login. The export, the manifest, the key directory, the fingerprints and your tenant ID are all they need.

Every cell DataRecs hosts signs audit events with an ECDSA P-256 key held in Google Cloud KMS (KMS-EC-P256-SHA256). If your tenant runs in a dedicated or self-hosted cell, ask us how that cell signs before relying on this section. The private key never leaves KMS, and the public keys are published on the Audit signing keys page. Because the signature is public-key based, you can verify it yourself with no DataRecs secret and no call to DataRecs. A signature you can verify this way also shows that DataRecs produced the event, which a shared-secret signature could not.

What verification does and doesn’t tell you

Section titled “What verification does and doesn’t tell you”
  • It detects changes to an export; it doesn’t prevent them. A changed event, an event removed from the middle of the chain, a reordered event, or any change to the file after it was exported makes verification fail.
  • It can’t prove nothing was lost before the export. If the stored trail were rolled back to an earlier state, or events were cut from its end, an export taken afterwards would still verify, because the events that remain are genuine. To catch that, keep your earlier exports. Every event in an earlier export must still appear, unchanged, in a later export that covers the same period.
  • Timestamps come from DataRecs’ servers. occurred_at is the time on the server that recorded the event, kept in sync with standard network time. It is not a timestamp from an independent time authority.
  • An export covers what is still in the exportable window. Events older than the window in How long events are kept can’t be exported.
  • Verify against a pinned tenant and published keys. Without --tenant-id, and without a fingerprint taken from the published page, a passing result shows only that the file is internally consistent.

Events can be exported for 60 days after they happen. A finished export can be downloaded for 30 days after you create it, so download it promptly. If you need a longer retention period, contact support.

Keep the files and the verifier output, and contact support. A key in your cell’s directory that doesn’t match a published fingerprint, a broken chain or a failed signature is something we will investigate as a security matter.