Operations

Audit runbook

Use this guide to inspect events, verify audit integrity and investigate delivery or attribution problems. Listing rows is an investigation view. Verify the chain and its configured external anchors to check integrity. Do not edit or delete audit rows while any procedure below is running.

0.11.x

Use this guide to inspect events, verify audit integrity and investigate delivery or attribution problems. Listing rows is an investigation view. Verify the chain and its configured external anchors to check integrity. Do not edit or delete audit rows while any procedure below is running.

Enable local process observation to add program, network and supported file-operation facts to session audit. Capture, local durability and central acknowledgement have separate states.

Audit

Preserve the store backup, external audit keys, and off-cluster export before any repair or restore.

gdsgate --config <authority-config> authority audit list --class admin-action --limit 20 for rows; gdsgate --config <authority-config> authority audit verify for integrity.

Listing exits 0 and prints rows newest first. Verification exits 0 only when the chain and configured anchors verify; any integrity or store error is non-zero.

Stop destructive maintenance on a broken chain, anchor mismatch, corrupt anchor row, missing key, or unexplained gap. Preserve the original store and exports. Move to the off-band verification workstation, compare the last trusted export and checkpoint, and follow the chain-integrity procedure.

Authority appends defined security events to its hash-chained audit log, including issuance authorization decisions, node registration, administrative operations, and session activity. High-volume per-request paths do not all append an allow row; their documented request events and metrics are separate. Each chain record links to the previous record hash. Grant paths that require a durable decision record persist it before issuing access. Listing, exporting, and verification are separate operations with separate failure boundaries.

Chain integrity vs. the database

Take or preserve an immutable store snapshot before any further write. Preserve the exact key and export files.

gdsgate --config <authority-config> authority audit verify; compare its result with the off-cluster export and anchor checkpoint.

Exit 0 means the loaded chain links and configured anchors cross-check. A broken link, truncated or rewritten chain, wrong key, malformed anchor row, or store read error returns non-zero.

Stop immediately on any verification error. A self-consistent database chain is not sufficient evidence if the external anchor or export disagrees. Quarantine the suspect store, verify a read-only backup with the original key, and identify the last trusted serial.

Restore the last approved store and external material only after incident approval. Never rewrite rows to make a check pass.

The in-database chain catches a changed row or broken link. It cannot detect an attacker with full write access who deletes the table and creates a new chain from genesis. When the audit keyring of [security.integrity] is configured (or the deprecated [audit].anchor_key_path), Authority seals each committed chain head with an HMAC key held outside the database and stores the checkpoint in audit_anchor. verify-audit first replays the chain, then cross-checks every anchor against the matching serial and key. The exported JSON-lines witness is a separate comparison source. verify-audit remains the verifier.

Consistent verification

From v0.11.0-rc.10, explicit and periodic verification read the audit chain, anchors, signed checkpoints and lost-key declarations from one consistent store snapshot. Concurrent writes after its first read belong to the next verification. CLI totals describe the same snapshot that was verified.

This prevents false integrity failures caused by mixing different committed states. Real tampering, truncation, invalid signatures and store read errors still fail verification. Restart Authority and use the updated CLI binary to apply changes to verification.

Full verification checks the complete history in chunks of at most 128 rows from one pinned snapshot. In rc.13, remote reads prefetch up to 4096 events with an 8 MiB soft payload budget; one larger event still makes progress. File SQLite uses WAL and a separate read-only connection; PostgreSQL uses a separate reader with a read-only repeatable-read transaction. The working connection pool keeps serving writes and control requests. In-memory SQLite retains its original connection and does not provide concurrent writes under the pinned read transaction.

The exact outbox replay index uses an 8 MiB page cache and at most 512 MiB of temporary disk space. Its directory is private to the process account. It holds references and serial numbers, without event payloads or keys, and is removed when the full pass ends. An incremental worker retains its index across slices until it stops, so a reference repeated in a later slice is still detected. A later pass removes abandoned directories older than one minute when their owner and permissions match, their worker lock is free, and the marker and directory contents identify a disposable verification index. Storage or budget exhaustion is an incomplete verification, not a healthy verdict. These limits apply per index; a full sweep and an incremental worker can hold two indexes. Allow space for concurrent Authority processes sharing a temporary filesystem.

CLI lost-key spans are streamed before the final summary. A successful final summary is printed only after all required evidence and snapshot completion succeed. CLI counts come from that snapshot. Hashes, seals and checkpoint formats do not change, and no store schema migration is required.

