## Problem
The [Personal Access Tokens
guide](https://supabase.com/docs/guides/platform/personal-access-tokens)
says tokens "come in two flavors: Classic tokens … Scoped tokens." The
Select Rewind blog post, the new Personal Access Tokens feature page,
and the launch community posts deliberately avoid that split. They
describe a token as something you scope and treat the full-access token
as an exception you can still create. Readers who follow "see the
Personal Access Tokens documentation" from those pieces land on the
opposite framing.
Three other guides that link to the PAT page also call it a "scoped
personal access token" as if it were a separate product.
## Solution
This PR rewrites the PAT guide around scoping as the default and stops
using "classic" and "scoped" as names for kinds of token. "Scoped"
appears only as a verb or a state ("scope a token", "scoped by
default"). "Legacy" appears only as the literal Dashboard badge.
- **`guides/platform/personal-access-tokens.mdx`**
- Replaces the two-flavors list with an intro that explains scoping
first and the full-access exception (shown with the **Legacy** badge)
second.
- Renames "Create and use a scoped personal access token" to "Scope a
token and use it" and "Use a scoped personal access token with the
Supabase CLI" to "Use a token with the Supabase CLI".
- **`guides/ai-tools/mcp.mdx`**,
**`guides/getting-started/api-keys.mdx`** and
**`guides/deployment/managing-environments.mdx`** reword "scoped
personal access token" to describe a state rather than a token type.
- **`spec/sections/generateAccessControlPartials.mts`** changes the MCP
tools fallback label from "Not available to scoped personal access
tokens" to "Not available to personal access tokens with a scope".
Because no tool hits this branch today, the generated partials don't
change.
The permissions, CLI behavior, `sbp_fc` prefix and examples stay the
same.
## Checklist
Check all before review:
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
## What kind of change does this PR introduce?
Surface the new scoped personal access token permissions published in
`@supabase/shared-types` 0.1.95 (added by
https://github.com/supabase/platform/pull/38060, now deployed).
**Stacked on #50234**, which regenerates the Management API types so
Studio's scope type includes the new ids. This PR targets that branch
and will retarget to `master` when it merges.
## What's in here
- Bump `@supabase/shared-types` to 0.1.95 (Studio and shared-data).
- Catalog entries in
`packages/shared-data/scoped-access-token-permissions.ts`:
- **API Key Secrets** (`api_gateway_keys_secret_read`): gates
`?reveal=true` on the API keys endpoints. Renamed from "JWT secret",
which described the wrong thing.
- **Data API JWT Secret** (`data_api_config_secret_read`): gates the
`jwt_secret` field on the PostgREST config endpoint.
- **Compute** (`workers_read` / `workers_write`): shared-types 0.1.95
also publishes the workers scopes, so they surface in the catalog now.
Named to match Studio's product naming (#50208).
- Minimum roles for the four new ids in `FGA_SCOPE_MINIMUM_ROLE`,
transcribed from the OpenFGA model (secret reads: developer; workers
read: readonly; workers write: developer).
- Docs generator (`generateAccessControlPartials.mts`):
- Drop the workers exclusion now that the scopes are live.
- When an endpoint lists alternative permission sets (for example API
keys read alone, or read plus secret read for reveal), a row's footnote
now only considers the alternatives that include that row's own scope.
Previously the API Key Secrets row would have said "Requires API Keys
(Read), or API Keys (Read) and API Key Secrets (Read)".
- Regenerated PAT guide tables. The committed Management API specs
predate the secret scopes, so this also includes the same spec refresh
the weekly docs bot performs (`chore(docs): refresh the Management API
specs`, kept as its own commit). Besides the new rows it picks up two
new upstream endpoints under Advisors and the branch rows.
## Verified
- `pnpm --filter studio typecheck` clean on top of #50234.
- Access token test suite passes, including the guard that the role
table covers exactly the ids shared-types publishes.
- Partial regeneration is idempotent, so the Docs Tests stale-table gate
passes.
## Follow-ups (not in this PR)
- `apps/docs/content/guides/getting-started/api-keys.mdx` says a
fine-grained token needs `api_gateway_keys_read` for the `?reveal=true`
example. It now also needs `api_gateway_keys_secret_read`.
- `project:api_gateway_keys` still says "Read exposes API keys" in its
risk reason, which overstates it now that secret values sit behind a
separate scope. Rewording may mean revisiting its risk level.
- The comment in `ComputeLayout.tsx` about shared-types not exposing
`workers_read` is stale.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added permission support for API key secrets, Data API JWT secrets,
and compute workers.
* Added API endpoints to run project advisors and create branches.
* Added support for additional log-drain destinations, including S3,
Last9, and OTLP.
* Added storage object versioning information to project configuration
responses.
* **Documentation**
* Updated access-control documentation for new permissions, worker
operations, advisor runs, and branch creation.
* Clarified Data API configuration and secret descriptions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
Add a guide that compares classic and scoped personal access tokens,
explains how account roles constrain token permissions, and walks
through creating and testing a project-scoped token. Include generated
tables mapping permissions to Management API endpoints and MCP tools,
and link the guide from docs navigation and Studio token sheets.
Move the scoped-token permission catalog from Studio into shared-data.
Studio and docs generation now share permission names, categories,
descriptions, risk metadata, modes, scopes, and display order.
Generate the tables from the shared catalog, OpenAPI
x-fga-permissions, and the downloaded MCP permission map. Exclude
Workers permissions until the feature is live.
Run regeneration through the docs Makefile, verify checked-in output in
CI, and refresh it in the weekly Management API workflow. Add Dashboard
and Docs ownership plus contributor guidance so permission changes stay
synchronized.