Skip to content

docs: decide remembered consent for OAuth clients - #3573

Merged
fforootd merged 4 commits into
mainfrom
claude/remembered-consent-adr
Dec 2, 2026
Merged

fforootd merged 4 commits into
mainfrom
claude/remembered-consent-adr

Conversation

@fforootd

@fforootd fforootd commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Context

Summary

A person who connected an agent was asked the same consent question every time it signed them in, because nothing stored their answer. This decides what is remembered and when the step is skipped:

  • What is remembered: one consent per person, client and API, with the person's answer for every scope they were offered, granted or declined, the session they answered in, and a digest of the client as the server read it.
  • A client whose identity is assured skips the step once the person has answered for every scope it asks for and granted at least one API scope. Assured means it authenticates with a secret or key, or its answer goes to an https host that is not a loopback address.
  • Any other client is asked each time, with the last choice ticked, except that delete scopes start unticked. A client without a secret that returns to the person's own device (a loopback address in any spelling, a private-use scheme) can be presented by any program there, so remembering only ticks the lines (RFC 8252 §8.6). The CLI and most local MCP clients are in this group.
  • The step is shown again for a scope the person has not answered for, a changed client, prompt=consent, and a consent older than 90 days. Skipping does not renew it. A consent given to a client whose registration has since changed counts as none.
  • Some scopes are never remembered and always show the step: a scope of an operation marked x-zitadel-returns-secret, and the scope that creates a personal access token. So a client that asks for every scope the metadata lists, as MCP clients do, is asked at every sign-in until credential-returning operations have a scope of their own.
  • A person lists and revokes their consents. Revoking ends every refresh grant and unredeemed code the client holds for that person. A password set for the person ends their consents too.

Validation

  • Docs only. node scripts/check-pr-title.mjs --title "…" passes.

Release notes / changeset

  • None: an ADR amendment.

Notes

  • Open, to decide with the policy work (ADR 066): how long a consent lasts and whether using it renews it (90 days from the person's last answer until then, as agreed for now), and what a password set ends (today the person's consents and the clients' grants, in every project).
  • Condition before the skip is switched on for the hosted cloud: a person must reach revoke from the Console; today only the API does.
  • Reviewed with the code (feat(api): remember a person's OAuth consent, and let them list and revoke it #3574): the amendment's text is the one the review's findings and the owner's three decisions led to.
  • Open for ADR 095: whether revoking a consent also revokes the personal access tokens created through that client. Nothing yet records which consent a token was created under.
  • Not decided here: consent events and a consent's delegation_id, and keying a consent by API rather than by the identifier the request named.
  • The commits were written in the session https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf and cherry-picked onto main by the coordinating session below, which opened this draft.

https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U


Generated by Claude Code

Amend ADR 082 (Proposed): a consent is remembered per person, client and
API. A client whose identity is assured (a secret, or an https answer)
skips the step for what it was granted; a client that returns to a
loopback address or a private-use scheme is asked each time with the
last choice ticked. Scopes of operations that return a credential are
never remembered. A person lists and revokes their consents, and a
revoke ends the client's refresh grants. ADR 092 points to it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…o the policy work

A remembered consent holds the person's answer for every scope offered,
yes or no, so a client that asks for everything skips the step once the
person answered, and is issued the scopes answered yes. A scope that is
never remembered no longer forces the step: a skip does not issue it.
A declined scope is asked for again with prompt=consent after the API's
auth.scope_insufficient refusal. How long a consent lasts, and whether
use renews it, is left open for the policy work; the me operations
become two tools once #3559 lands.

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

vercel Bot commented Dec 2, 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 Dec 2, 2026 6:57pm UTC

Request Review

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: 6c08b39

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

The amendment as the code's pull request now has it: a consent given to a client whose registration has changed counts as none; a revoke also ends the client's unredeemed codes; a request that names a scope that is never remembered always shows the step, so a client that asks for every listed scope is asked each time; delete scopes start unticked on the person's device; a password set ends the person's consents; and what a password set ends, like a consent's lifetime, is left to the policy work. A person reaching revoke from the Console is a condition before the skip is switched on for the hosted cloud.

The text was written in the session https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf and is taken from its branch unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
@fforootd
fforootd marked this pull request as ready for review December 2, 2026 19:25
Copilot AI balanced review requested due to automatic review settings December 2, 2026 19:25
@fforootd
fforootd added this pull request to the merge queue Dec 2, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-12-02T19:31:37.675749Z 6c08b39 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Merged via the queue into main with commit 95aa0e9 Dec 2, 2026
18 of 19 checks passed
@fforootd
fforootd deleted the claude/remembered-consent-adr branch December 2, 2026 19:28
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Dec 2, 2026

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 ADR still contains contradictions about consent re-prompt timing, mandatory first-party PAT consent, and whether PAT records retain the creating client or consent association.

3 open issues
What changed in this PR

This docs-only PR proposes remembered OAuth consent rules for Zitadel’s authorization server, ahead of the implementation in #3574.

Changes:

  • Defines consent storage, skip conditions, expiry and mandatory prompts.
  • Documents revocation, password-reset effects and hosted-cloud rollout requirements.
  • Updates the MCP roadmap to reference the proposal.
File Description
docs/​adrs/​092-mcp-server.md Links the MCP consent plan to the proposed amendment.
docs/​adrs/​082-oauth-and-oidc-server.md Defines remembered consent behavior and remaining policy decisions.

Review effort: Balanced

client, and none of the earlier answers ticks its step or carries over
into the person's new answer), when the request says
`prompt=consent`, and when the consent is older than 90 days. Skipping the
step does not renew it: an assured client asks at most once in 90 days.
Comment on lines +1069 to +1071
- **A first-party client is unchanged.** It is asked nothing (§3, and the
platform issuer's `oauth.first_party_clients`); remembering never makes a
client first-party, nor gives a client a scope it was not granted.
Comment on lines +1099 to +1100
open question for ADR 095, which notes that nothing yet records which
client created one.
fforootd pushed a commit that referenced this pull request Dec 2, 2026
The ADR text it carries is on this branch through claude/remembered-consent-adr.

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

This branch was successfully deployed

1 active deployment
Preview — 6c08b399 Deployed Dec 2, 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: Done

Development

Successfully merging this pull request may close these issues.

3 participants