Configuring chain anchoring

Back up the existing store, keyrings, key files, anchor rows, and export before changing the setting.

New deployment: gdsgate authority init --profile <profile> creates both keyrings. Deployment with key files: gdsgate --config <authority-config> authority keys legacy migrate. Then run gdsgate --config <authority-config> authority audit verify.

authority init exits 0 when it creates the keyrings and never replaces an existing one. Verification exits 0 only when the configured keys agree with all anchors.

Stop if an existing keyring or anchor key is missing, the reference changes for an already-anchored store, or verification fails. Do not clear audit_anchor as routine repair. Restore the original keyring at its configured path or restore the paired store and keyring backup. A fresh key is valid only for a fresh history after an approved incident decision.

Restore the previous [security.integrity] configuration and keyrings together; never replace a live keyring in place.

Name the keyrings in [security.integrity]. The audit keyring seals the anchors; the control keyring holds the approval, revocation, delegation and inventory keys. The two are not interchangeable. Protect each keyring file and its parent directory using the deployment's filesystem controls. A keyring is held outside the database; keep an approved custody copy separate from the live Authority host. The five [audit].*_key_path parameters are deprecated; see Operations → [audit].

Continuous verification

Preserve the prior [audit] settings and current store/export backup.

Set the full verify_interval_secs and, in rc.13, incremental_verify_interval_secs, restart Authority, then watch verification results and run authority audit verify once off-band.

The long-running Authority stays active and the background verifier runs at the configured cadence. A startup failure exits non-zero. Integrity failures are logged at audit.tamper; storage, cancellation and resource failures are logged at audit.verify as incomplete. The off-band command returns non-zero for either failure.

Stop maintenance and traffic changes on an audit.tamper error. Do not suppress the target or increase the interval to hide failures. Preserve logs and the store, run off-band verification with the original key, and follow the chain-integrity procedure.

Restore the prior intervals. Disabling both automatic modes requires approved temporary containment while an off-band verifier remains in use.

The full periodic verifier calls the same durable chain path as the off-band command. With an anchor key it also verifies the audit_anchor table; without one it verifies only the chain.

In rc.13, two independent modes run:

  • Incremental checks run every incremental_verify_interval_secs (default 5). A complete bootstrap establishes a trusted boundary and replay index. Each pass rechecks that boundary and validates at most 4096 new events with their available proofs. Backlog drains in successive bounded passes. Failed passes preserve the previous boundary and roll back newly staged replay references.
  • Full sweeps run every verify_interval_secs (default 300) and remain available through gdsgate authority audit verify. They recheck old history, including changes outside the latest incremental slice.

The two modes use separate snapshot readers. Bootstrap and full sweeps are serialized within a process; an ordinary incremental pass can proceed during a full sweep. Trusted incremental state is private to the running process. Restart, cancellation that loses its state, or scratch failure requires another complete bootstrap. A failed bootstrap reports the missing trusted prefix and does not accept a cursor from the working database.

An incremental success covers its slice. It does not attest to a fresh check of all historical rows. Full sweeps retain their previous interval and integrity alerts. The incremental worker has separate gdsgate_audit_incremental_verifier_last_completed_timestamp_seconds and gdsgate_audit_incremental_verifier_last_verified_timestamp_seconds gauges; initialized and caught_up gauges report its progress. These results do not update gdsgate_audit_verifier_last_verified_timestamp_seconds for full sweeps.

Both intervals set to 0 disable automatic verification; the full command remains available. With only full sweeps disabled, incremental startup still performs its required full bootstrap. Restart Authority to change these intervals. This page does not promise a metric for chain depth or CA rotation. Use the emitted logs, the verifier exit status, and the health metrics documented in health.

Queued rows

On startup and every writer rebind, Authority rebuilds historical outbox receipts in the background. It captures one chain head and reads pages of 1000 rows using one dedicated writable connection. Existing receipts keep their first serial; a populated page does not issue a receipt INSERT. There is no persisted recovery watermark: each new writer generation scans again.

Until recovery finishes, queued audit rows remain durable and are not consumed. Fresh direct audit writes and permitted control-plane reads retain their usual admission checks. Readiness continues to check the store, sync admission and HA lease without waiting for the full history scan. Database failures still affect operations that need that database. File SQLite retains its physical writer lock; in-memory SQLite uses its original connection.

