Skip to content

Broker records of who acted #2541

Done

Description

@ChrisJBurns

Removes shortcut: delegation reports are not recorded as lineage events (#2557)

Depends on: #2535

Settle in the design before starting: how a session open, an agent registration, and a close handle a record the sink refuses (audit.md, "Write order and failure" covers only the ID-JAG, the decision, and refusals), and how the open record references a refresh token it replaced (credentials-and-lifecycle.md step (3), "Evidence").

Problem

Nothing records who acted, for whom, and what was decided. The identity broker records only call decisions and ID-JAGs, keeps them in memory, and has no session, registration, or user facts in them.

Design

Requirements

  • The identity broker records each event audit.md assigns to it: broker session open, refused open, close, agent registration, refused registration, grant, and call decision. Each record carries the fields the design's step "Evidence" paragraphs and Subjects list for that event.
  • Opens: a record for every refusal session open returns ("Error reasons"), and for each kind of successful open: a converted token, a token AS-1 already converted, and a tokenless open.
  • Closes: a record from every close path, including a hard expiry the broker notices during a lookup. A close is recorded once.
  • User subjects: the owner, AS-1's own subject, and the token's client_id qualified by AS-1's issuer, kept with the broker session at open and taken from the token only after AS-1 accepts it.
  • Provenance: each subject is marked verified, reported by the component that supplied it, or unavailable (audit.md, "AuditEvent profile"). The owner after a tokenless open, the run, the delegation, the run owner, and phase 1's unverified workload are never marked verified.
  • Each record has an ID minted once. The broker keeps the open record's ID with the broker session and the registration record's ID with the agent, so later records can reference them (audit.md, "Lineage").
  • Write order and failure follow audit.md: the ID-JAG and success decision records are written before the gateway token is returned, and an error means no token. Every record goes through a sink that can refuse it, and each event handles a refusal as the design says.
  • Delegation reports (Runs, delegations, and the run owner #2557): each accepted and refused ReportDelegation is a lineage event. A team started through the RunTeam API is a run of its root's main agent whose ID exists only on mecak8s's context; its events carry that run ID, so audit can trace a member back to the API request.
  • No token, assertion, or credential value appears in any record.

How it fits

#2566 writes these records in the AuditEvent profile and delivers them; until then the broker keeps them in memory. #2731 adds the dispatch and outcome mecak8s reports, joined to these decisions. #2551, #2563, and #2568 record their new events through the same sink.

Done when

Tests produce a record for each event above, including every refused-open reason, each kind of open, a hard-expiry close found by a lookup, a grant with its ID-JAG jti, and a call decision; show the provenance marks after a tokenless open; show a refused record handled as the design says for each event; and prove no token value appears in any record.

Activity

  1. changed the title [-]"Who acted" log[/-] [+]Broker records of who acted[/+] on Nov 16, 2026
  2. rdimitrov commented on Nov 20, 2026

    @rdimitrov
    Member

    Registration records after #2555

    Helpers now register, so registration records come from children too. Points for this ticket:

    • A child's record should carry its parent and the reported parent host session (D5).
    • Members of a team created over the API register with the root's main agent as a stand-in parent; their records should mark that parent as a stand-in, not a creation fact (agent-definitions.md, "Relationships and lifetimes").
    • A resumed helper is re-admitted (kept credential, or a new registration), and a refused helper registration is a refused-registration record.
  3. rdimitrov commented on Nov 20, 2026

    @rdimitrov
    Member

    Delegation records after #2557

    #2557 (PR #2930) added delegation reports. The design records each accepted or refused report as a delegation lineage event, marked as reported by mecak8s (credentials-and-lifecycle.md, "Delegation report", "Evidence"). #2930 records none of them and names this ticket as where they come from, so this ticket's events should include them:

    • A delegation report, accepted or refused. It should carry the delegation ID, the delegating run and agent, the receiving run and agent, and the run owner, all marked as reported by mecak8s. A refusal should carry its reason, one of the design's check failures, ALREADY_EXISTS for a changed repeat among them. An identical repeat is a success, so it should not make a second record.
    • A team created over the API. Each RunTeam call is a run of the root's main agent, and the members' runs are delegated from it (decided on Runs, delegations, and the run owner #2557). Their delegation records should mark the main agent as the stand-in parent, as their registration records do (comment above).
    • A delegating root run recorded by a report. The first report from a run the broker hasn't seen records that run as a root run of its agent. The record should show where the run came from.
    • Fields already in the in-memory records. The ID-JAG record now carries the delegation, the run owner, and the grant's user, beside the run. The call decision already carried the run, the delegation, and the run owner.
  4. self-assigned this
    on Nov 25, 2026
  5. rdimitrov commented on Nov 25, 2026

    @rdimitrov
    Member

    Design settled in #2984; implemented by #2985. Changes from this ticket's text and the two comments above:

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions