From d1105b670d5bf5be62e3664af2f0df7577ed7d5f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 11:26:41 +0000 Subject: [PATCH] docs(plugin-auth): boot reachability report and self-hosting page state the admission order the audience gate reads Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 --- ...-auth-boot-reachability-admission-order.md | 10 ++++++++++ content/docs/deployment/self-hosting.mdx | 11 +++++++--- .../src/boot-sign-in-reachability.ts | 20 ++++++++++++------- 3 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 .changeset/36355-auth-boot-reachability-admission-order.md diff --git a/.changeset/36355-auth-boot-reachability-admission-order.md b/.changeset/36355-auth-boot-reachability-admission-order.md new file mode 100644 index 00000000000..1e8439b401e --- /dev/null +++ b/.changeset/36355-auth-boot-reachability-admission-order.md @@ -0,0 +1,10 @@ +--- +'@objectstack/plugin-auth': patch +--- + +docs(plugin-auth): the `no_sign_in_account_at_boot` boot report now states the admission order the audience gate actually reads + +Clause-②: no +Metadata-protocol: none + +The recovery remedy in the boot report still holds — a pending `sys_invitation` row gets that one sign-up admitted under every audience posture — but its sentence said the invitation carve-out is what admits it everywhere. The audience gate reads the posture's own rule first: under `open`, and for an address on the `email_domain` allowlist, the posture admits the sign-up, invitation or not; the invitation admits it under `invite_only` and for an address off the allowlist. The message now says so. No admission behaviour changes. diff --git a/content/docs/deployment/self-hosting.mdx b/content/docs/deployment/self-hosting.mdx index 2b6bc4d9372..56916e5e290 100644 --- a/content/docs/deployment/self-hosting.mdx +++ b/content/docs/deployment/self-hosting.mdx @@ -700,8 +700,10 @@ dead end this section describes. directly against the store the deployment reads, then have that person register through the ordinary sign-up endpoint, sending the row's `id` as `invitationId` beside the email — under `invite_only` a sign-up is admitted only by the -invitation it presents. The invitation carve-out admits that one creation under -every posture, so the `invite_only` default stays where it is. One +invitation it presents. That one creation is admitted under every posture — by +the invitation under `invite_only` and off an `email_domain` list, by the +posture's own rule, read first, under `open` and on the list — so the `invite_only` default stays where +it is. One `sys_invitation` row: | Column | Value | @@ -814,7 +816,10 @@ refused `403 SELF_REGISTRATION_CLOSED`, whatever the list or an invitation says ([Authentication](/docs/permissions/authentication#2-handle-callback)). Once the provider verifies the address, the next sign-in is admitted. Under `open` every address is admitted by the posture, invitation or not, so an -invited sign-up likewise receives the declared set beside its invitation. +invited sign-up likewise receives the declared set beside its invitation — except +a sign-in through a social provider whose address the provider did not verify +while email verification is in force, which is refused +`403 SELF_REGISTRATION_CLOSED` as above. **A sign-up the posture admits needs its declared set, invited or not.** When `selfRegistrationPermissionSet` cannot be resolved (no such set, or the set is diff --git a/packages/plugins/plugin-auth/src/boot-sign-in-reachability.ts b/packages/plugins/plugin-auth/src/boot-sign-in-reachability.ts index 9cce805c5f3..6e6fc983674 100644 --- a/packages/plugins/plugin-auth/src/boot-sign-in-reachability.ts +++ b/packages/plugins/plugin-auth/src/boot-sign-in-reachability.ts @@ -38,11 +38,15 @@ * carries is a claim about behaviour, and each is pinned in the sibling suite * rather than merely string-matched: * - * - **The invitation row is the way out.** `decideAudienceAdmission` short- - * circuits on `hasPendingInvitation` BEFORE the posture switch, so a - * self-serve creation holding a pending, unexpired `sys_invitation` - * (`audience-posture.ts`, "The invitation carve-out") is admitted under - * every posture in `AUDIENCE_POSTURES`. No door needs widening. Under + * - **The invitation row is the way out.** A self-serve creation holding a + * pending, unexpired `sys_invitation` (`audience-posture.ts`, "The + * invitation carve-out") is admitted under every posture in + * `AUDIENCE_POSTURES`, though not always BY the invitation: + * `decideAudienceAdmission` reads the posture's own rule first, so under + * `open`, and for an address on the `email_domain` allowlist, the posture + * admits it, invitation or not; the invitation admits it under + * `invite_only` and for an address off the allowlist. No door needs + * widening. Under * `invite_only` a sign-up holds it only by presenting it — the row's `id` * as the body's `invitationId` (`presented-invitation.ts`) — so the * message has the operator give the row an id of their own and send it @@ -546,8 +550,10 @@ export function resolveNoSignInAccountReport( 'lowercases the address it searches for, so a mixed-case row is never found), then have that ' + "person register through the ordinary sign-up endpoint, sending that row's 'id' as " + "'invitationId' beside the email: under 'invite_only' a sign-up is admitted only by the " + - 'invitation it presents. The invitation carve-out admits that ' + - 'ONE creation under EVERY audience posture, so no door needs widening — but it is an ADMISSION ' + + 'invitation it presents. That ONE creation is admitted under EVERY audience posture — by the ' + + "invitation under 'invite_only' and for an address off the 'email_domain' list, by the posture's " + + "own rule, read first, under 'open' and on the list — so no door needs widening; but the " + + 'carve-out is an ADMISSION ' + 'verdict, not a verification bypass: the INVITED login meets the same email-verification rule as ' + "any sign-up. Under 'email_domain' verification is always ON; under 'open' it is ON unless the " + 'DEPLOYMENT has itself declared it off (emailAndPassword.requireEmailVerification: false, or ' +