Recovery uses the HA renewal I/O budget and retry cadence (5 seconds by default). PostgreSQL statements on the recovery connection use the same budget. A failed or timed-out page retries from its last confirmed cursor. Rebinding the writer cancels the previous generation; an old completion cannot open the new writer's queue. No new configuration is required.

Watch gdsgate_audit_receipt_recovery_ready and the through / target gauges alongside the queue age. ready=1 means this generation finished receipt recovery; it does not verify the audit chain. The completion log says audit receipt recovery complete. On audit receipt recovery incomplete, check the store error and progress; recovery retries automatically. Repeated restarts start the scan again. For held rows, follow the integrity procedure below.

Copy audit_outbox before deleting anything from it.

gdsgate --config <authority-config> doctor for state.audit.outbox_held; the metrics gdsgate_audit_outbox_held, gdsgate_audit_outbox_held_total and gdsgate_audit_outbox_missing_total; the log target audit.tamper; authority audit list for the codes AUD-0301 and AUD-0302.

state.audit.outbox_held is ok, both counters stay at 0, and no AUD-0301 or AUD-0302 row appears.

A held row, an AUD-0302 row, or a verify-audit failure that names a replayed queued row. Compare each held row and each missing reference with the logs of the instance its origin names, then follow the chain-integrity procedure.

A row a follower writes, and a row that goes with a change to the catalogue or to an agent host, is queued in audit_outbox and sealed into the chain by the write leader afterwards. While it waits it is a row in the database.

The Authority instance that queues a row seals it with an HMAC under a key derived from the active anchor key of the audit keyring. The seal covers the event, the instance name, and the row's reference <epoch>:<seq>: a random name for the process and a count within it. The reference is also written into the event's detail under outbox. With no audit keyring, rows are queued without a seal, as the chain is then unanchored.

Only Authority writes outbox. SubmitAuditEvents refuses a batch with PermissionDenied when the detail of any of its events has an outbox member, in any spelling of the name, and stores none of the batch. verify-audit and the watch below read outbox only on rows whose submitter is gdsgate-authority.

The leader checks the seal before it seals the event into the chain, and holds the row when the check fails:

held_reason The row
unsigned Carries no seal while the audit keyring is configured. A row queued by a build that did not seal is unsigned too.
unknown_key Names a key the audit keyring does not hold.
forged Carries a seal that does not match it.
replayed Repeats a reference already sealed by this or an earlier leader.

A held row stays in audit_outbox with held_at_ms and held_reason and is never sealed. The leader logs it under audit.tamper, counts it in gdsgate_audit_outbox_held_total, and writes audit.outbox_held (AUD-0301) to the chain with outbox_id and reason in the detail. When the row reads as a queued row, the detail also has held_outbox, the reference the row names, and held_row_sha256, the SHA-256 of the row. gdsgate doctor fails state.audit.outbox_held while one remains. A durable origin receipt prevents replay across leader changes. Queue consumption, the origin receipt, the chain record and its anchor commit atomically. Cancelled drain requests can retry; they cannot seal an already consumed row again.

Upgrades backfill receipts from existing chain records without rewriting them. A duplicate already present in the chain remains an integrity failure: verify-audit continues to name both serials. Preserve that history and its integrity alarms when investigating the incident.

Every Authority instance, leader or not, watches the queued rows it knows: the rows it queued, from the commit, and every row with a valid seal it has seen in the queue. Every 5 seconds it looks for each one on the chain and in the queue. The watch of a row ends on one of two chain rows, submitted by gdsgate-authority:

Chain row Matches when
The sealed event Every field but the serial equals the event the queued row carries.
audit.outbox_held held_outbox is the row's reference and held_row_sha256 is the SHA-256 of the row.

With the audit keyring, the chain row counts only when the first anchor at its serial or after it verifies and the rows between hash to the anchored hash. Without it, the chain row counts when it hashes to its own hash and links to the rows on either side, and a row the database writes onto the chain with the same event ends the watch.

held_at_ms does not end the watch. A row with a valid seal is in the queue whether it is marked held or not. A row found neither on the chain nor in the queue is looked for once over the whole chain, then reported in gdsgate_audit_outbox_missing_total, under audit.tamper, and as an audit.outbox_missing row (AUD-0302) with missing_outbox and origin in the detail.

Removed while Reported
The instance that queued it runs At that instance's next pass, within 5 s.
That instance has stopped and another runs By the other instance, if its pass saw the row before the removal. Each instance sees every waiting row within 5 s of its commit.
Every instance has restarted since the row was queued By each instance whose first pass after its start saw the row.
No instance runs Not reported. The watch is held in memory.

