Skip to content

docs: propose one OAuth server for customers' applications and Zitadel's own clients - #2860

Open
peintnermax wants to merge 13 commits into
mainfrom
claude/oauth-server-integration-note
Open

peintnermax wants to merge 13 commits into
mainfrom
claude/oauth-server-integration-note

Conversation

@peintnermax

@peintnermax peintnermax commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Context

Summary

  • Adds a design note, docs/design/api/oauth-server-integration.md, marked "Draft for discussion". It is an investigation, not a decision record.
  • One server, two issuers. The authorization server stays in the Zitadel binary and is switched on per project. A customer's project comes first (OAuth: per-project authorization server switch and metadata #2793); the platform project then turns the same server on, with three differences the note lists.
  • How the parts talk. A diagram of the eight calls between client, login page, flow engine, authorization server and protected resource, and who plays each part for a customer and for Zitadel itself.
  • Wiring the platform project. The server, applications and resource servers each have their own home. The zitadel application ships as a document in the release the server already builds at start, instead of Go code.
  • The epic and the two prototypes. Each of Applications: create and read registered applications with their OAuth clients #2788 to OIDC: ID token and discovery #2801 beside what feat: add apps with their OAuth clients and APIs, and zitadel apps create #2452 and feat: sign in to a server as yourself with zitadel login, for the CLI and MCP clients #2451 built, and what differs: names (application against app), one project against per project, and opposite halves of the token endpoint.
  • Where the prototypes leave Applications: resource and access model #1283's model open: access to an application, the client as a principal, team-owned applications, the scope ceiling and deactivation.
  • Scope: which apps become the issuer. Apps on a server framework can; SPAs stay embedded logins for now. What the SDK forwards, and what the CLI refuses.
  • OAuth only in the first iteration, as the epic has it since 2026-11-06: no ID token and no openid-configuration, and an access token whose audience is the client. OpenID Connect is a later layer, and the first thing to return.
  • Follows ADR 082 as docs: bring ADR 082 in line with the identity model and accept it #2864 rewrites and accepts it (2026-11-10, including its second round: self-registered clients as records of their own, introspection per API in step 5, third-party clients refused until consent ships, and the switch named zitadel settings oauth enable): PKCE required for public clients only, iss required but allowed after the first step, application create turning the issuer on, APIs inside the application document. That settles D2 and D9 and answers open questions 2 and 3.
  • How an MCP client's consent runs, as a step inside the one flow that answers the authorization request, and whether a user may allow part of a request (open question 12, with Stripe's per-resource consent as the other design).
  • Nine decisions to take first (D1 to D9, each with the ADR or issue it belongs in and its state), fifteen challenges, what ships to customers per package, a sequence (steps 1 to 4 are the epic's first scope) and twelve open questions, each with where it was raised.

Validation

  • Every relative link in the note resolves on origin/main.
  • node scripts/check-pr-title.mjs --title "docs: propose one OAuth server for customers' applications and Zitadel's own clients"
  • Not run: nothing in the note was executed. It reads main, the two PR branches and the issues as of 2026-11-06. The Mermaid block was not rendered locally.

Release notes / changeset

  • No changeset required — no shipped behavior changed.

Notes

🤖 Generated with Claude Code

…l's own clients

A design note for discussion, docs/design/api/oauth-server-integration.md.
It reads ADR 081, ADR 082, the identity model, #1283, the #1425 epic and the
two prototype PRs (#2452, #2451) against main, and says how the customer's
authorization server and the platform project's become one, switched on per
project.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Nov 11, 2026 10:25am UTC

Request Review

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: df8c3c5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

#2785 settles Application as the name and takes #2452 as a reference only,
so those two stop being open questions. The note now also records that
#2785 and #2794/#2795 disagree on PKCE and `iss`, that `application create`
deploys nothing and the developer sets a declared client's secret, and asks
whether `application create` turns the issuer on.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A review against the issues, the ADRs and the code found claims that had
gone stale and contradictions that live in the ADRs and issues rather than
in the note. The note now:

- corrects the PKCE and iss conflict (only #2795 and the ADRs still
  require them), the library's authorize, and openid in #2451's metadata;
- lists six decisions with their owners: a stored issuer, the response to
  a request without resource, registration as a project switch, the sealed
  request as an ADR 081 amendment, prompt=login and max_age, and what must
  hold before the platform project's issuer goes on;
- moves the ID token and discovery into the first scope's server step and
  gates the platform project on those preconditions;
- adds the cloud origin shared with the website, the platform issuer
  following public_base, sign-out, audit, limits and key rotation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peintnermax and others added 3 commits November 6, 2026 13:47
…r note

#1425 dropped OpenID Connect from its first scope on 2026-11-06 (#2801):
no ID token, no openid-configuration, an access token whose audience is
the client (#2796), signed with the project's EdDSA key (#2797), and an
end-to-end lane with an OAuth library (#2806). The note follows: D2 is
settled, the sequence is OAuth only with OpenID Connect first among what
returns, and it says what the iteration costs. D1 gains what #2793's
derived issuer does and does not cover.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…card

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ards

D1 no longer proposes an issuer stored in oauth.json. Origins are project
data a customer changes without a deploy, a staging origin is meant to be
an issuer, and a domain move needs two issuers side by side. #2793's rule
stays, with three guards: the code records its issuer, origin-dependent
answers are never stored by a shared cache, and the customer sees which
origins are issuers and is warned before removing one, in the CLI now and
in the console later.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…three

The decisions table gains a state column for 2026-11-06, and each open
question names where it was raised. Three decisions that were only remarks
inside the challenges become D7 to D9: one cookie per flow, where the
cloud's routing rules live, and whether EdDSA alone is enough for the first
iteration. D3 no longer reads as blocking the first scope.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
#2864 rewrites ADR 082 and sets it to Accepted. The note now records what
that settles: PKCE required for public clients and recommended for
confidential ones, `iss` required but allowed to ship after the first
step, `application create` turning the issuer on when it is off, APIs as
entries of the application document, the self-registering client joining
the application of its first `resource`, and ADR 082's sequence. D2 and
D9 are settled, open questions 2 and 3 answered, and D4 and D7 noted as
missing from the ADR 081 amendments #2864 lists.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Consent is a step inside the one flow that answers the authorization
request, not a round trip of its own; the note now walks through it,
what a later request and a revocation do, and that #2451's step is all
or nothing. Stripe's MCP consent stands for the other design, a
per-resource selection, and what Zitadel would need for it. Open
question 12 asks whether a user may allow part of a request.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A self-registering client is a record of its own that references the
application and API of its first resource, introspection comes per API
in step 5 for the clients an API names, and until consent ships the
server refuses third-party clients with unauthorized_client.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@peintnermax
peintnermax marked this pull request as ready for review November 10, 2026 07:51
Copilot AI balanced review requested due to automatic review settings November 10, 2026 07:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The design document still misrepresents existing audit events, the agreed login approach, missing security acceptance criteria, and the API mock’s licensing and publication status.

4 open issues
What changed in this PR

Adds a draft design note proposing one per-project OAuth server for customer applications and Zitadel’s own CLI and MCP clients. It connects the application model and OAuth epic to the two prototypes without changing shipped behavior.

Changes:

  • Describes shared request flows, issuer differences, and platform-project configuration.
  • Compares prototype capabilities with the epic’s OAuth-only first scope and later OpenID Connect support.
  • Outlines SDK and CLI responsibilities, unresolved decisions, risks, and a proposed delivery sequence.
File Description
docs/​design/​api/​oauth-server-integration.md Adds the integration proposal, prototype comparison, and phased implementation plan.

Review effort: Balanced

Name #2451's consent events and the gaps that remain, separate the
published test kit from the private API mock and its license, record
the agreed login approach in the first-scope steps, and make the audit
and limit criteria an explicit task of step 3.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
peintnermax and others added 2 commits November 11, 2026 11:22
#2864 groups the switch under a new `settings` group that later
protocol switches share. The note follows, and credits the PKCE
downgrade rule to RFC 9700 now that ADR 082 §2 no longer spells it out.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
fforootd pushed a commit that referenced this pull request Nov 30, 2026
The pieces a person's token on /mcp needs were built once in the closed
prototype #2451, are read against the epic in #2860, and public clients are
being built again in #3409.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U

This branch was successfully deployed

1 active deployment
Preview — df8c3c5b Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants