Skip to content

docs: bring ADR 082 in line with the identity model and accept it - #2864

Merged
IAM-marco merged 5 commits into
mainfrom
feat/2785-align-adr082-with-id-model
Nov 12, 2026
Merged

IAM-marco merged 5 commits into
mainfrom
feat/2785-align-adr082-with-id-model

Conversation

@IAM-marco

@IAM-marco IAM-marco commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Context

Summary

ADR 082 is rewritten in place and set to Accepted. The identity model follows the same names and no longer repeats what ADR 082 now decides. The ADR index row is updated. The ADR ends with a "Changes since proposed" section that lists every change for reviewers. It also lists what the ADR 081 follow-up must amend. ADR 081 is not touched here on purpose.

Decisions recorded in ADR 082:

  1. The name is Application. The API path is /applications, the CLI is zitadel application, and the files are .zitadel/applications/<slug>.json. A client stays a client.
  2. PKCE is required for public clients and optional for confidential ones, following RFC 9700 section 2.1.1. OAuth 2.1 would require it for every client. We deviate so existing confidential clients on the OAuth 2.0 code flow keep working. The server still enforces the PKCE downgrade protections and lists code_challenge_methods_supported.
  3. iss on authorization responses (RFC 9207) stays required. It may land after the first step, because adding it later breaks no client. The metadata advertises it only once it ships.
  4. zitadel application create writes .zitadel/oauth.json when the issuer is off, and says so. zitadel oauth enable stays for doing that alone.
  5. A request without resource gets an access token whose aud is the client id. It is for the client's own backend, and for userinfo once OpenID Connect ships. The old "userinfo only" wording is gone.
  6. The first steps ship an OAuth server only: no ID token, no openid-configuration, EdDSA signing. OpenID Connect comes next, then public clients, then protected APIs and MCP, then services. The sequence section was rewritten.
  7. Declared applications are revisioned on the server, like IdP connections. The release pins one revision. client_id never changes.
  8. Introspection (RFC 7662) is per API, for the clients the API names, and ships in step 5; APIs validate tokens as JWTs until then. Token exchange stays in Later, listed first. A self-registering client is a record of its own that references the application and API of its first resource; the application's document never lists it.
  9. APIs are a config inside the application document. There are no separate files and no separate command.
  10. The Later list names what Applications: resource and access model #1283 still asks for: grants on applications, application status, and team-owned applications.
  11. The risks name the hybrid flow beside implicit and password.
  12. POST /applications creates an application only when its slug is free in the project and revises a registered one only for its owner, never a declared one. Slugs are unique per project across declared and registered applications. The release build refuses a file whose slug a registered application holds. A registered application is resolved live; no release pins it. The developer picks the client secret's variable name.

Validation

  • moon run docs:lint passes.
  • moon run docs:typecheck passes.
  • node scripts/check-pr-title.mjs --title "docs: bring ADR 082 in line with the identity model and accept it" passes.
  • Greps: no .zitadel/apps, zitadel apps, POST /apps, .zitadel/apis or "userinfo only" is left in the two documents. There are no em or en dashes in the new text. Every relative link and anchor in the diff resolves.
  • Reviewed by a ponytail pass, an independent GLM review (opencode-review) and an adversarial Opus read. Accepted findings were applied before this PR.
  • Not run: nothing else. This is docs only.

Release notes / changeset

No changeset required. No shipped behavior changed.

Notes

For #1425. The third acceptance criterion of #2785 asks that the "update through CLI/API" criterion of #1425 read as follows. We propose this wording for the epic's owner to paste:

Application names and OIDC return settings can be updated: the developer's own application by editing its file in .zitadel/applications/ and running zitadel deploy, a registered application through POST /applications; invalid values are rejected with an error identifying the setting and correction needed.

We did not edit #1425.

Answers to the review comment on #2785 (peintnermax's five points):

  1. PKCE and iss: PKCE is optional for confidential clients only and required for public ones. iss is required, and may ship a step later without breaking clients.
  2. application create turns the issuer on when it is off. oauth enable stays.
  3. A request without resource gets an access token with aud = client id. The ID token comes with OpenID Connect.
  4. The Applications: resource and access model #1283 points are named as later work in section 11.
  5. Whether feat: sign in to a server as yourself with zitadel login, for the CLI and MCP clients #2451 is a reference only, and which pieces carry over, is left to the epic owner.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FXFxLQvib4hL15NSTv2STt

ADR 082 is rewritten in place and set to Accepted. The app becomes the
Application, with its clients and APIs in one document. PKCE is required
for public clients and optional for confidential ones (RFC 9700), iss stays
required, a request without resource gets a token for the client's own
backend, and the first steps ship an OAuth server before OpenID Connect.
The identity model follows the same names and loses what ADR 082 now
decides. The ADR index row is updated.

Closes #2785

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXFxLQvib4hL15NSTv2STt
Copilot AI balanced review requested due to automatic review settings November 6, 2026 16:16
@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 9:45am UTC

Request Review

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: c1b2e42

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

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 application-wide party policy can allow self-registering third-party clients to inherit first-party consent exemptions, leaving a critical consent-bypass risk unresolved.

4 open issues
What changed in this PR