Upgrade every instance of a cluster together. A row an older instance queues is held as unsigned, and an older leader stops at the first sealed row.

Off-cluster export

Preserve the current export, anchor key custody record, and store backup before changing the destination.

Set [audit].export_path to the approved append-only JSON-lines path, restart Authority, then parse a copied line with jq -e . < <export-file>.

Each committed audit batch and its closing anchor are appended as independently parseable records. jq -e . exits 0 for a valid copied line. An export failure logs a warning but does not undo an already durable chain commit.

Stop export if the destination is writable by untrusted users, contains key material, leaks credentials, or loses ordering. Do not treat an export outage as permission to edit the chain. Protect or replace the destination, retain the gap window, and reconcile it with the store and later export batches.

Restore the previous export path or unset it, retaining the store chain as the durable source.

The file lane is best effort. Durable grant decisions fail closed if their audit row cannot be persisted, while ordinary listing and sign-in records remain best effort. Never place key material beside an unencrypted export.

Event code reference

Use code to identify an event across versions. Codes use AAA-NNNN, where the prefix identifies the area. A code is never reassigned to another event. Older records may have no code or use a previous event name.

The description identifies the operation or observation. Read outcome, detail and the session context to determine whether it succeeded, failed or was refused. A code alone does not establish success or complete capture.

Shell
gdsgate --config operator.toml authority audit list --code SES-0101 --limit 20

Authentication and factors (AUT)

Code Event Description
AUT-0101 auth.signin A verified sign-in observation. See the authentication identity limits below.
AUT-0201 mfa.enroll A one-time-code factor was enrolled.
AUT-0202 mfa.confirm An enrolled one-time-code factor was confirmed with a first code.
AUT-0203 mfa.verify A one-time code was checked.
AUT-0301 webauthn.register_begin A passkey registration ceremony was started.
AUT-0302 webauthn.register_finish A passkey registration completed or failed.
AUT-0303 register_intent.create A browser registration permission was created.
AUT-0304 register_intent.finish A browser registration permission was redeemed.
AUT-0401 user_name.forget A person's display name was removed from the user directory, or the removal was refused.

Sessions and activity (SES)

Code Event Description
SES-0101 session.open A session opened; kind identifies the protocol.
SES-0102 session.close A session closed; inspect its outcome and recording metadata.
SES-0103 session.no_route A session request had no known resource or serving route; policy was not evaluated.
SES-0104 session.abandoned The Connector disconnected while the session had no recorded close.
SES-0105 session.claim_refused A node attempted to close or upload a recording for a session it did not open.
SES-0201 sftp.open A file was opened over SFTP.
SES-0202 sftp.close A file opened over SFTP was closed.
SES-0203 sftp.remove A file was removed over SFTP.
SES-0204 sftp.rename A file was renamed over SFTP.
SES-0205 sftp.mkdir A directory was created over SFTP.
SES-0206 sftp.rmdir A directory was removed over SFTP.
SES-0207 sftp.served SFTP was handed to the host account and server program, or that handoff failed.
SES-0301 db.query A database statement was inspected; check its outcome and engine details.
SES-0302 db.write_refused The database refused a write the gateway had let through.
SES-0303 db.write_in_read_only_session The database reported a write in a session limited to reads.
SES-0304 db.write_misclassified The gateway had classified as a read a statement that wrote.
SES-0305 db.tls_requested The database client requested TLS; query inspection may still be available.
SES-0306 db.tls_passthrough Database TLS became opaque to the gateway; statements cannot be inspected.
SES-0307 db.tap_lost Database query inspection stopped after losing protocol framing.
SES-0401 llm.call A call was made to a model.
SES-0501 kube.request A request was relayed to the Kubernetes API.
SES-0601 session.kill An operator terminated a live session.
SES-0701 http.request An HTTP request was recorded with its route, response and timing.
SES-0702 http.tunnel An authorized HTTP tunnel ended; inspect its duration and closing reason.
SES-0801 process.started A new observation run began; coverage before this run remains unknown.
SES-0802 process.registered Observation was registered for the work before launch.
SES-0803 process.fork A tracked task or thread was created.
SES-0804 process.exec A tracked program loaded successfully.
SES-0805 process.exec_failed A tracked program-load attempt failed.
SES-0806 process.task_exit One tracked task exited; this is separate from session closure.
SES-0807 process.loss Known observation loss occurred.
SES-0808 process.drained Known tracked tasks and queued observation events finished draining.
SES-0809 process.observation Requested observation was unavailable or degraded.
SES-0810 process.tcp_attempt An observed task attempted an outgoing TCP connection.
SES-0811 process.tcp_returned The connection call returned; a pending result does not establish connectivity.
SES-0812 process.tcp_established The observed TCP socket reached the established state.
SES-0813 process.tcp_closed_before_established The socket closed before an established state was observed.
SES-0814 process.file_write A regular-file write completed; its return value records the result.
SES-0815 process.file_attributes A file size, mode or owner request completed.
SES-0816 process.file_unlink A file removal request completed.
SES-0817 process.file_rename A file rename request completed.
SES-0818 process.file_create A supported file-creation checkpoint was observed.

