M1 review round 3: a built-site e2e for a late staff collection (both bundlers); docs follow
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
6e0ad26b2c
commit
8a01c72c2a
+15
-7
@@ -16,10 +16,11 @@ once there are more than 20.
|
||||
> with a password under 12 characters fails; behind a proxy that hides the site's address and without
|
||||
> `serverURL` nobody can enter a 2FA code; a project's own staff collection without access rules gets rules;
|
||||
> changing the SMTP server in the panel asks for the password again; a slug in `access.staffCollections` that
|
||||
> is not an auth collection stops the start. No import-map change, **no schema change and no migration** on any
|
||||
> is not an auth collection keeps Payload from starting (the old container keeps serving). No import-map change, **no schema change and no migration** on any
|
||||
> database.
|
||||
|
||||
### Security
|
||||
- **A secret that is not text is refused** (`false`, `0`, a list, an object used to be stored as typed).
|
||||
- **Stored secrets are write-only.** `smtpPassword` and `turnstileSecretKey` (Site integrations) were returned
|
||||
by REST and GraphQL, and sent to the browser by the panel, for everyone who could read that global; the
|
||||
"masked" field only drew dots. Now every read through access control gets `'********'` when a value is stored;
|
||||
@@ -45,8 +46,10 @@ once there are more than 20.
|
||||
itself); with role values of its own, or none — an account of that same collection, or a plugin admin.
|
||||
`unlock` gets the admin rule and `read` "a staff account" (a visitor account could list the staff accounts
|
||||
and lift their login lock). An account never changes its **own** roles: the collection's `roles` field, when
|
||||
it has no field access of its own, is closed for that. The rules hold with 2FA on and off, and for a staff
|
||||
collection that a plugin listed after ipalKit adds. Anonymous sign-up into the staff collection was already refused; the
|
||||
it has no field access of its own, is closed for that. `readVersions` gets the `read` rule (versions hold
|
||||
what the accounts hold). The rules hold with 2FA on and off, in a production build, and for a staff
|
||||
collection that a plugin listed after ipalKit adds — there they are put in front of whatever rules that
|
||||
collection has (in a sanitized config Payload's default cannot be told from a rule somebody wrote). Anonymous sign-up into the staff collection was already refused; the
|
||||
plugin's injected collection already had these rules. No known site has a second staff collection
|
||||
([access.md](./access.md) "Account rules").
|
||||
- **2FA verify and setup attempts only from the site's own origin.** A page on another origin that the browser
|
||||
@@ -85,7 +88,7 @@ once there are more than 20.
|
||||
`keepSecretBeforeValidate`, `buildKeepSecret`, `isSecretMask`, `INTEGRATION_SECRET_FIELDS`,
|
||||
`SMTP_PASSWORD_BOUND_TO`, `maskSecretsOnRestore`, `maskWriteOnlySecrets`; `panelAccess`, `applyPanelRole`,
|
||||
`resolvePanelRole`, `countBelowPanelRole`, `DEFAULT_PANEL_ROLE`; `staffCreateAccess`, `staffUpdateAccess`,
|
||||
`staffReadAccess`, `sameStaffCollectionAccess`, `rolesByAdminOnly`, `rolesNotOwn`, `hasPluginRoles`,
|
||||
`staffReadAccess`, `sameStaffCollectionAccess`, `rolesByAdminOnly`, `rolesNotOwn`, `bothAllow`, `hasPluginRoles`,
|
||||
`applyStaffAccountAccess`, `adoptLateAuthCollections`, `unknownStaffCollections`, `buildFirstUserEndpoint`,
|
||||
`applyFirstUserRoute`, `openSignUpCollections`, `staffCollectionsOpenToOthers`, `staffCollectionsOnOwnRoles`; `checkPassword`,
|
||||
`buildPasswordRuleHook`, `applyPasswordRule`, `resolvePasswordRule`, `DEFAULT_PASSWORD_MIN_LENGTH`;
|
||||
@@ -100,9 +103,14 @@ once there are more than 20.
|
||||
that has `payload.kv` already contains; where it cannot be reached the count stays in memory and the limit
|
||||
still holds.
|
||||
- **A slug in `access.staffCollections` (or `access.authCollection`) that is not an auth collection of the
|
||||
config stops the start**: `[ipal] access names "…" as a staff collection, but this config has no auth
|
||||
collection with that slug`. Fix the slug. (A plugin listed after ipalKit may add the collection; it gets the
|
||||
account rules when the site starts.)
|
||||
config: Payload does not start.** The log says `[ipal] access names "…" as a staff collection, but this config
|
||||
has no auth collection with that slug` and lists the auth collections. The process stays up, but every Payload
|
||||
call fails: `/api/health` answers 503, `/api/*` and the panel 500 (a page that needs no Payload call may still
|
||||
answer). With a health check ([deployment.md](./deployment.md) §4.4) Coolify keeps the old container. Check
|
||||
the slugs before the deploy. (A plugin listed after ipalKit may add the collection.)
|
||||
- **A staff collection added by a plugin listed after ipalKit**: the plugin's rules are put in front of the
|
||||
rules that collection has, so both must allow — a rule of its own there can only narrow, not widen. To keep
|
||||
its rules exactly as they are: `custom: { ipal: { accountRules: false } }` on that collection.
|
||||
- **Set `serverURL`** if it is not set. Behind a reverse proxy that rewrites `Host` and sends no
|
||||
`X-Forwarded-Host` (nginx's plain `proxy_pass`; Coolify / Traefik keep `Host`) the server does not know its
|
||||
own address, and the 2FA code page is refused as "another origin": **nobody can enter a code**. The log says
|
||||
|
||||
Reference in New Issue
Block a user