Repository navigation
Conversation
A new top-level agentTokens section, off by default: enabled, and a list of services with name, audience, scope (default openid email) and minTokenScope (default read-write). With the switch on, load fails naming the key when auth.oidc or its client secret file is missing, when no service is listed, when a service's name is empty or repeated, or its audience is empty. minTokenScope must be read, propose or read-write, checked whether or not the switch is on. No message prints a value. token.Scope.AtLeast orders scopes read < propose < read-write < admin and is false when either side is unknown. Nothing reads the section yet. The contracts file gains the AtLeast entry and the plan records the slice's evidence.
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 5: agentTokens config and scope order
An admin can write an
agentTokenssection; it is off by default, and turning it on without what it needs fails at load naming the setting.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 5)
Contracts touched: Platform config file: new top-level
agentTokenssection,token.Scope.AtLeastDepends on: #43
agentTokens: {enabled, services: [{name, audience, scope, minTokenScope}]}, off by default;scopedefaults toopenid email,minTokenScopetoread-write.auth.oidc, no client secret file, no services, an empty or repeated service name, an empty audience.minTokenScopemust beread,proposeorread-writewhether or not the switch is on. No message prints a value.token.Scope.AtLeast:read<propose<read-write<admin, false for an unknown scope on either side.Nothing reads the section yet; the broker slices build on it. An older binary refuses a file that has the section (strict decoding), so set it only after every replica runs this change.
Validation
go test -count=1 ./internal/config/... ./internal/auth/token/...make test-localgo vet ./...