Node enrollment and identity (IDN)

Code Event Description
IDN-0101 enroll.token.create A join token was minted.
IDN-0102 enroll.node A node redeemed a join token and was issued its identity.
IDN-0201 identity.renew A node renewed its identity using its existing credentials.
IDN-0301 identity.import A node's registry row was imported by an administrator.
IDN-0302 identity.revoke A node's identity was revoked.
IDN-0303 identity.delete A node's registry row was deleted.
IDN-0401 enroll.node_admission Administrative node enrollment was refused.
IDN-0402 identity.revoke_admission Administrative node revocation was refused.
IDN-0403 enroll.token_admission Permission to create a join token was refused.
IDN-0404 registry.view_admission Permission to read the node registry was refused.

Workload identities (WKL)

Code Event Description
WKL-0101 workload.issue A workload identity was issued.
WKL-0102 workload.renew A workload identity was renewed.
WKL-0103 workload.revoke A workload identity was revoked.

Delegations (DLG)

Code Event Description
DLG-0101 delegation.create Access was lent to a program acting for a person.
DLG-0102 delegation.revoke One delegation was revoked.
DLG-0103 delegation.renew A delegated identity was renewed within its delegation.
DLG-0201 delegation.revoke_by_owner All delegations belonging to one owner were revoked.

Resource catalog and publication (CAT)

Code Event Description
CAT-0101 catalog.manage A catalog entry was managed; operation identifies the requested change.
CAT-0201 inventory.published A Connector published the resources it serves.
CAT-0301 scope.published A resource-publication snapshot was accepted for a scope.
CAT-0302 scope.refused A resource-publication snapshot was refused for a scope.

Agent host (AGT)

Code Event Description
AGT-0101 agent.declare An agent declaration was created, changed or removed.
AGT-0102 agent.switch A declared agent was enabled or disabled.
AGT-0103 agent.view The agent declarations were read.
AGT-0104 agent.seen Agent host reported a changed work state; this is the host's assertion.

Certificate authorities (CAS)

Code Event Description
CAS-0101 ca.rotate A certificate authority was rotated, or the rotation was refused.
CAS-0201 ca.key_pruned A retired CA generation's private key was removed from the store.

Policy changes (PED)

Code Event Description
PED-0101 policy.edit A policy document was proposed, pulled or rejected.
PED-0102 policy.edit_approve A vote was cast on a proposed policy document.

Access requests and step-up (JIT)

Code Event Description
JIT-0101 access_request.create An access request was submitted.
JIT-0102 access_request.approve A reviewer voted on an access request.
JIT-0201 step_up.grant A step-up ceremony ended in a one-time grant for a named action.
JIT-0202 webauthn.step_up_begin A step-up ceremony was started against a passkey.
JIT-0203 webauthn.step_up_finish A step-up assertion was checked.
JIT-0204 action_intent.create A step-up intent was minted for the browser to redeem.
JIT-0205 action_intent.finish A step-up intent was redeemed.

Recordings (REC)

Code Event Description
REC-0101 recordings.view Recordings were listed, fetched or watched live; operation identifies the request.
REC-0201 recording.deliver A recording reached central storage after its session had already ended.

Audit access and integrity (AUD)

Code Event Description
AUD-0101 audit.view Access to read the audit chain was requested.
AUD-0201 key.loss_accepted An operator declared a sealing key lost; affected records remain unverifiable.
AUD-0301 audit.outbox_held A queued event was retained because its seal or replay check failed.
AUD-0302 audit.outbox_missing A watched queued event disappeared without reaching the chain.

MCP operations and descriptors (MCP)

