Skip to content

Commit 6beaf69

Browse files
committed
docs: a disabled OAuth client's tokens stop on the next call, and an administrator's key suspension
Claude-Session: https://claude.ai/code/session_01QUs3BuLtRmSkjNPDYrwA9T Co-authored-by: Claude <noreply@anthropic.com>
1 parent 94b08a7 commit 6beaf69

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

‎content/docs/ai/connect-mcp.mdx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ message names the key's prefix, the date, and the remedy:
201201
|:---|:---|
202202
| `API_KEY_EXPIRED` | Past its `expires_at` (or past the grace of a key created with none). |
203203
| `API_KEY_INACTIVE` | No recorded use for longer than the inactivity window. The key is **not** revoked. |
204-
| `API_KEY_REVOKED` | Revoked by its owner or an administrator. |
204+
| `API_KEY_REVOKED` | Revoked by its owner or an administrator. A key a platform administrator revoked for someone else is suspended: only a platform administrator can restore it. |
205205

206206
The remedy is the same for all three: **create a new key and replace the old
207207
one wherever it is configured** — keys do not renew. To rotate without a gap,
@@ -447,6 +447,14 @@ drive this MCP server. Same word, different layer.
447447
`401`, and anyone else who is signed in is refused `403`. The SDK
448448
spells them `oauth.authorizedClients.list()` / `withdraw(id)` and
449449
`listForUser(userId)` / `withdrawForUser(userId, id)`.
450+
- **A platform administrator can pause an assistant for everyone.** Disabling
451+
its client (the Disable action on the OAuth applications list, or
452+
`POST /api/v1/auth/admin/oauth2/toggle-disabled` with
453+
`{ "client_id": "…", "disabled": true }`) refuses every access token the
454+
client already holds on its next call (`401`), and the client gets no new
455+
ones: a refresh is refused `invalid_client`. Disabling is a pause, not an
456+
end: the grants and refresh tokens stay, so enabling the client again
457+
serves them again. To end a grant, withdraw it.
450458
- **Action bodies run as trusted app code** once invoked (the `ai.exposed`
451459
gate and `requiredPermissions` are checked at *invoke* time). Treat writing
452460
an action as a code-review-worthy act — that's the real security boundary.

‎content/docs/api/error-catalog.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ See [Read limits a deployment may set](/docs/api/data-api#read-limits-a-deployme
499499
**Retry:** `no_retry`
500500

501501
### `API_KEY_REVOKED`
502-
**Cause:** The API key was revoked by its owner or an administrator, or by an administrator's forced password reset (the message says which).
503-
**Fix:** Ask the key's owner or a platform administrator to restore it (the Restore API Key action on the API Keys list); the same key then works again at once. A key a forced password reset revoked is restored by a platform administrator only: its owner is refused `403 PERMISSION_DENIED`. Otherwise create a new key and replace this one wherever it is configured.
502+
**Cause:** The API key was revoked by its owner or an administrator, suspended by a platform administrator, or revoked by an administrator's forced password reset (the message says which).
503+
**Fix:** Ask the key's owner or a platform administrator to restore it (the Restore API Key action on the API Keys list); the same key then works again at once. A key a platform administrator suspended (revoked when it was not their own), or a forced password reset revoked, is restored by a platform administrator only: its owner is refused `403 PERMISSION_DENIED`. Otherwise create a new key and replace this one wherever it is configured.
504504
**Retry:** `no_retry`
505505

506506
These three are answered on every endpoint that accepts an API key: the endpoints the runtime serves (the MCP HTTP endpoint among them), the REST data API, the settings, file-download, datasource admin and share-link routes, the marketplace install routes and the MCP stdio transport. An unknown key is always the generic 401.

‎content/docs/permissions/system-context.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ bugs — it is the protection or the side effect that silently does not happen.
143143
| 24 | Tenant-audit warning silenced; `bypassTenantAudit` threaded to the driver | objectql | Get: unscoped system writes stop warning. Lose: the signal that would flag a genuine user-path scoping bug | `buildDriverOptions` |
144144
| 25 | Engine-owned / append-only write guard bypassed | plugin-security | Get: generic writes to `managedBy` engine-owned objects | `packages/plugins/plugin-security/src/system-write-guard.ts#isUserContextWrite`, `packages/plugins/plugin-security/src/system-write-guard.ts#assertEngineOwnedWriteAllowed` |
145145
| 26 | Identity write guard bypassed (ADR-0092) | plugin-auth | Get: direct writes to identity tables through the generic data path | `packages/plugins/plugin-auth/src/identity-write-guard.ts#isUserContextWrite` |
146-
| 26b | API key restore guard does not refuse | plugin-auth | Get: a write setting `revoked: false` on a `sys_api_key` row an administrator's forced password reset revoked is admitted without the platform-administrator check a user-context restore must pass; the reason is still cleared. Lose: nothing a caller reaches: no system writer restores a key, and the mint, the last-used stamp and the forced reset itself never set `revoked: false` | `packages/plugins/plugin-auth/src/api-key-restore-guard.ts#isUserContextWrite` |
146+
| 26b | API key restore guard does not refuse | plugin-auth | Get: a write setting `revoked: false` on a `sys_api_key` row an administrator's forced password reset revoked, or a platform administrator suspended (`administrator_suspended`), is admitted without the platform-administrator check a user-context restore must pass; the reason is still cleared. A system revoke is never stamped `administrator_suspended`: a host that suspends a key writes that reason itself, beside `revoked: true`. Lose: nothing a caller reaches: no system writer restores a key, and the mint, the last-used stamp and the forced reset itself never set `revoked: false` | `packages/plugins/plugin-auth/src/api-key-restore-guard.ts#isUserContextWrite` |
147147
| 26c | **Per-user owner rule does not refuse** — a `sys_personal_view` or `sys_user_preference` update that changes `user_id` is admitted | plugin-auth | Get: a system writer can move a personal view or a preference to another owner (no shipped system writer does). The system writer includes app-authored automation elevated to system (a `runAs: 'system'` flow, a hook's `runAs: 'system'` api or `ctx.api.sudo()`, an action body's `ctx.api`), the family `packages/plugins/plugin-security/src/flow-system-identity-write-refusal.ts` names, so an app's automation can move one; the rule reads no app-automation elevation mark. Lose: nothing a caller reaches. A non-system update whose `user_id` differs from the stored owner is refused `403 PERMISSION_DENIED`, for every caller, a platform administrator included; an echo of the stored owner is no change. One shared check holds it for both objects. The rule exists because, for an organization member, `member_default`'s `'*'` update floor (`created_by == current_user.id`) applies to an update beside the object's own row scope | `packages/plugins/plugin-auth/src/owner-fixed-rule.ts#isOwnerChange` |
148148
| 27 | Search-companion column **kept** in a read's rows when it was explicitly requested | objectql | Get: the internal companion column is readable. Lose: nothing for app code — this is the engine reading its own index | `stripSearchCompanionFromRead` |
149149
| 28 | Dependent-count disclosure on a blocked delete | objectql | Get: the count of blocking children. Nothing was elevated past the caller, so nothing is withheld | `dependentCountIsDisclosable` |

0 commit comments

Comments
 (0)