Namespaces

A namespace groups deployments, and a token minted for a namespace reaches only the deployments in it — a key to one room, not a list of ids that goes stale.

On a deployment

One field. Absent means "default", so a fleet that never says the word keeps behaving as one namespace and nothing changes on the wire or on disk:

{ "id": "web", "namespace": "team-a", "routes": [ … ], … }

Namespace names share the deployment-id alphabet (letters, digits, - _ .) because they appear in URLs and filenames unescaped.

On a token

serverctl token mint team-a-operator --admin admin --namespace team-a

A namespace-confined token behaves differently from a plain deployment-scoped one, and the differences are the point:

What a namespace admin token can do

A token minted with --admin admin --namespace team-a is a self-service operator for that namespace:

Filtering

# everyone can filter listings by namespace
GET /deployments?namespace=team-a

serverctl get deployments        # serverctl passes your token's view through
Data-plane gates compose with namespaces: a deployment's auth gate with the app-token provider admits a namespace token only if the deployment is inside that token's namespace. The same 401 covers "wrong secret", "expired", and "wrong namespace" — probing the gate teaches nothing about which it was.