Skip to content

Commit d7bec5f

Browse files
committed
docs(auth): name the door's rate limit per client address
Claude-Session: https://claude.ai/code/session_01FEkQ5nNrLRm8ssuwWcBVcw Co-authored-by: Claude <noreply@anthropic.com>
1 parent fbe5bfd commit d7bec5f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ is never at rest in clear, the stored mail row never holds it, and it is single-
315315
invitation, its address and its expiry; a resend retires the old one. Every proof that does not admit
316316
gets one refusal that does not say which check failed. An address whose account is verified, is
317317
linked to a provider, or otherwise takes no password from this door is answered "sign in", with the
318-
proof unspent. It carries a per-address and per-invitation rate limit, as ADR-0121 D6 requires.
318+
proof unspent. It carries a rate limit per client address and per invitation, as ADR-0121 D6 requires.
319319
Enforced by `packages/plugins/plugin-auth/src/invitation-mailbox-proof.ts#buildInvitationProofDoorPlugin`,
320320
ledgered in `packages/plugins/plugin-auth/src/auth-route-ledger.ts`; it sits in the `/auth`
321321
namespace and is classified under class 2 the way the preview above is.

‎packages/plugins/plugin-auth/src/auth-route-ledger.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export const AUTH_ROUTE_LEDGER: readonly AuthRouteLedgerEntry[] = [
299299
{ route: 'POST /api/v1/auth/sys-oauth-application/register', family: 'objectstack-mount', source: 'objectstack', disposition: 'server-only', note: 'no SDK method builds this URL — the sys_oauth_application create action posts it directly; session-required self-service wrapper over better-auth /oauth2/create-client that splits the Console\'s newline-separated redirect-URL textarea into the redirect_uris array the vendor schema requires' },
300300
{ route: 'POST /api/v1/auth/sys-session/revoke', family: 'objectstack-mount', source: 'objectstack', disposition: 'server-only', note: 'no SDK method builds this URL — the sys_session revoke_session row action posts it directly with the row id; the server resolves the session from the id, so the session token never travels to or from the console. The session owner is re-dispatched to better-auth /revoke-session; another user\'s session is revocable by a platform admin only (ADR-0068 D2), tombstoned with reason admin (ADR-0069 D4)' },
301301
{ route: 'POST /api/v1/auth/organization/accept-invitation', family: 'organization', source: 'better-auth', disposition: 'sdk', client: 'organizations.invitations.accept', requires: 'organization' },
302-
{ route: 'POST /api/v1/auth/organization/accept-invitation-with-proof', family: 'organization', source: 'better-auth', disposition: 'public', requires: 'organization', note: 'the one-step invitation acceptance (invitation-mailbox-proof.ts): an ObjectStack endpoint on the catch-all, answering a caller with NO session that presents the mailbox proof only the invitation mail carries. With a valid proof it creates the account (or sets the password of an unverified one with no linked provider account, revoking its sessions), marks the address verified, accepts through the vendor accept route and signs the person in; an address with an account the one-step path does not touch answers outcome sign_in, unspent. Every proof that does not admit answers one 400 INVALID_TOKEN. Single-use, bound to the invitation, its address and its expiry; rate-limited per address and per invitation. Without a proof it serves a signed-in session whose address is the invited one and verified. The vendor accept route is unchanged' },
302+
{ route: 'POST /api/v1/auth/organization/accept-invitation-with-proof', family: 'organization', source: 'better-auth', disposition: 'public', requires: 'organization', note: 'the one-step invitation acceptance (invitation-mailbox-proof.ts): an ObjectStack endpoint on the catch-all, answering a caller with NO session that presents the mailbox proof only the invitation mail carries. With a valid proof it creates the account (or sets the password of an unverified one with no linked provider account, revoking its sessions), marks the address verified, accepts through the vendor accept route and signs the person in; an address with an account the one-step path does not touch answers outcome sign_in, unspent. Every proof that does not admit answers one 400 INVALID_TOKEN. Single-use, bound to the invitation, its address and its expiry; rate-limited per client address and per invitation. Without a proof it serves a signed-in session whose address is the invited one and verified. The vendor accept route is unchanged' },
303303
// #9941 — better-auth declares `addMember` with NO HTTP path (server-only
304304
// `auth.api.addMember`; measured on the installed 1.7.1), so the catch-all
305305
// never publishes it and it is correctly ABSENT from

0 commit comments

Comments
 (0)