Repository navigation
Description
Problem
Phase 2 (#2545) delivers the identity behaviour for one mecak8s replica, with the broker inside mecak8s and its state in memory. These remain after it:
| Gap | Removed by |
|---|---|
| Registration names the definition and the revision the loader reports; no provenance check, root eligibility, or nesting limit | Slice 1 |
| The tool limit is a plain check, with no policy revision | Slice 1 (#2849) |
| The caller is not verified to be mecak8s, and calls are in process | Slice 2 |
| Inline MCP servers in definitions bypass the broker; the harness does not run definitions from the broker's loader | Slice 1 (#2548) |
| Broker state, schedule grants, and mecak8s's call state are in memory; a restart signs users out | Slice 3, slice 4 |
| Agent credentials renew only by registering again, and keys cannot be rotated | Slice 3 (#2562) |
| A new vMCP session for every gateway call | Slice 3 (#2564) |
| No sign-out everywhere; refresh tokens and schedule grants are not revoked at AS-1 | Slice 4 |
| Only the broker's and mecak8s's audit records; no reconciliation | Slice 5 |
| With the identity broker on, mecak8s runs one replica | Slice 6 |
| Only the TUI signs in at AS-1 | Slice 7 |
| The identity broker runs as modules inside mecak8s; audit records are not signed at their source | Slice 8 |
| External gateways are not supported | Slice 9 |
While the broker runs inside mecak8s, a compromised mecak8s holds AS-1's signing key and the broker's client key, can read refresh tokens, and can forge or suppress broker records from then on (threat-model.md: A compromised mecak8s).
Design
- README.md: Order of work
- implementation.md: Modulith constraints
- threat-model.md: What the split requires
- audit.md
Goal
The identity work runs in production: exact definition versions and policy, a verified caller, durable state that survives restarts, sign-out everywhere and revocation, a complete and cross-checked audit trail, more than one replica, Studio sign-in, the broker as its own service with records signed at their source, and gateways Mecatl doesn't run.
Slices
| Slice | Parent or ticket | Can start |
|---|---|---|
| Slice 1: Exact definition versions and registration rules | #2546 (#2529, #2547, #2548, #2551, #2741, #2849) | Any time |
| Slice 2: Trusted transport | #2558 (#2559, #2772) | Any time |
| Slice 3: Durable and renewable | #2561 (#2562, #2563, #2564) | #2563 after #2559 |
| Slice 4: Sign-out and durable schedules | #2567 (#2568) | After #2563 and the ToolHive revocation changes |
| Slice 5: Complete audit | #2848 | After #2566, stacklok/toolhive#3919, and stacklok/toolhive#6979 |
| Slice 6: More than one replica | #2805 | After #2563 and #2568 |
| Slice 7: Studio sign-in | #2806 | Any time |
| Slice 8: The broker as its own service | #2807, #2808 | After slices 2, 3, and 6 |
| Slice 9: External gateway | #2810 (#2539, #2812, stacklok/toolhive#7158) | Any time |
| Other | #2592 (authorization pending before the call), #2655 (TUI with a private CA), #2822 (tell a gateway failure after the backend call from one before it) | Any time |
| ToolHive | #2570, stacklok/toolhive#6886, stacklok/toolhive#6321 | Now |
Slices 1 to 5, 7, and 9 can run in parallel. Slice 6 needs slices 3 and 4. Slice 8 needs slices 2, 3, and 6.
Done when
Every gap above is removed: definitions and policy are exact and versioned, the caller is verified, state survives restarts, sign-out everywhere and revocation reach AS-1, the audit trail is complete and cross-checked, mecak8s runs more than one replica with the broker on, Studio signs in at AS-1, the broker runs as its own service meeting every item in "What the split requires" with records signed at their source, and an external gateway passes #2810's test.
Activity
[-]Phase 3: The identity broker as its own service, more than one replica, Studio sign-in, and tamper-evident audit[/-][+]Phase 3: Production hardening — Durable, revocable, highly available, the broker as its own service, and external gateways[/+]