Code Event Description
MCP-0101 mcp.tool_call An MCP tool was called; tool identifies it.
MCP-0102 mcp.resource_read A resource was read over MCP.
MCP-0103 mcp.prompt_get A prompt was fetched over MCP.
MCP-0104 mcp.input_request The server asked the client for something (sampling, elicitation). The protocol method is method in the detail.
MCP-0201 mcp.instructions The server's instructions were served to a caller.
MCP-0202 mcp.tools_changed The server announced that its tool list changed.
MCP-0203 mcp.tool_listing_undecided A tool listing was served without a per-caller visibility decision.
MCP-0204 mcp.decider_hook An external decider was asked about a request.
MCP-0301 mcp.descriptor_changed A tool's descriptor changed under a pin.
MCP-0302 mcp.descriptor_pinned A tool's descriptor was pinned.
MCP-0303 mcp.descriptor_repinned A pinned descriptor was pinned again at a new digest.
MCP-0304 mcp.descriptor_reverted A changed descriptor was served from its pin instead.
MCP-0305 mcp.descriptor_unsealed A descriptor pin was lifted.
MCP-0306 mcp.descriptor_pin_ignored A descriptor pin was configured but could not be applied.
MCP-0307 mcp.descriptors_unreported A connector served tools without reporting their descriptors.

Sandbox assertions (SBX)

Code Event Description
SBX-0101 sandbox.claim A delegated program reported its sandbox properties; these are asserted values.

Deployment security (SEC)

Code Event Description
SEC-0101 security.profile_changed The deployment security profile changed.

Service connectivity (SYS)

Code Event Description
SYS-0101 connector.tunnel_lost A Connector tunnel ended with at least one session missing a recorded close.

Policy action codes (POL)

A policy.decision row uses the code of the action being evaluated and names that action in detail.cedar_action. Administrative operations usually record their own event code, such as CAT-0101 or CAS-0101, and may carry the policy action in their detail. The table includes the stable identities of these actions; it does not promise a policy.decision row for each one.

dbQuery categories are evaluated when the database session opens and recorded with its connection decision. Statement activity uses SES-0301 and related codes. view and viewTools filter listings without a decision row per item. See policy audit semantics for how action checks and activity records relate.

Code Policy action Description
POL-0101 connect Opening a session on a supported resource.
POL-0102 sshForwardLocal Forwarding a local port over SSH.
POL-0103 sshForwardRemote Forwarding a remote port over SSH.
POL-0104 mintOnwardSshCert Minting the onward certificate the gateway presents to the host.
POL-0105 sshForwardAgent Carrying the client's ssh-agent into the session (ssh -A).
POL-0106 sshProgram One program a session asked to run: a shell, an exec, or a subsystem.
POL-0107 sshUseClientKey Authenticating onward with the caller's own key, over their agent.
POL-0201 kubeRequest One request to the Kubernetes API.
POL-0202 dbQuery Database statement categories evaluated when a session opens.
POL-0203 mcpCallTool One MCP tool call, decided per tool.
POL-0204 mcpReadResource One MCP resource read.
POL-0205 mcpGetPrompt One MCP prompt fetch.
POL-0206 llmCall One call to a model.
POL-0207 httpRequest One request to an HTTP(S) application, or one out of the protected zone.
POL-0208 desktopChannel One channel of a desktop session, decided per channel and direction.
POL-0209 udpConnect One external UDP destination, authorized independently from TCP.
POL-0301 view Resource-list visibility filter; it does not emit an individual decision row.
POL-0302 viewTools Tool-list visibility filter; it does not emit an individual decision row.
POL-0303 viewNodes Reading the node registry.
POL-0304 viewRecordings Reading session recordings.
POL-0305 viewAudit Reading the audit chain.
POL-0401 enrollNode Enrolling a node.
POL-0402 revokeNode Revoking a node.
POL-0403 issueJoinToken Minting a join token.
POL-0404 manageCatalog Changing the resource catalogue.
POL-0405 disableUser Disabling a person.
POL-0501 rotateCA Rotating a certificate authority.
POL-0502 editPolicy Proposing a policy document.
POL-0503 approvePolicyEdit Voting on a proposed policy document.
POL-0601 killSession Killing somebody else's live session.
POL-0602 approveRequest Voting on an access request.
POL-0701 declareAgent Creating, changing or removing an agent declaration.
POL-0702 switchAgent Enabling or disabling a declared agent.
POL-0703 viewAgents Reading the agent declarations.

