Repository navigation
feat(api): let a person create personal access tokens for agents and CI - #3563
Conversation
…platform ADR 095 is the record ADR 094 §5 waits for before a PAT is admitted. A PAT belongs to a person homed in the platform project and acts as them, capped by its scopes, on the operations a person's token reaches. It expires within 90 days, is created only from a Console session, and is listed and revoked by its owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf
The user decided that the CLI, the API and MCP matter more than the Console for creating a PAT. So a person's OAuth token may create one with a scope the consent step never preselects, holding no scope that token lacks; a PAT still never creates one, and the creating client is recorded. Scope choice on consent is on main (#3543), which the first draft missed. A PAT is now an opaque 256-bit secret stored as its SHA-256, with its record id and a checksum in the token, so it depends on no key and a copy of the table holds nothing usable. The 90-day limit is to become a policy later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf
Creating a PAT is a marked call with a scope of its own, so ADR 094 §5's rule fits it: the scope is the gate, and the MCP endpoint asks where the client can answer once it asks about marked calls at all. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit c757ba5)
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit bef352c)
PATs are off until personal_access_tokens.enabled switches them on, since they do open a bearer path a server without OAuth did not have, and §7 no longer says otherwise. The create scope is never granted without the consent step, and the MCP endpoint asks before a PAT is created where the client can. A person holds at most 50 live PATs. The risks now name the audience a PAT leaves and the Console session that outlives recovery, with the options and a recommendation for the latter. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 93677b0)
A person homed in the platform project creates a PAT with createMyPersonalAccessToken (POST /users/me/personal_access_tokens), lists and revokes their own with listMyPersonalAccessTokens and revokeMyPersonalAccessToken, from a Console session, an access token issued for them, or (to list and revoke) a PAT (ADR 095). A PAT reads zpat_<id>_<secret><checksum>: a 256-bit random secret whose SHA-256 the tokens record keeps, found by the record id and compared in constant time; a wrong checksum is refused before any read. The API and the MCP endpoint take it on the operations an access token issued for a person reaches, through the same gate: its owner is the principal, its scopes a ceiling on the owner's grants at each call, and a refusal names the scope. It expires within 90 days and stops while its owner is not active. Creating one with an access token needs personal_access_token.create, which consent never preselects; the PAT holds no scope that token lacks and records its client. A PAT never creates one. Events of a PAT's calls name the owner as a human actor, the PAT as token_id and pat_shared as delegation_type. tokens gains name, secret_hash and client_id in the three dialects. The MCP tool list budget is raised by the three tools' 3,700 bytes until the change that makes room in it lands. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 442a041)
…client A first-party client is asked no consent, so it would be granted personal_access_token.create unasked, and with it a credential that outlives its grant. The scope is now granted only on the consent step, whoever the client is. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit edec824)
…ault PATs were served wherever the platform project is, outside oauth.enabled, so a server that took no person's bearer before would take a PAT after. personal_access_tokens.enabled (NEXTGEN_PERSONAL_ACCESS_TOKENS_ENABLED) now switches them on, off by default as oauth.enabled is. Off, the three operations answer not_implemented and a zpat_ bearer is refused as an unknown one. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 55f1699)
…pired A credential that is only ever added to is one nobody reviews. Creating a 51st live PAT is refused with tkn.pat_invalid until the person revokes one. Expired rows stay until a purge, which is a follow-up, and are not counted. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 234fa22)
A PAT leaves the audience of the token that created it: a token issued for the MCP endpoint creates one through the endpoint, and the PAT then answers on the API directly, where the endpoint's questions do not reach. createMyPersonalAccessToken is now marked x-zitadel-asks: the endpoint asks the person where the client can ask them, and sends the call where it cannot, its own scope, ticked on purpose, being the gate (ADR 094 §5). The tool says so, at 84 bytes, which the list budget's raise now counts. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 3b94cf2)
The endpoint now asks before createMyPersonalAccessToken where the client can ask, so the agent's client in the integration test answers as its person would, and the test holds that the person was asked. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 6cc66fb)
A project secret's scopes cover the three operations on a person's own PATs, so the MCP endpoint listed them as tools that could only be refused. No secret is anyone's person: Covers now passes them over for a secret. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 4d64c49)
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 6108cd1)
A PAT is persisted only with its secret's hash, and the Postgres dialect's own token test still created one without it, which the Postgres lane refused. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (cherry picked from commit 5c38672)
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmS8uCXd1d5jCxWaiSf (the ADR part of commit 36bd497ba2, whose renames of CLI files belong to the CLI change)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 377ba57 The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…not call yet The CLI's coverage test holds that every operation the API client offers is called by a command or explained. The three personal access token operations are a person's own, and the CLI holds a project secret until it can sign a person in, so they are explained here. The CLI's sign-in and its token commands, which call them, are their own change on top of this one and take the explanation out again. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 561767b8a4
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
| security: | ||
| - oauth2: | ||
| - personal_access_token.create | ||
| - sessionCookie: [] |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Security: Require reauthentication before a session mints a PAT
Condition: personal access tokens are enabled and an attacker controls an active platform-user session. The new sessionCookie alternative mints a PAT without fresh authentication or step-up. The PAT is an independent record valid for up to 90 days; verification checks its row, expiry, scopes, grants, and active owner, while session revocation deletes only tokens carrying that session ID. Cookie theft or same-origin script execution can therefore create a bearer that survives sign-out/recovery and retains the victim's cross-project grants. Require recent reauthentication for issuance and invalidate PATs during account recovery.
Useful? React with 👍 / 👎.
…-api main chose tool sets by URL (#3555): the catalog keeps this branch's asksWhereItCan beside main's tags, and the one budget on the tool list gives way to main's three checks. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
main holds this branch's base, ADR 095, as one squash commit (#3548). Its tree is the base's final head merged with the main before it, which this branch already holds, so the squash is recorded as merged and nothing changes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
main gained a person's own reads (#3559), the client secret's rotation (#3561), the session type (#3551) and the CLI's client document (#3558). The personal access token migrations move behind the session type's (Postgres 64, Spanner 68, SQLite 51). A secret is refused on a person's own reads and on their personal access tokens alike, and the server's code is generated again from the merged spec. The tool-set tests expect the three token tools in the users set. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
The spec marks createMyPersonalAccessToken, listMyPersonalAccessTokens and revokeMyPersonalAccessToken x-zitadel-self, as it marks a person's own reads: the CLI, which holds a project secret, refuses them with its own reason, and the docs show a token issued for the person in their samples. The API passes a secret over on them before it is looked at, as on a person's own read, so the request is answered as one that sent no bearer. They stay a class of their own in the contract tests, since they name no project. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
main gained a person's own sessions (#3560). The server's code is generated again from the merged spec, the tool-set tests expect both changes' tools in the users set, and ADR 092's measured figures count the three token tools: 91 on a plain URL, and 52 tools, 68,271 bytes, on the list a default consent yields. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
There was a problem hiding this comment.
🟡 Changes recommended
The live-PAT limit can be bypassed by concurrent creates or the newest-500 counting window, and declared API errors lose operation-specific variants in generated clients.
3 open issues
What changed in this PR
Implements ADR 095 personal access tokens, giving agents and CI scoped access as a person rather than through a project secret.
Changes:
- Adds token creation, listing, revocation and authentication, disabled by default.
- Integrates consent, MCP confirmation, audit events and storage across three database dialects.
- Updates API contracts, generated Go code, tests and documentation.
| File | Description |
|---|---|
packages/go/api/oas_validators_gen.go |
Generates PAT validation. |
packages/go/api/oas_security_gen.go |
Adds PAT authentication mappings. |
packages/go/api/oas_request_encoders_gen.go |
Encodes creation requests. |
packages/go/api/oas_parameters_gen.go |
Adds list and revoke parameters. |
packages/go/api/oas_operations_gen.go |
Adds operation names. |
packages/go/api/oas_interfaces_gen.go |
Adds response interfaces. |
packages/go/api/oas_cfg_gen.go |
Adds token-ID validation pattern. |
docs/quick-start/configuration.md |
Documents the feature switch. |
docs/operations/nextgen.example.yaml |
Shows disabled-by-default configuration. |
docs/design/api/identity-model.md |
Clarifies the implemented identity model. |
docs/design/api/events-catalog.md |
Documents PAT audit events. |
docs/adrs/092-mcp-server.md |
Updates tool counts and budgets. |
apps/docs/content/docs/guides/personal-access-tokens.mdx |
Adds the PAT usage guide. |
apps/docs/content/docs/guides/meta.json |
Links the new guide. |
apps/console/src/features/sign-in/consent-texts.ts |
Adds translated consent labels. |
apps/cli/tests/unit/cli/commands/api-coverage.test.ts |
Records deferred CLI operation coverage. |
apps/api/internal/storage/stmttest/token_test.go |
Tests PAT persistence and ownership. |
apps/api/internal/storage/stmttest/schema_nullability_test.go |
Checks nullable token names. |
apps/api/internal/storage/stmttest/cursor_battle_test.go |
Updates PAT pagination fixtures. |
apps/api/internal/storage/dialect/sqlite/token.go |
Persists PAT fields in SQLite. |
apps/api/internal/storage/dialect/sqlite/migration/sql/000051_personal_access_tokens.sql |
Adds SQLite PAT columns. |
apps/api/internal/storage/dialect/spanner/token.go |
Persists PAT fields in Spanner. |
apps/api/internal/storage/dialect/spanner/migration/sql/000068_personal_access_tokens.sql |
Adds Spanner PAT columns. |
apps/api/internal/storage/dialect/postgres/token.go |
Persists PAT fields in PostgreSQL. |
apps/api/internal/storage/dialect/postgres/token_test.go |
Updates PAT persistence fixtures. |
apps/api/internal/storage/dialect/postgres/migration/sql/000064_personal_access_tokens.sql |
Adds PostgreSQL PAT columns. |
apps/api/internal/service/personal_access_token.go |
Implements PAT lifecycle and verification. |
apps/api/internal/service/flow_auth_request.go |
Requires consent for PAT creation scope. |
apps/api/internal/service/flow_auth_request_test.go |
Tests first-party consent requirements. |
apps/api/internal/mcp/sets_test.go |
Tests PAT tool-set membership. |
apps/api/internal/mcp/handler.go |
Adds capability-dependent confirmation. |
apps/api/internal/mcp/handler_test.go |
Tests PAT creation confirmation. |
apps/api/internal/mcp/catalog.go |
Reads the confirmation marker. |
apps/api/internal/mcp/catalog_test.go |
Pins confirmation and credential markers. |
apps/api/internal/domain/token.go |
Adds PAT record fields and validation. |
apps/api/internal/domain/token_test.go |
Tests PAT record requirements. |
apps/api/internal/domain/personal_access_token.go |
Defines token format and constraints. |
apps/api/internal/domain/personal_access_token_test.go |
Tests generation, parsing and constraints. |
apps/api/internal/domain/event_payload.go |
Adds issuance type and expiry. |
apps/api/internal/domain/consent_scope.go |
Marks creation scope as consent-required. |
apps/api/internal/api/security.go |
Authenticates PATs with person-scoped access. |
apps/api/internal/api/personal_access_token.go |
Implements the three API handlers. |
apps/api/internal/api/integration_test/helpers/token.go |
Provides the PAT service helper. |
apps/api/internal/api/integration_test/helpers/server.go |
Wires PAT integration-test services. |
apps/api/internal/api/handler.go |
Adds the PAT service dependency. |
apps/api/internal/api/generated/oas_validators_gen.go |
Generates server-side validation. |
apps/api/internal/api/generated/oas_unimplemented_gen.go |
Adds generated handler stubs. |
apps/api/internal/api/generated/oas_server_gen.go |
Extends the server interface. |
apps/api/internal/api/generated/oas_security_gen.go |
Generates authentication mappings. |
apps/api/internal/api/generated/oas_response_encoders_gen.go |
Encodes PAT responses. |
apps/api/internal/api/generated/oas_request_decoders_gen.go |
Decodes creation requests. |
apps/api/internal/api/generated/oas_parameters_gen.go |
Decodes list and revoke parameters. |
apps/api/internal/api/generated/oas_operations_gen.go |
Adds server operation names. |
apps/api/internal/api/generated/oas_interfaces_gen.go |
Adds server response interfaces. |
apps/api/internal/api/generated/oas_cfg_gen.go |
Adds token-ID validation pattern. |
apps/api/internal/api/error_handler.go |
Maps PAT errors to HTTP statuses. |
apps/api/internal/api/authz_ungated_contract_internal_test.go |
Classifies own-credential operations. |
apps/api/cmd/server/server.go |
Wires services behind the feature switch. |
apps/api/cmd/server/config.go |
Defines PAT configuration. |
apps/api/cmd/server/config_test.go |
Tests defaults and environment configuration. |
apps/api/api/openapi/security/oauth2.yaml |
Declares PAT scopes. |
apps/api/api/openapi/openapi-spec.yaml |
Registers PAT routes. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/personal-access-token.yaml |
Defines public token metadata. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/methods.yaml |
Defines creation and listing contracts. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/listMyPersonalAccessTokens-error-response.yaml |
Generates listing error variants. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/list-personal-access-tokens-response.yaml |
Defines paginated listing responses. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/createMyPersonalAccessToken-error-response.yaml |
Generates creation error variants. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/create-personal-access-token-response.yaml |
Defines the one-time token response. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/create-personal-access-token-request.yaml |
Defines creation inputs and limits. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/by_id/revokeMyPersonalAccessToken-error-response.yaml |
Generates revocation error variants. |
apps/api/api/openapi/endpoints/users/me/personal_access_tokens/by_id/methods.yaml |
Defines the revocation contract. |
apps/api/api/openapi/endpoints/events/payloads/auth-token-issued-payload.yaml |
Extends issuance event metadata. |
apps/api/api/openapi/components/schemas/personal-access-token-id.yaml |
Defines the PAT identifier schema. |
apps/api/api/openapi/components/schemas/errors/tkn-pat_owner_not_platform.yaml |
Generates the owner restriction error. |
apps/api/api/openapi/components/schemas/errors/tkn-pat_not_found.yaml |
Generates the missing-token error. |
apps/api/api/openapi/components/schemas/errors/tkn-pat_invalid.yaml |
Generates the invalid-request error. |
apps/api/api/openapi/components/parameters/personal-access-token-id.yaml |
Defines the revocation path parameter. |
apps/api/api/openapi/components/examples/errors/tkn-pat_owner_not_platform.yaml |
Adds an owner restriction example. |
apps/api/api/openapi/components/examples/errors/tkn-pat_not_found.yaml |
Adds a missing-token example. |
apps/api/api/openapi/components/examples/errors/tkn-pat_invalid.yaml |
Adds an invalid-request example. |
apps/api/api/openapi/AGENTS.md |
Documents the MCP confirmation marker. |
.changeset/personal-access-tokens.md |
Adds server and API release notes. |
Review effort: Balanced
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: ../../../../components/error-details.yaml |
| err = s.pool.Transaction(ctx, func(ctx context.Context, tx Statementer[AllStatements]) error { | ||
| if err := s.underTheCap(ctx, tx.Statements(), record.UserID); err != nil { | ||
| return err | ||
| } | ||
| if err := tx.Statements().CreateToken(ctx, record); err != nil { |
| // underTheCap refuses a PAT to a person who holds | ||
| // [domain.PersonalAccessTokenMaxLive] that have not expired. Expired ones | ||
| // stay until they are purged, so they are read and passed over, not counted. | ||
| func (s *personalAccessTokenService) underTheCap(ctx context.Context, stmts AllStatements, userID string) error { | ||
| newest, err := stmts.ListTokens(ctx, &database.ListOptions[domain.TokenField]{ | ||
| Filter: database.And( | ||
| database.Equal(database.Col(domain.TokenFieldProjectID), s.platformProjectID), | ||
| database.Equal(database.Col(domain.TokenFieldUserID), userID), | ||
| database.Equal(database.Col(domain.TokenFieldType), domain.TokenTypePersonalAccessToken.String()), | ||
| ), | ||
| Pagination: database.Page[domain.TokenField]{ | ||
| Limit: capWindow, | ||
| OrderBy: database.OrderBy[domain.TokenField]{ | ||
| Columns: []database.Column[domain.TokenField]{database.Col(domain.TokenFieldCreatedAt), database.Col(domain.TokenFieldTokenID)}, | ||
| Direction: database.OrderDesc, | ||
| }, | ||
| }, | ||
| }) | ||
| if err != nil { | ||
| return mapListError(err, "failed to count personal access tokens") | ||
| } | ||
| now, live := s.now(), 0 |
main holds this branch's bases as squash commits: the personal access token API (#3563), and before it ADR 095 (#3548) and the CLI's client document (#3558). The token API's squash has the tree of its branch's final head, which this branch already holds, so it is recorded as merged and nothing changes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
Brings in main with personal access tokens (#3563), so PR 2 can stack on the ADR's branch. A scope granted only on the consent step (personal_access_token.create, domain.ConsentRequired) is never remembered and always shows the step, to a first-party client too; the ADR says so. Generated files regenerated; sets_test lists both the token tools and listMyConsents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…check main gained personal access tokens (#3563) beside everything this branch's base already held. The server and the test harness wire both the operators' flag and the token service. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U

Context
An agent with no person at the keyboard (a CI job, a scheduled task, a coding agent in a cloud container) could reach the management API and the MCP endpoint only with a project secret, which stands for every scope, cannot be narrowed and names no person in events.
Summary
/users/me/personal_access_tokens:createMyPersonalAccessToken,listMyPersonalAccessTokens,revokeMyPersonalAccessToken.personal_access_tokens.enabled(NEXTGEN_PERSONAL_ACCESS_TOKENS_ENABLED) turns them on. Off, the three operations answer 501 and azpat_bearer is refused. The cloud launcher does not turn it on.zpat_<id>_<secret><checksum>. The secret is 256 random bits; the tokens record keeps its SHA-256 and compares in constant time. A bad checksum is refused before any read.admitPersonToken). The owner is the principal, and the PAT's scopes cap what the owner holds on each call. An expired or revoked PAT, or one whose owner is not active, answers 401.personal_access_token.create. Consent never preselects that scope, and a first-party client is asked for it too. The PAT holds no scope that token lacks and records the token's client. A PAT never creates a PAT. A person holds at most 50 that have not expired.x-zitadel-asks, carries that mode for this one operation;TestCatalogMarksWhatIsAskedWhereTheClientCangates which operations carry it. A project secret is shown none of the three tools.actor_typehuman,token_idthe PAT,delegation_typepat_shared.auth.token.issuedgainstypeandexpires_at.tokensgains nullablename,secret_hashandclient_id.guides/personal-access-tokens.mdx), rows in the events catalog, the setting innextgen.example.yamland the configuration guide, and a pointer from the identity model draft.Validation
Run by the session that wrote the change, in its cloud container, on its working branch (which also held the CLI's commits):
stmttestsuites and every API integration test pass.stmttestsearch tests fail the same way on a clean main under the emulator, and three more time out only under full-suite load and pass alone, as on main.turbo run generate,check-generateandopenapifor the server, andpnpm run check-openapi-rules, pass.full-prwas green on that working branch's last head (feat(api): let a person create personal access tokens for agents and CI #3556 at609f1eef1), whose tree the stack of this pull request, feat(api): serve the CLI's client document on the platform issuer #3558 and the CLI's reproduces exactly. The Spanner lane (spanner.yml, Spanner Omni) is not one of a pull request's checks and has not run.Run again when opening this draft, on the nine commits cherry-picked onto the ADR branch:
go build ./...andgo vetofinternal/api,internal/mcp,internal/servicego test ./internal/api/ ./internal/domain/ ./internal/service/ ./internal/mcp/ ./internal/oauth/andgo test ./cmd/server/ -run 'PersonalAccessToken|Config|OAuth'go test -tags sqlite_integration ./internal/api/integration_test/ -run 'PersonalAccessToken|MCP'and the token statements on SQLitenode scripts/check-pr-title.mjs --title "…"api-coverage.test.tspasses, 9 tests; Biome clean on the file); feat: sign in from the CLI, and create personal access tokens with it #3564 takes the explanation out again.Release notes / changeset
.changeset/personal-access-tokens.md(@zitadel/serverand@zitadel/api, minor).Notes
userstool set, which makes 91 on a plain URL under the ceiling of 100, and 52 tools, 68,271 bytes, on the list a default consent yields, under its budget of 80,000 (feat(api): let an MCP client choose tool sets, and reads only, by its URL #3555's three checks; the raise of the one budget this change first made is gone).x-zitadel-self, as it marks a person's own reads (feat(api): let a person's token read who they are and which projects they can act on #3559): the CLI, which holds a project secret, refuses them with its own reason, and the docs' samples show a token issued for the person. The API passes a secret over on them before it is looked at, so the request is answered as one that sent no bearer. In the contract tests they stay a class of their own, since they name no project.000064, Spanner000068and SQLite000051, behind refactor(api): add the session type to the permission catalog #3551's. The open webhooks drafts refactor(api): add storage for a project's webhooks #2987 and feat(api): deliver a project's events to its webhooks, signed #2991 use numbers below these; whoever merges later renumbers.x-zitadel-self, foldpersonalAccessTokenOperationsintopersonOwnOperations, and move them toselfServiceOperations. Until then the CLI'sapicommand reads their auth assecret.https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
Generated by Claude Code