Audit trail
The tamper-evident record of who did what, its check, its export and its outside copy
On this page(4 sections)
Reading the trail, checking that no entry was changed or removed since it was written, downloading a period of it, and whether the copy kept outside this sandbox is keeping up.
GET/auditThe audit trail
Who changed a setting, a member, a secret's gate or a policy, who signed in, and, when reads are recorded, who opened what. Newest first, filtered and paged. Reading it is itself recorded when reads are.
What you send
| Field | Type | Where |
|---|---|---|
fromOnly records written at or after… | number | query |
toOnly records written before this time,… | number | query |
actionOnly actions starting with this, such… | string | query |
actorOnly records whose actor's address, token… | string | query |
targetOnly records whose target contains this | string | query |
beforePaging cursor: only records written before… | number | query |
limitHow many records to return | integer | query |
What comes back
| Field | Type |
|---|---|
recordsThe records, newest first | object[] |
actor | object |
when kind is "member" | shape |
emailThe address they signed in with,… | string |
roleTheir tier at the moment they… | string |
when kind is "token" | shape |
idThe control token's id | string |
labelThe name its owner gave the… | string |
when kind is "agent" | shape |
conversationIdThe conversation whose agent did it | string |
when kind is "system" | shape |
reasonWhat part of the sandbox acted,… | string |
actionWhat happened, as a dotted name:… | string |
targetWhat it happened to: a member's… | string |
outcomeHow it ended | "ok" | "refused" | "failed" |
detailsA few facts that make the… | object |
vThe record format | 1 |
idThe record's own id | string |
atWhen it was written, in milliseconds… | number |
prevHashThe hash of the record before… | string |
hashSHA-256, in hex, over this record's… | string |
nextThe cursor for the next, older… | number |
curl "$SANDBOX/audit" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.audit.list();GET/audit/verifyCheck the audit trail for tampering
Recomputes every record's hash and its link to the one before it. Names the first record that was changed, removed or inserted after it was written. It shows tampering; it cannot undo it, which is what the copy sent to a forward address is for.
What you send
Nothing. Call it as it is.
What comes back
| Field | Type |
|---|---|
okWhether every record kept is intact… | boolean |
checkedHow many records were checked | number |
segmentsHow many monthly files were checked | number |
prunedThroughWhere the kept chain starts: the… | object |
at | number |
hash | string |
brokenThe first record that does not… | object |
segmentThe monthly file it is in | string |
lineIts line number in that file,… | number |
idThe record's id, when the line… | string |
atWhen the record says it was… | number |
reasonunreadable: the line is not a… | "unreadable" | "hash-mismatch" | "chain-break" |
tornWhether the newest file ends in… | boolean |
curl "$SANDBOX/audit/verify" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.audit.verify();GET/audit/exportDownload the audit trail for a period
The records written in a period as JSON Lines, exactly as stored, so whoever receives them can check the hashes themselves.
What you send
| Field | Type | Where |
|---|---|---|
fromrequiredThe first moment to include, in… | number | query |
torequiredThe moment to stop before, in… | number | query |
What comes back
| Field | Type |
|---|---|
filenameA file name to save it… | string |
jsonlThe records, one JSON object per… | string |
countHow many records it holds | number |
curl "$SANDBOX/audit/export?from=1&to=1" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.audit.export({
"from": "1",
"to": "1"
});GET/audit/statusWhether the audit trail's outside copy keeps up
Which monthly files are kept, the oldest record, and whether records are reaching the forward address.
What you send
Nothing. Call it as it is.
What comes back
| Field | Type |
|---|---|
forwardingAbsent while no forward address is… | object |
urlWhere records are sent | string |
pendingHow many records are waiting to… | number |
lastSentAtWhen the last record reached it | number |
lastErrorWhy the last attempt failed, when… | string |
nextAttemptAtWhen the next attempt is due,… | number |
oldestAtWhen the oldest record kept was… | number |
segmentsThe monthly files kept, oldest first | string[] |
curl "$SANDBOX/audit/status" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.audit.status();