HTTP request sampling can summarize successful GET requests in session.close; see web request auditing. Process events depend on enabled capture and its coverage; see process observation. Absence of a row alone does not prove that an operation did not happen.

Interpreting audit records

Audit event classes

The source event classes are authentication, authorization, ca-operation, session-activity, admin-action, capability-grant, client-assertion, and resource-integrity:

Class Examples and boundary
Authentication auth.signin records a verified identity observation. It carries no token, factor, group list, or source address.
Authorization policy.decision records the principal, resource, decision, and the Cedar action in cedar_action. A route miss is session data because no policy was consulted.
CA and capability Node registration, renewal, CA operations, and JIT approvals. A refused renewal records its reason.
Administration Policy, catalog, session, audit, recording, and CA administration. A list operation does not verify integrity.
Session activity Open/close metadata and lane records for SSH, database, Kubernetes, MCP, TCP, web, and model sessions. Recording bytes are referenced by a chain-sealed digest.
Client assertion sandbox.claim records a delegated run's own assertion and does not make it a verified fact.
Resource integrity MCP descriptor pin observations, including baseline, changed, reverted, repinned, unsealed, ignored, and unreported outcomes.

A policy push, vote and rejection write their policy.edit or policy.edit_approve row in the store transaction that changes the policy, and a break-glass restore writes policy.edit with operation = break_glass_restore in the transaction that lands the file. A policy version never becomes active without its row. The row waits in the audit queue (queued rows) until the leader seals it; while the chain cannot be written it stays there and gdsgate_audit_outbox_depth counts it.

Credential type: presented

presented is written on session open and close, inner rows, and policy decisions, including denials. key means possession of the certificate-bound key. cookie means the clientless browser entry bound the session certificate to a cookie digest. A row before the field existed or a path with nothing presented has no presented field.

Outcome values

An application, apiserver, or model provider returning 403 is a backend failure from the gateway's point of view. A gateway policy denial is deny. Older connector rows may encode some refusals as failure; preserve that historical meaning when querying across versions.

Database observations and gateway decisions

Preserve the relevant audit rows, statement evidence, and database snapshot before remediation.

Query the audit rows for db.write_in_read_only_session, db.write_refused, and db.write_misclassified; correlate session_uid, engine, and kind.

The query completes without changing the store. The first two outcomes are incident signals; the third is a classifier defect report.

Stop writes or customer traffic when a write passed a read-only gateway session or the server contradicts the gateway category. Preserve the statement and server command tag, contain the session, and reproduce against a controlled database.

Roll back the customer-side change or database transaction only under the database owner's procedure. Never rewrite the audit observation.

The connector classifies statements before forwarding and also reads the answer stream. It records these distinct observations:

Event Outcome Meaning
db.write_in_read_only_session failure The session had no write capability but the server reported a write.
db.write_refused deny The server refused a write with SQLSTATE 25006; the gateway had forwarded it and the read-only database mode stopped it.
db.write_misclassified failure The server reported a write for a statement classified as a read in a write-capable session.

engine identifies the database engine and kind identifies the wire lane. CockroachDB is reached over the PostgreSQL wire, so those values can differ.

Sessions a connector never accounted for

Preserve the rows before correlating them with what the connector still holds on disk.

gdsgate --config <authority-config> authority audit list --code SES-0104 --limit <n>, then --code SYS-0101 for the departures that produced them.

Exit 0 prints matching rows. An empty result is not evidence that no connector departed: a Proxy that stopped while holding notices reported none of them.

Stop if a session id carries both an observation and a session.close, and read the close. An observation is not a close and never becomes one. Run gdsgate doctor on the connector before concluding a recording is lost; a cast it still holds is delivered by its next pass.

A connector that is killed writes nothing on its way out, so the session it was relaying leaves an open row with nothing after it. The Proxy that carried the tunnel reports what was on it after [proxy].abandoned_session_grace_secs, and Authority writes these rows:

Code Action Written by What one row says
SES-0104 session.abandoned Authority One session whose connector went away while the chain held an open for it and no close.
SYS-0101 connector.tunnel_lost Authority One departure, at the head of the observations that report produced.
REC-0201 recording.deliver the connector's delivery pass One cast that reached the central store on a later pass than the session it belongs to.
SES-0105 session.claim_refused Authority A node named a session it did not open.

session.abandoned takes its actor, its target and the session kind from the session's own session.open row. The Proxy names the sessions and nothing about who ran them. The detail carries session_uid, kind, node for the connector that left, reason for how the tunnel ended, and observed_at for the Proxy's own clock reading, which is a claim and not a checked fact. The submitter is gdsgate-authority and the outcome is failure.

