Repository navigation
Conversation
Five routes let people and admins manage agent access from a browser
session:
- GET and DELETE /api/auth/agent-access: a person sees whether their
coding agents can act for them, and turns that off until their next
sign-in.
- GET, DELETE and DELETE .../block under /api/admin/people/{name}/
agent-access: a platform admin looks up a person's agent access,
revokes it until they allow it again, and allows it again.
Every route refuses API tokens of any scope, both in the session-only
list and in each handler, and no body ever carries a token. Revokes and
blocks go through the broker, which writes the audit rows. With the
switch off the routes answer enabled false and change nothing.
A wiring test now checks that a service's minTokenScope reaches the
broker. The OpenAPI document and the UI's generated client are
regenerated. contracts.md and the plan's evidence, checkpoint review and
deviations are updated.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 16: Agent-access routes
A person can see and turn off their own agent access, and an admin can look up, revoke and allow again another person's, from a browser session only, with audit rows and never a token in a response.
Spec: nebari-dev/tapas/docs/superpowers/specs/2026-11-30-agent-token-broker-design.md
Plan: nebari-dev/tapas/docs/superpowers/plans/2026-12-01-agent-tokens-and-frames.md (Slice 16)
Contracts touched:
GET /api/auth/agent-access,DELETE /api/auth/agent-access,DELETE /api/admin/people/{name}/agent-access,DELETE /api/admin/people/{name}/agent-access/block,GET /api/admin/people/{name}/agent-access,authn.sessionOnlyRoutesgains the agent-access pathsDepends on: #67
{enabled, active, blocked, since}; revoke until next sign-in (204 either way).RegisterAdmin,ActAdminConsole): look up, revoke and block until allowed, allow again;{name}is the identity name.sessionOnlyRoutesand a check in each handler. No token or sealed value in any body. Audit rows from the broker.enabled: false, nothing read or changed.ui/openapi.jsonandui/src/api/regenerated.Validation
go test -count=1 ./internal/gateway/...make openapi && cd ui && pnpm gen:api && git diff --statui/openapi.jsonandui/src/api/change; committedcd ui && pnpm typecheck && pnpm testpnpm testlocally times out in unrelated files under parallel load (they pass alone); this PR's UI workflow is the checkmake test-local