You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9688e17
Browse filesBrowse the repository at this point in the historyBrowse files
fix(plugin-auth): #30918 report each distinct last-use failure once, and a withdrawn consent is no failure
Contract review 6686013581, should-fix 1, 3 and 4.
- Should-fix 1. The stamper reported only the first failure in a process.
A consent withdrawn between the stamp's read and its write made the
engine's by-id update throw RECORD_NOT_FOUND, which spent that one report,
so a later real outage went unreported. The real store now answers
RECORD_NOT_FOUND on the stamp as done, since there is no grant left to
stamp. The stamper reports each DISTINCT failure message once per process,
capped at 16 messages. Pinned on the real engine by a withdrawal race and
a three-hour sequence of two different errors.
- Should-fix 3. The module and method docs and the plugin-auth changeset now
say "at most once per consent per hour in each process".
- Should-fix 4. Rule 7 gains a case for an organization owner and an
organization admin naming a person who is only in another organization.
They get the same 403 bytes as for a person inside their organization.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4d1LNDAUs8pz7DNjQFC
Copy file name to clipboardExpand all lines: .changeset/30918-plugin-auth-authorized-clients.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,4 +14,4 @@ Two new reads, both ObjectStack mounts ahead of the better-auth catch-all and bo
14
14
15
15
Each row carries exactly `id` (the consent id, the key `POST /oauth2/delete-consent` takes), `clientId`, `name`, `scopes`, `organizationId`, `authorizedAt` and `lastUsedAt`. Nothing in it identifies or reconstructs a token. The answer is newest first, at most 200 rows, with `truncated: true` when the person holds more, and it is sent with `Cache-Control: no-store`.
16
16
17
-
`lastUsedAt` is the start of the most recent clock hour in which the client made a verified MCP call under that consent, or `null` when none has been recorded. The server writes it after `verifyMcpAccessToken` admits a token with an `azp` client: off the request path, at most once per consent per hour, from the verified token and the server clock alone. A store failure never fails the MCP call and is logged once at `error`. It lands in the new `sys_oauth_consent.last_used_at` column, so a deployment picks it up at its next schema sync. Until then the reads answer `500` and the stamp logs its one error.
17
+
`lastUsedAt` is the start of the most recent clock hour in which the client made a verified MCP call under that consent, or `null` when none has been recorded. The server writes it after `verifyMcpAccessToken` admits a token with an `azp` client: off the request path, at most once per consent per hour in each process (several processes may each write the same hour start), from the verified token and the server clock alone. A store failure never fails the MCP call, and each distinct failure is logged once per process at `error`; a consent withdrawn between the stamp's read and its write is not a failure. It lands in the new `sys_oauth_consent.last_used_at` column, so a deployment picks it up at its next schema sync. Until then the reads answer `500` and the stamp logs that error once per process.
0 commit comments