This documentation-only PR accepts ADR 082 and aligns it with the identity model, establishing a shared contract for Applications, Clients, and the planned OAuth/OpenID Connect server.

Changes:

  • Standardizes Application naming and documents creation, credentials, stable client IDs, and revision handling.
  • Clarifies the protocol profile and delivery sequence: confidential OAuth clients first, then OpenID Connect, public clients, protected APIs, and MCP.
  • Updates the ADR index and records changes since the proposal and required ADR 081 follow-up work.
File Description
docs/​design/​api/​identity-model.md Aligns terminology and resource lifecycle with ADR 082.
docs/​adrs/​README.md Marks ADR 082 Accepted and updates its summary.
docs/​adrs/​082-oauth-and-oidc-server.md Records the accepted application model, protocol decisions, and delivery sequence.

Review effort: Balanced

Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
…f step 2

Addresses the Copilot review on #2864: the party and consent policy are
fields of each client, so a self-registering client never inherits
first-party from the application it joins; consent names the requesting
client, not the application; a server-generated client id sent back
unchanged is accepted; step 2 serves first-party clients only until
consent ships.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXFxLQvib4hL15NSTv2STt
peintnermax added a commit that referenced this pull request Nov 9, 2026
#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>
@IAM-marco
IAM-marco requested a review from wim07101993 November 9, 2026 09:54

@peintnermax peintnermax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Read against the note in #2860. The decisions here match what the note proposes, and two things I had not asked for make it better: the CLI-generated client_id and the party on each client. Five points inline, one of which I think should change before this is accepted (introspection); the others are wording.

Comment thread docs/design/api/identity-model.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/design/api/identity-model.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
…nd bring back per-API introspection

- Self-registered clients are records of their own that reference an application and an API; deploy never touches them (T1).
- A file whose slug a registered application holds is refused; POST /applications revises only for the owner, and the slug is unique across both paths (T2, T3).
- Per-API introspection is back in the identity model and ships in step 5 (T4).
- Wording: PKCE bullet, #1013 deletion, live registered applications, developer-named secret variable, primary origin, unauthorized_client in step 2, the lane and iss, no registration block in the example (T5 to T12).
- Review fixes: owner and slug wording, introspection amends ADR 037, risks, ADR 081 §12 printed file, identity model leftovers.

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

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 PR description and ADR disagree on introspection support, and the private-API restriction incorrectly excludes registered first-party clients based on how their application is managed.

2 open issues
4 resolved since last review

Review effort: Balanced

Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
Comment thread docs/adrs/082-oauth-and-oidc-server.md Resolved
- ADR 082 §5: a first-party client calls the APIs its application lists, and a third-party client may request only APIs open to third parties.

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

mridang commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

I had a look at this from the CLI DX side and it looks good to me. I like that application create doesn't deploy. Yes, deployment should be explicit.

One of the parts I've noticed (not a blocker) is zitadel oauth enable. Today it's a top-level command, and that's fine for now. The problem is that as we go along, we'll end up with a whole bunch of disparate top-level commands if we don't get a grip on it right now:

  • zitadel oauth enable
  • zitadel saml enable
  • zitadel scim enable

So I would prefix-group them under settings:

  • zitadel settings oauth enable
  • zitadel settings oauth disable
  • zitadel settings saml enable

Alternatively we could group them under config. Either way, other configuration objects can end up under the same group later, and the top level of the CLI stays short. It's the same shape we already use for sign-in methods, for example zitadel auth-method password enable.

This doesn't need to hold up the ADR.

peintnermax added a commit that referenced this pull request Nov 10, 2026
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

Copy link
Copy Markdown
Member

On the CLI grouping: I'd be fine with zitadel settings oauth enable (and disable), with the same group taking SAML and SCIM later. It keeps the top level short and matches auth-method password enable. If that is the call, the note in #2860 and ADR 082 §12 should use the grouped name, so the ADR does not ship with a command the CLI will not have.

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

Copy link
Copy Markdown
Contributor Author

@mridang Thanks, agreed. c1b2e42 renames it to zitadel settings oauth enable in ADR 082 §12 and the "Changes since proposed" list, and in the identity model's CLI row, with a note that later protocol switches share the settings group. ADR 081 still says zitadel oauth enable as a working name; it is on the ADR 081 follow-up list at the end of ADR 082, since that ADR is amended separately. The group does not exist in the CLI yet, so the first switch command creates it.

@IAM-marco

Copy link
Copy Markdown
Contributor Author

@peintnermax Done in c1b2e42: ADR 082 §12 and the identity model now say zitadel settings oauth enable. The #2860 note is yours to align.

peintnermax added a commit that referenced this pull request Nov 11, 2026
#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>

@peintnermax peintnermax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm 👍

@IAM-marco
IAM-marco added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 008c8f9 Nov 12, 2026
25 checks passed
@IAM-marco
IAM-marco deleted the feat/2785-align-adr082-with-id-model branch November 12, 2026 10:51
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Nov 12, 2026

This branch was successfully deployed

1 active deployment
Preview — c1b2e421 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

Archived in project

Development

Successfully merging this pull request may close these issues.

Bring ADR 082 in line with the identity model and accept it

5 participants