Document token revocation - #4746
Conversation
📝 WalkthroughWalkthroughThis change documents OAuth token revocation configuration and behavior. It adds a complete token revocation guide and links the guide from the OAuth/OIDC Token Operations sidebar. ChangesOAuth token revocation documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
docs/content/deployment/configuration.mdxESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. docs/content/guides/protocols/oauth-oidc/token-revocation.mdxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. docs/sidebars.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/content/deployment/configuration.mdx`:
- Around line 1089-1091: Remove the unrelated system_permission_prefix :::tip
block from the token revocation documentation, or relocate it beside the
server.security.system_permission_prefix setting; keep the token revocation
content focused and otherwise unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 66e8e6b5-4153-4afc-8db3-0369d30be7c8
📒 Files selected for processing (3)
docs/content/deployment/configuration.mdxdocs/content/guides/protocols/oauth-oidc/token-revocation.mdxdocs/sidebars.ts
| :::tip | ||
| If you set a custom `system_permission_prefix`, update the Console scopes to match the new permission strings and restart the server. | ||
| ::: |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove the unrelated system_permission_prefix tip.
This PR documents token revocation. The tip does not describe token revocation. Delete it or move it next to the server.security.system_permission_prefix setting.
Proposed fix
-:::tip
-If you set a custom `system_permission_prefix`, update the Console scopes to match the new permission strings and restart the server.
-:::As per coding guidelines, “Keep changes minimal and focused on the requested task.”
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| :::tip | |
| If you set a custom `system_permission_prefix`, update the Console scopes to match the new permission strings and restart the server. | |
| ::: |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/content/deployment/configuration.mdx` around lines 1089 - 1091, Remove
the unrelated system_permission_prefix :::tip block from the token revocation
documentation, or relocate it beside the
server.security.system_permission_prefix setting; keep the token revocation
content focused and otherwise unchanged.
Source: Coding guidelines
Add a token revocation reference under the OAuth/OIDC protocol guides covering the RFC 7009 endpoint, grant-scoped revocation through the token family, and user-scoped revocation, along with where each is enforced and how fresh that enforcement is. Fill the matching gaps in the configuration reference: the revocation settings under oauth.* and server.security.token_revocation.*, and userDeletionFlow in the supported flow types. Refs thunder-id#4300 thunder-id#4591 thunder-id#4669
dfef90a to
4110276
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Purpose
Token revocation had no documentation beyond the endpoint's entry in the OpenAPI spec. Nothing described the token family, user-scoped revocation, where enforcement happens, or any of the settings that control it.
This adds a Token Revocation reference under the OAuth/OIDC protocol guides and fills the matching gaps in the configuration reference. Follows the feature work in #4300, #4591 and #4669.
Approach
New page —
docs/content/guides/protocols/oauth-oidc/token-revocation.mdx, placed in Token Operations beside Token Introspection, matching thereferencedoc type its siblings use.It is organised around the three scopes a reader has to distinguish, since they behave differently and are triggered differently:
jtitfidsubThen where revocation is enforced, and the settings that control all of it.
Configuration reference — three gaps closed in
docs/content/deployment/configuration.mdx:oauth.revocation.*/oauth.token_revocation.*keys,oauth.token_exchange.token_family, and the threeserver.security.token_revocation.*keys.userDeletionFlowwas missing from the supported flow types, which listed only five.Two operational facts called out deliberately
Both are things an integrator otherwise discovers from a confusing bug report:
oauth.token_revocation.enableddoes more than gate the endpoint. Setting it tofalsealso turns off the check that rejects revoked tokens during introspection, the refresh grant, and token exchange. The page and the config table both say so explicitly.DELETE /users/{id}does not revoke tokens. The deletion flow runs on Console deletion. Anyone scripting offboarding against the API needs to know the tokens stay valid, so this is a:::warningrather than a passing mention.Verification
Every claim was checked against the implementation rather than against the design documents, including the two that turned out to be more subtle than the design notes suggested (what
oauth.token_revocation.enabledgates, and thattoken_type_hintis accepted and then discarded)../scripts/docs-lint.shpasses on both changed files, with no new sidebar orphans.Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
🤖 Generated with Claude Code
Summary by CodeRabbit