You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After PR #75 (issue #74 step 1) and the planned PR for issue #76 (issue #74 step 1c) land, the legacy agentkeys-mock-server surface has zero live in-tree callers for most of its endpoints. This issue tracks the cleanup work and an architectural open question about where the still-useful endpoints should live.
Cleanup scope
After #75 + #76 are merged, the following endpoints have no remaining in-tree caller and should be deleted along with their supporting code:
POST /session/create — replaced by the agentkeys init --email|--oauth2-google flow that mints session JWTs at the broker.
POST /v1/auth/exchange (broker) — backward-compat shim that exchanged a legacy bearer for a session JWT. With agentkeys init --mock-token hard-cut, no in-tree caller remains.
POST /session/child / POST /session/revoke / POST /session/recover — all in the legacy bearer flow.
The corresponding env vars on the broker side: BROKER_BACKEND_URL, BROKER_BACKEND_TIMEOUT_SECONDS.
Reasonable to keep on the backend since it's a per-user inbox primitive
/auth-request/* (pair-flow, master-approval)
LIVES — used by the legacy daemon pair-flow
Keep until daemon's pair-flow is also retired (separate issue)
Open question — identity/audit endpoint placement
The user's proposal (per the conversation that produced #76) is a broker (policy/identity oracle) + signer (execution oracle) split:
The flow is:
User sends linking request to broker
Broker constructs the payload and sends back to user
User locally signs it with device key and JWT and sends to signer
The signer signs it and submits to cloud/blockchain
In this model:
Broker owns identity-linking, grants, audit metadata, payload construction. It knows which user owns which omni, what's allowed, what's audited.
Signer owns the per-omni keypair and the final signing/submission step. It accepts a payload + device-key signature + session JWT, validates, signs with the omni-derived key, and submits to the appropriate sink (cloud IAM, chain, etc.).
Background
After PR #75 (issue #74 step 1) and the planned PR for issue #76 (issue #74 step 1c) land, the legacy
agentkeys-mock-serversurface has zero live in-tree callers for most of its endpoints. This issue tracks the cleanup work and an architectural open question about where the still-useful endpoints should live.Cleanup scope
After #75 + #76 are merged, the following endpoints have no remaining in-tree caller and should be deleted along with their supporting code:
POST /session/create— replaced by theagentkeys init --email|--oauth2-googleflow that mints session JWTs at the broker.GET /session/validate— replaced by local cryptographic JWT verification at the broker (already done for/v1/mint-oidc-jwtand/v1/mint-aws-credsper PR feat(stage7): phase 2 — OIDC issuer in Rust broker + provisioner-scripts AWS-cred wiring #61; the legacy validation path remained only because of/v1/auth/exchange).POST /v1/auth/exchange(broker) — backward-compat shim that exchanged a legacy bearer for a session JWT. Withagentkeys init --mock-tokenhard-cut, no in-tree caller remains.POST /session/child/POST /session/revoke/POST /session/recover— all in the legacy bearer flow.BROKER_BACKEND_URL,BROKER_BACKEND_TIMEOUT_SECONDS.Code to remove:
crates/agentkeys-broker-server/src/handlers/auth/exchange.rscrates/agentkeys-broker-server/src/auth.rs::validate_bearer_token+extract_bearer_tokencrates/agentkeys-mock-server/src/handlers/session.rs(validate_session_endpoint, create_session, etc. — verify nothing else needs them)/v1/auth/exchangeroute inlib.rsBROKER_BACKEND_URLconstant + reachability probe inboot.rsVerification gate:
grep -rn "session/create\|session/validate\|auth/exchange" crates/ scripts/ harness/returns empty (excluding doc/comment refs that are explicitly historical).What stays valuable on
:8090after cleanup/dev/*(signer):8092--signer-onlylistener per step 1b/identity/link+/identity/resolve+/v1/wallet/{link,links,recover/lookup}/audit/query(legacy) +plugin_mint_log(broker side)/mock/inbox/*/auth-request/*(pair-flow, master-approval)Open question — identity/audit endpoint placement
The user's proposal (per the conversation that produced #76) is a broker (policy/identity oracle) + signer (execution oracle) split:
In this model:
Trust shape implications:
/dev/*today; this generalizes).Endpoints to relocate / refactor under this model
POST /v1/wallet/linkGET /v1/wallet/linksPOST /v1/wallet/recover/lookup/identity/link+/identity/resolve(mock-server)/v1/wallet/*at broker/audit/querymock-server)/audit/queryat broker side, backed byplugin_mint_logSQLite perarchitecture.md§11)architecture.md§7 — chain/cloud anchors swap in herePOST /dev/submit-anchored-txor similar — wire shape TBD)What this issue should produce
docs/spec/plans/identity-audit-placement.md?) that:Dependencies
Blocks on PR #75 + issue #76 landing first — the cleanup is only safe after the new flow is fully shipped and operators have migrated.
Out of scope
/dev/*is a separate concern./auth-request/*endpoints). Separate issue once a successor for the master-adopts-child-daemon model exists.heima-gaps §5.References
docs/spec/architecture.md— canonical broker/signer/daemon docdocs/spec/heima-gaps-vs-desired-architecture.md