Skip to content

[Phase 3] Authorization server and gateway audit records, and reconciliation #2848

Open

Description

@ChrisJBurns

Depends on: #2566 (audit records and delivery); "Add audit logging to authserver" (stacklok/toolhive#3919) and "Add HTTP middleware and logging cleanup to authserver" (stacklok/toolhive#3918) (authorization server audit events), "Record the operation and attempt IDs a client reports, at the vMCP" (stacklok/toolhive#6979) (operation and attempt IDs at the vMCP), "Per-user revocation time for grants issued by token exchange" (stacklok/toolhive#6972), "RFC 7009 token revocation endpoint" (stacklok/toolhive#6966), and the narrowing issue (stacklok/toolhive#7061) for the operation ID in AS-1's records, toolhive-core "audit: expose delivery failures through the logger and sink integration" (stacklok/toolhive-core#343) (reporting delivery failures); the "to file" rows in "Phase 3, Track: ToolHive — The remaining ToolHive changes for audit, sign-out, and schedules" (#2570) for per-component audit sequence numbers and stream start/stop events

Problem

The audit trail holds records only from the broker and mecak8s. The authorization servers record nothing, and gateway records cannot be joined to an operation. No check compares one component's records with another's, so a suppressed or forged record goes unnoticed.

Implements

Scope

  • AS-1 and AS-2 audit events.
  • The operation ID, as AS-1 records it from the call entry it signed; operation and attempt IDs recorded at the vMCP.
  • Sign-out-everywhere events.
  • Definition-load and agent-instance credential issuance events.
  • References to AS-2 redemption events.
  • Delivery failures reported on a separate channel.
  • Start and stop events for each record stream, with sequence numbers.
  • The reconciliation checks, run against the embedded gateway. In external mode, the checks need records from the gateway's operator.
  • Reconciliation finds missing and inconsistent records. It finds altered records only once [Phase 3] Tamper-evident audit records #2808's signing lands. The store mecak8s cannot change is Send audit records to storage mecak8s cannot change #2846's.

Decide before starting

Does lossless delivery belong in phase 2 (#2566) or here? Under it, components block or refuse an operation rather than buffer and drop records.

Done when

The audit profile checks listed above pass against real records from the broker, mecak8s, AS-1, AS-2, and the vMCP. A missing or inconsistent record in one stream is reported, and an altered one is too once #2808 lands.

Activity

  1. ChrisJBurns commented on Nov 18, 2026

    @ChrisJBurns
    ContributorAuthor

    Design decision for this ticket: The Producers table in audit.md lists definition load under the broker but not agent-instance credential issuance; add it so this ticket can own both events.

    Where it goes: audit.md: Delivery, protection, and reconciliation.

    Decide it when this ticket is picked up, and record the answer as a small design edit (reviewed by the design's author) before or with the ticket's first PR.

  2. rdimitrov commented on Nov 25, 2026

    @rdimitrov
    Member

    Two things #2984 and #2985 leave here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions