11 KiB
title, date, context, g15office
| title | date | context | g15office |
|---|---|---|---|
| External user-plugin escalations | 2026-10-22 | /msd-explore of an external app's "escalate to summercms devs" list. Six /msd-quick tasks; send this reply when they are all done. | bhoyg8z4 |
External user-plugin escalations
Reviewed 2026-10-22. The list is golem15.user (sm-user-plugin), not cabana admin auth. Phase 19.6 (2FA) is not mid-flight.
Release hold (2026-10-22): nothing is pushed or tagged until the SummerCMS v0.5.0 wave is finished. That wave is these six user-plugin quicks, admin keyboard shortcuts (261022-k9k), and the MCP feature (phase 19.7). Plugin commits stay local; the plugin tag and app pointer bumps go out with v0.5.0, not as a v0.1.9-shaped mid-wave release. Changelog post the same day as the framework tag.
How to use this file. Each quick fills its row in the tracker and the matching paragraph under Reply to send. When all six are done and v0.5.0 is tagged, send that section as-is. Do not send, push or tag before then.
Do not run the six quicks in parallel on one working tree. They share sm-user-plugin (api_controller.go, plugin.go, routes.go, README). Sequential fresh sessions.
Tracker
| # | Their label | Verdict | Quick / todo | g15office | Status | Shipped |
|---|---|---|---|---|---|---|
| 1 | G2 login ignores is_activated |
Fix | 261022-tb4 · todo | 3r4or1ex | done (unreleased) | 15ff979 → v0.5.0 |
| 2 | G3 cookie-only 401 | Fix remaining four; logout already done | 261022-tto · todo | kkknstxl | done (unreleased) | 8e4b863 → v0.5.0 |
| 3 | G4 logout blacklist under serve |
Fix | 2026-10-22-user-logout-blacklist-missing-under-serve.md | ud0gficu | open | |
| 4 | G6 /update email without proof |
Decline | — | — | declined | n/a |
| 5 | G7 Users form has no role field | Decline | — | — | declined | n/a |
| 6 | G8 API token guard ignores tokens_valid_after |
Decline | — | — | declined | n/a |
| 7 | Cookie option on /login |
Feature | 2026-10-22-user-login-opt-in-session-cookie.md | strnsccy | open | |
| 8 | Password-routes 404 switch | Feature | 2026-10-22-user-password-routes-404-switch.md | h7yrafgd | open | |
| 9 | Lockout keyed on RemoteAddr |
Fix | with 10: 2026-10-22-user-login-lockout-and-same-second-cutoff.md | sniewiif | open | |
| 10 | Same-second token refusal | Fix | with 9, same todo | sniewiif | open |
Status values: open · done · declined. Shipped: local commit now; replace with the v0.5.0 plugin/framework tags at release. Do not write a mid-wave plugin tag.
Six invocations (fresh session each, sequential)
/msd-quick --validate Password /login must refuse is_activated=false when golem15.user.activation.require_activation is true (default), same opaque invalid-login body as a bad password. Do not change deleted_at restore-on-login. See .planning/todos/pending/2026-10-22-user-login-ignores-is-activated.md and .planning/notes/2026-10-22-external-user-plugin-escalations.md
/msd-quick --validate /fetch /refresh /update /change-password must accept the token/auth_token cookies the same way jwt.auth and EndSession already do. Logout is already fixed. See .planning/todos/pending/2026-10-22-user-session-routes-ignore-cookie.md and .planning/notes/2026-10-22-external-user-plugin-escalations.md
/msd-quick --discuss --validate Under serve, user-plugin Boot runs before lagoon.Publish so the jwt blacklist is never wired and logout does not revoke. Wire BlacklistStore and RegisterHooks through lagoon.OnDatabase; test Activate-then-Publish. When re-registering the jwt guard, pass classes.SessionCookieNames() instead of the hardcoded token/auth_token names (G3 leftover). See .planning/todos/pending/2026-10-22-user-logout-blacklist-missing-under-serve.md and .planning/notes/2026-10-22-external-user-plugin-escalations.md
/msd-quick --validate User-plugin /login throttle must use surf.ClientIP (trusted proxies), not RemoteAddr. Remaining tokens_valid_after writers (reset-password, admin password set) must Truncate(time.Second) like RevokeUserAccess so a same-second JWT iat is not refused. See .planning/todos/pending/2026-10-22-user-login-lockout-and-same-second-cutoff.md and .planning/notes/2026-10-22-external-user-plugin-escalations.md
/msd-quick --discuss --validate Opt-in HttpOnly session cookie on user-plugin POST /login, following sociallogin token_cookie / bouncer.LoadCookieConfig. Default off. Discuss: a cookie-carried /refresh must rotate that cookie (G3 left body-only); keep SameSite=Lax, no new CSRF token. See .planning/todos/pending/2026-10-22-user-login-opt-in-session-cookie.md and .planning/notes/2026-10-22-external-user-plugin-escalations.md
/msd-quick --validate User-plugin config switch that does not register POST /login /forgot-password /reset-password so they 404. Default keeps today’s routes. No framework route-wrap seam. See .planning/todos/pending/2026-10-22-user-password-routes-404-switch.md and .planning/notes/2026-10-22-external-user-plugin-escalations.md
Suggested order if you care about risk: G4 (serve blacklist), then G3, G2, 9+10, then the two features. Any order is fine if you do not overlap on the same plugin files.
Verdicts (kept for the sessions)
- G2.
require_activationis documented and/registerhonors it;/logindoes not. Deactivation (deleted_at) stays reversible. - G3. Done locally (
8e4b863). Cookie extractors areclasses.SessionToken/SessionCookieNames./refreshdoes not rewrite a cookie. CSRF was not added (SameSite=Lax + current-password on change-password). - G4.
Bootbeforelagoon.Publish. Tests publish first and hide it. Seam islagoon.OnDatabase.RegisterHookshas the same hole. When re-registering the jwt guard, passclasses.SessionCookieNames(). - G6. D-27: email change clears
email_verified_atand does not write a new proof. A confirm-the-new-inbox flow would be a later feature. - G7. Stock form omission was a 12.1 decision. Stale
organisation_roleis already cleared (ClearOnChange, v0.1.8). Apps extend the form. - G8. Personal tokens die via
revoked_at.RevokeUserAccessalready sets that on deactivate/ban. Do not teach the API-token guard a JWT cutoff. Password reset killing API tokens would be a separate, explicit revoke. - 7. Sociallogin already has
token_cookiefor OAuth. Password/logindoes not set a cookie.--discussmust decide cookie rotation on/refresh(G3 left the body-only rotate) and keep SameSite=Lax (no new CSRF token). - 8. Plugin config; no framework wrap.
- 9.
/loginusesRemoteAddr;/registeralready usessurf.ClientIP. - 10.
RevokeUserAccessalready truncates. Reset-password and the admin password set still stamptime.Now().
Reply to send
Copy from here when the tracker is complete. Replace every TODO as a quick lands. Declined items are already written.
Thanks for the escalation list. We reviewed the current golem15.user plugin (and the framework boot order). Here is what we will ship, what is already true, and what we are not changing.
G2 — login ignores is_activated
Agreed. require_activation defaults to true and /register already withholds a token in admin mode; /login did not check is_activated. That is not the same as deactivation (deleted_at), which stays self-service: a later password login still restores the account.
Ships in SummerCMS v0.5.0 (sm-user-plugin 15ff979, tagged with that wave): with require_activation on (the default), /login answers an account that is not activated with the same opaque invalid-login response as a bad password (counted as a failed attempt); deactivation stays self-service. /activate still serves a not-activated session so the mailed-code flow works.
G3 — some routes ignore the cookie
Partly already fixed, rest agreed. POST /logout already accepts the token/auth_token cookies (and blacklists every JWT the request carries). GET /fetch, POST /refresh, POST /update and POST /change-password still required the Authorization header.
Ships in SummerCMS v0.5.0 (sm-user-plugin 8e4b863, tagged with that wave): GET /fetch, POST /refresh, POST /update and POST /change-password (and the other signed-in routes: /activate, /marketing-consent, /avatar, /avatar/remove) read the session token like jwt.auth: the Authorization header first, then the token and auth_token cookies. A cookie-carried /refresh returns the rotated token in the body and does not rewrite the cookie; the previous token is revoked, so store the new one in your cookie.
G4 — logout does not blacklist under serve
Agreed. Plugin Boot runs before serve publishes the database, so the in-process blacklist store was never wired in production (the jwt_blacklist table exists; nothing wrote to it). Tests hid this because they publish the DB before Boot.
TODO: ships in SummerCMS v0.5.0 — logout under serve blacklists the jti; the next jwt.auth request with that token is 401.
G6 — /update changes email without proof
As designed, not a bug. A new address clears email_verified_at and stays unproven until the owner completes an activation code or a reset-password. We are not adding a “confirm the new inbox before the change sticks” flow in this round. Say if you need that as a later feature.
G7 — stock Users form has no role field
As designed. organisation_role is intentionally off the stock form (an app extends the form). v0.1.8 already clears organisation_role when the organisation changes (members manager and the Users form). No further stock-form change.
G8 — API token guard ignores tokens_valid_after
As designed. Personal API tokens are revoked through revoked_at, not the JWT cutoff. Deactivate and ban already revoke those rows (RevokeUserAccess). A password reset is not supposed to kill API tokens; if you want that, say so and we will revoke the rows, not mix the two mechanisms.
Cookie on /login
Agreed as an opt-in. Sociallogin already has token_cookie for OAuth complete; password /login will grow the same kind of flag (default off, so body-token clients stay unchanged).
TODO: ships in SummerCMS v0.5.0 — config key <name>, HttpOnly cookie via bouncer.LoadCookieConfig.
Password-routes switch
Agreed, in the user plugin, not as a framework “wrap another plugin’s routes” seam. A config key will stop registering /login, /forgot-password and /reset-password so they 404.
TODO: ships in SummerCMS v0.5.0 — config key <name>.
Login lockout keyed on RemoteAddr
Agreed. /login used RemoteAddr; /register already uses the trusted-proxy client address. Behind a reverse proxy five failures locked everyone.
TODO: ships in SummerCMS v0.5.0 — /login throttle uses surf.ClientIP.
Same-second token refusal
Agreed. JWT iat is whole seconds; some tokens_valid_after writers stamped sub-second time. RevokeUserAccess already truncates. Reset-password and the admin password set will too.
TODO: ships in SummerCMS v0.5.0 — a token minted in the same second as a reset is accepted.