Repository navigation
feat(api)!: name the platform issuer's first-party clients in the server's configuration - #3553
Conversation
…ation ADR 094 §8, step 3 of its sequence. A first-party client is asked no consent, so its tokens carry every scope it asks for. On the platform project's issuer the first_party flag of a client's document could be set by whoever publishes an application there; escalation path 9 of the ADR needs that closed before a person may publish one. - oauth.first_party_clients names the clients the platform issuer asks no consent, by client ID; empty by default, and it refuses a client with a metadata document, a blank entry and a client named twice. - The client directory decides the party for consent, the authorization endpoint and the token endpoint alike: on the platform issuer by the setting, on every other issuer by the document's flag. Today no first-party client exists on the platform issuer (the Console signs in with its session cookie, and the platform release declares no application), so nothing changes for a running deployment unless it publishes one; the changeset says how to keep one. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmTQoT7kemXw7jcdBJ3 (cherry picked from commit 45f7861)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 4009656 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 |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ 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.
🟢 Approval recommended
No active review issues block the move to server-configured first-party client controls.
No open issues 🎉
What changed in this PR
Moves the platform issuer’s consent exemption from application flags to server configuration, implementing ADR 094’s first-party client control.
Changes:
- Adds
oauth.first_party_clients, empty by default, with configuration validation. - Applies consistent classification across consent, authorization, and token handling while preserving other issuers’ behavior.
- Adds tests, configuration guidance, and breaking-change release notes.
| File | Description |
|---|---|
docs/quick-start/configuration.md |
Documents the setting and consent behavior. |
docs/operations/nextgen.example.yaml |
Adds the configuration example. |
docs/adrs/094-project-permission-model.md |
Marks the configuration control as built. |
docs/adrs/082-oauth-and-oidc-server.md |
Documents the platform-specific override. |
apps/api/internal/service/client_directory.go |
Centralizes effective first-party classification. |
apps/api/internal/service/client_directory_test.go |
Tests platform and non-platform classification. |
apps/api/cmd/server/server.go |
Wires configuration and its empty default. |
apps/api/cmd/server/server_test.go |
Tests configuration loading and rejection cases. |
apps/api/cmd/server/config.go |
Defines and validates the setting. |
.changeset/platform-first-party-clients.md |
Explains the breaking change and migration. |
Review effort: Balanced
main named the platform issuer's first-party clients in the server's configuration (#3553), in the directory this branch teaches the CLI's client. Both stay: the CLI's client is answered from memory before the first-party list is asked, and it is a client with a document, which is never first-party. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
Context
Step 3 of ADR 094's sequence (§8), closing its escalation path 9. A first-party client is asked no consent, so its tokens carry every scope it asks for. On the platform project's issuer, the
first_partyflag of a client's document could be set by whoever publishes an application there. ADR 094 requires this closed before any later step lets a person publish an application on the platform project.Summary
oauth.first_party_clients: the clients the platform project's issuer asks no consent, by client ID. It is empty by default, and it refuses a client with a metadata document, a blank entry and a client named twice.docs/operations/nextgen.example.yamland the configuration guide document the setting.Validation
Run by the session that wrote the change, in its cloud container:
internal/api/integration_testsuite passes with the change.TestLoadConfigOAuthFirstPartyClients,TestClientDirectory_PlatformFirstPartyClients.Run again when opening this draft, on the commit cherry-picked onto current main:
go build ./...inapps/apigo test ./internal/service/ -run TestClientDirectorygo test ./cmd/server/ -run TestLoadConfignode scripts/check-pr-title.mjs --title "…"Release notes / changeset
.changeset/platform-first-party-clients.md(@zitadel/server, minor, with a Breaking note). On the platform project's issuer an application'sfirst_partyflag no longer skips consent; list the client ID inoauth.first_party_clientsto keep skipping it.Notes
Generated by Claude Code