Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/36355-auth-boot-reachability-admission-order.md
Original file line number Diff line number Diff line change
@@ -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.
11 changes: 8 additions & 3 deletions content/docs/deployment/self-hosting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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
Expand Down
20 changes: 13 additions & 7 deletions packages/plugins/plugin-auth/src/boot-sign-in-reachability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ' +
Expand Down
Loading