The row does not spell session.close, and that is deliberate. The reader that decides whether a recording may be delivered finds a close by the name of the action, so an observation opens nothing, closes nothing, and admits no bytes. A Proxy naming sessions it did not serve leaves false observations on the chain and moves nothing. It carries no digest either, because it is written without the bytes.

connector.tunnel_lost is one row per departure and answers what became of the node, where the observations beside it answer what became of a session. The node is the row's actor and its target both: nothing acted on it, and the Proxy that saw the departure cannot be named, since every Proxy in a cluster presents the same common name. Its detail is reason, count, and observed_at. It is written only where at least one observation was, so a tunnel whose sessions the chain already holds closes for produces neither.

A connector that comes back accounts for itself instead. It closes the recordings its last run left half-written, and for a session the chain holds no close for it asks Authority to write the one it owed: an ordinary session.close row, sealed by Authority, with reason = late_close, the outcome failure, and the actor and target of the open row. The cast is uploaded after that row is on the chain. Its arrival is recording.deliver.

recording.deliver is written by that delivery pass and by nothing else. An upload that goes through at session close is already described by the close row beside it, and a second row there would repeat its neighbour. The row carries the length, the digest, and how long the cast waited on the connector, because what follows it is the removal of the only local copy and the store's own created_at is not sealed.

session.claim_refused names one fact: a node named a session it did not open. Two calls can find it, the upload of a recording and the late close of a session, and both write this code, because the fact is the same either way. Which call was refused is the operation key in the detail, recording_upload for the upload and late_close for the late close. The actor and the target are the open row's either way, so nothing the refused caller said about the session is written down as fact.

The row is sealed once per session, call, and caller. Attempts beyond the first add nothing: a delivery pass that offers the same refused cast again on a later sweep finds its own earlier row already on the chain and adds none beside it. A different caller, or a refusal by the other call for the same session, each leaves its own row.

The upload's detail carries session_uid, calling_node, and session_node for the node the session.open row was handed in by. The late close's detail carries session_uid, kind from the open row, and calling_submitter for the common name on the call; session_submitter and session_node carry what the open row named, where it named them, and calling_node carries the caller's registry id where one resolved. reason names which of three findings it made: submitter_mismatch when the calling name disagrees with the open row's, no_open_submitter when the open row names no submitter to compare against, and node_mismatch when the names agree but the machines do not.

Reading the audit chain

The list command opens a routed view or the direct store and prints rows. The implemented proof path loads a consistent snapshot of the entire chain and its anchors, signed checkpoints and lost-key declarations, then verifies the links and available integrity evidence. The periodic verifier uses the same snapshot path. Listing rows does not prove depth, continuity or anchor integrity.

Actor attribution

actor identifies who performed the action, submitter who delivered the record, and owner on whose behalf a workload acts. claimed_operator is a caller-supplied label accepted only from the control-plane identity and never used as a decision principal, filter, or context field.

submitter_node names the machine behind submitter. submitter names the role a node enrolled under, one common name shared by every connector in a cluster; submitter_node names which of them delivered this row, resolved by Authority from the public key on the connection carrying the batch, never from a value in the request. It is empty for two distinct reasons, and neither is evidence of tampering: on a connector's row, the row was sealed before the column existed; on a row Authority sealed for itself, submitter_node is absent because Authority holds no row in the node registry: there is no node role for it to enroll under.

The id is the one authority nodes list prints and authority nodes revoke takes, so a row traced to a machine during an investigation is acted on directly. See Per-node revocation. Revocation cuts the node's identity along with its access: a node that is revoked and re-enrolls gets a new registry row and a new id, and its later rows will not match its earlier ones under --node. A batch from a connector holding no registry row at all is refused whole, with nothing from it reaching the chain; the fix is authority nodes import or a fresh enrollment.

submitter_node enters the row's signed content the way owner, claimed_operator, and code already do: appended only when the writer had a value. A chain sealed before the column existed carries nothing extra there and verifies with the same result as before; verify-audit needs no field-specific check for it.

Authentication identity

The cluster records the first request carrying a verified resulting token, at most once per person per day on a running Authority instance. A restart or HA failover can re-arm local deduplication, so distinct actors are safer than row counts for a period. The row contains actor, issuer, write time, and optional auth_time, but no token, factor, groups, email, or source address.

Search this documentation edition.