Repository navigation
Socrate v1.15.0
Security release on the v1.x line. It closes the findings of the November 2026 review: account
and session state that a concurrent save could undo, controls that failed open when the database
erred, a locked account that revealed itself, consent and code-exchange gaps, client-IP attribution
behind appending proxies, timing that told which client_ids exist, and app deletion breaking the
audit log's integrity. Several controls are new and ship off (LOCKOUT_SOURCE_MODE,
PRIVILEGED_SCOPE_MODE, SERVICE_USER_SCOPE_MODE, CODE_REPLAY_MODE), and existing modes cover
more routes. Four migrations, no change of default, no change to discovery, claims or error codes.
Upgrade notes
- Migrations 0033–0036 (
AUTO_MIGRATE=false: run them deliberately, after a backup). 0033 adds
audit_chain_head(the server anchors it on the existing log at startup), 0034 adds
login_source_failures, 0035 adds two nullable columns and an index toauthorization_codes,
0036 drops the foreign key fromsecurity_audit_logs.app_idtoapps. None rewrites data; all
work on a fresh install. Audit rows whoseapp_idan earlier app deletion nulled keep failing
the integrity scan: their attribution cannot be restored. - Before deploying, check that no client relies on omitting PKCE without a secret — this must
return nothing, or those clients must send acode_challenge:
SELECT client_id FROM apps WHERE NOT is_public AND coalesce(client_secret_hash, '') = ''; - Applications calling the policy decision point about a global admin who is not a member of
the app must send the admin's token, not a bareuser_id(backendkit'spepalready does). - More than one proxy hop in front of Socrate: list every hop in
TRUSTED_PROXIES(the client
is now the right-most entry not listed). The deploy kit's single Caddy is unaffected. - Users re-authenticate once if they had a consent page open during the upgrade, or a browser
holding the admin console's old refresh cookie. - A wrong password on a locked account now gets
401like any wrong password, not403. - Stored A4 policies (
POLICY_MODEshadow/enforce): add theapp-adminsrule and the new
step-up actions todestructive-step-up(seedocs/EXTENSIBILITY.md); withPOLICY_MODE=off,
the default, nothing changes. - New modes are off by default; run each in
observeand read its audit events before
enforce.
Security
-
Deleting an app no longer rewrites its audit rows. The audit log's
app_idhad a foreign key
toapps, so deleting an app first setapp_idto null on every audit row naming it: the rows
lost their attribution and,app_idbeing covered by each row's hash, the integrity scan reported
them as tampered. Theclient_deletedevent, written after the delete, was refused by the same
key and lost. The foreign key is dropped (migration 0036; the model no longer declares it): an
app's audit rows keep naming it, still verify, and its deletion is recorded. Deploy note:
migration 0036 drops one constraint and rewrites no data (#260). -
Client authentication takes the same time whether the client exists or not. The token
endpoint (every grant, and the token exchange), introspection and revocation answered an unknown
client_idwithout checking any secret, a public client against no hash, and an inactive client
before its secret, while a known confidential client paid a bcrypt check (cost 12, about 250
ms): the response time told which client_ids exist. Those cases now pay a check of the same cost
against a fixed placeholder hash (computed at startup, before the server serves), and so does a
client whose secret is still a legacy SHA-256 hash. The token exchange already authenticated the
client before examining the subject token. Deploy note: none (#366). -
A client without a stored secret must use PKCE, and one rule decides who is confidential.
The token endpoint required a secret from any client with a stored hash and none from the
others, but PKCE was required only of clients flagged public: a client not flagged public and
stored without a secret (legacy data) could redeem a code with neither.App.IsConfidential,
which had no caller, is now that one rule (a stored secret, always required) and is used by the
token endpoint and the token exchange;PKCERequiredalso holds for every client that is not
confidential. Unused helpers that could drift from it are removed (App.HasRedirectURI,
ValidateRedirectURILoose/Strict,CodeStore.GetCode). Deploy note: before deploying, check
that no such client relies on omitting PKCE —SELECT client_id FROM apps WHERE NOT is_public AND coalesce(client_secret_hash, '') = '';should return nothing, or those clients must send a
code_challenge(#366). -
The consent step acts only on the request it was shown for, and honours
prompt=login. The
consent POST took the authorization parameters from the submitted form, so a form edited after
the consent page was rendered could change the scope, the PKCE challenge, the nonce or drop
max_age, andprompt=loginwas checked only when the page was shown. The consent token now
carries a digest of the request it was issued for (client, response type,redirect_uri,
scope, state, nonce, PKCE challenge,max_age,prompt=login); a form that differs, or a token
without one, is refused.prompt=loginis carried through the login and consent forms, and the
consent step answerslogin_requiredunless the sign-in happened on the login form. Deploy
note: a consent page open during the upgrade asks to sign in again (#366). -
The client IP is the right-most untrusted
X-Forwarded-Forentry. Behind a trusted proxy,
the left-most entry was taken as the client, but a proxy that appends to the header (nginx's
$proxy_add_x_forwarded_for, Caddy withtrusted_proxies) keeps whatever the client sent
there, so a client could choose the address that rate limiting, IP blocks, auto-defense and the
audit log saw. The header is now read from the right: the client is the last entry that is not
inTRUSTED_PROXIES(an entry with a port counts as its address), and an empty or malformed
entry ends the walk. The deploy kit's Caddy replaces the
header, so its attribution does not change. Deploy note: a deployment with more than one proxy
hop must list them all inTRUSTED_PROXIES(#366). -
A replayed authorization code can revoke the tokens it was redeemed for (
CODE_REPLAY_MODE,
defaultoff). A code presented again after its redemption was refused, but the tokens issued
for it stayed valid, although the replay means someone else holds the code (RFC 6749 §4.1.2).
The code now records, with its redemption, the refresh-token family and the access-tokenjti
it was redeemed for (migration 0035).observeaudits a replay asauth_code_failedwith
reason: code_replayed;enforcealso revokes that family (every refresh token rotated from
it) and that access token, as seen by introspection, userinfo and the admin API (a resource
server that only verifies the JWT accepts it until it expires) — when the replay authenticates
as the code's client (its secret, or for a public client the code's PKCE verifier), so that
whoever merely saw a used code cannot end the sign-in (revoked: none_unauthenticated), nor
erase the code before its client replays it. A used code is recognised as a replay even after
it has expired, or when it loses a race with its own redemption, and while a replay mode is on a
redeemed code is kept as long as its refresh-token family can be refreshed (the refresh-token
TTL, extended at each rotation), so the expiry sweep does not erase it; underenforcea
refresh whose code cannot be kept is refused (server_error, the old refresh token stays good
to retry with), underobserveit is only logged. An authenticated replay
signals once, unless the revocation could not be recorded (revoked: failed): the code is then
kept, so the next replay tries again; codes redeemed before the migration are audited only. Deploy note: migration 0035
(two nullable columns and an index); new variableCODE_REPLAY_MODE, defaultoff; with it
on,authorization_codeskeeps one row per active sign-in, and each refresh updates it (#366). -
A sign-in records its time without saving the whole user. Hosted login, admin login,
invite acceptance and magic-link sign-in loaded the user, checked the password (and MFA), then
saved the whole row withUserRepository.Updateonly to record the last-login time, writing
back every columnUpdatedoes not guard (the password, token-version and lockout columns
are guarded) from the copy loaded before the checks. A change made to the account in between was undone: an MFA enrolment confirmed while
a sign-in was in flight was switched off again (or an MFA reset restored the old secret), and a
rename or email change was reverted. These paths now use the newUserRepository.RecordLogin,
which writes onlylast_login(andlast_login_attemptwhere the path set it) and
updated_at; a failure to record it stays non-fatal, as before. Deploy note: no migration, no
environment variable, no contract change. -
The decide endpoint no longer reveals who the global admins are. By a bare
user_id, a
subject who is not a member of the calling application got404 unknown subjectunless they
were a global admin, whose decision was evaluated (200), so any application could test user
ids for admin rights. A global admin's implicit access now needs the admin's own token (which
backendkit'spepalways sends); by id they are a404like any non-member. The admin
namespace reservation also matched only an upper-case method:get /api/admin/…and other
spellings an admin rule's glob matches are now refused too (400). Deploy note: an
application that asks about a global admin byuser_idmust send the admin's token instead
(#366). -
The right password on a locked account is audited. Since #404 a wrong password on a locked
account is audited aslogin_failedwithaccount_locked: true, but the right one was refused
without any event, although whoever typed it knows the credential while the lock may be there
because of an attack. Both are now audited, withpassword_verified(trueorfalse); under
a per-source lock the event also carries thesourceit was refused for (the IPv6 /64, as the
counting path records it). Deploy note: none. -
Only a superadmin acts on a superadmin's account. Deleting and blocking a superadmin were
refused, but any admin (or the monitoring console, withmonitoring:write) could revoke a
superadmin's sessions or unlock one. One rule now covers every per-user admin action: on a
superadmin's account,revoke-tokens,unlockandattributesneed a superadmin (403
otherwise), and delete and block stay on/api/admin/superadmins/{id}. Deploy note: none (#366). -
A password-reset link no longer outlives a password change. Reset links were single-use but
stayed valid until they expired, even after the password had been changed or reset another
way, so an old link left in a mailbox could undo a newer password. A link issued before the
account's last password change is now refused (invalid or expired token), compared at the
link's one-second precision, and the reset writes only if the password has not changed since it
was checked, so a change that lands meanwhile is not overwritten. An admin's password reset and
the activation of an invited account now record the change too, as a reset and a change already
did. Deploy note: none (#366). -
Introspection reports a locked or deleted user's token as inactive.
/oauth/introspect
answeredactive: truefor a locked user's token, and for a deleted user's (or when the user
could not be read), while Socrate's own API refused them. A user's token is now active only
while the user exists, is readable, has not revoked its tokens and is not locked; a token whose
revocation status cannot be read is inactive too. A service-account token (sub: app:{id}) is
active only while its app exists and is active, as on the service-account API. Deploy note:
none (#366). -
Two token checks no longer pass when the database errors. If the list of revoked tokens
could not be read, a bearer token was accepted; it is now refused with503andRetry-After
(noinvalid_tokenchallenge, so a client retries instead of discarding its token), on the
user API, the service-account API and the optional-auth routes (/oauth/logout,
/oauth/revoke, which must not report a revocation they could not tie to the caller). If a
refreshed token could not be marked as used, the refresh succeeded and the old token stayed
redeemable; the refresh is now refused with500 server_error, and the client retries with
the old token. Deploy note: none (#366). -
A failed-sign-in lock no longer has to lock the owner out. New
LOCKOUT_SOURCE_MODE(off
default,observe,enforce). The lockout counted wrong passwords and codes per account, so
anyone who knew an email could keep the account locked, admins and superadmins included. Under
enforce, failures are counted per account and source (client IPv4 address, or IPv6 /64):
reachingMAX_FAILED_ATTEMPTSlocks that source out of that account for
LOCKOUT_DURATION_SECONDS, auditedaccount_lockedwithlock_scope: source, and the owner
signing in from elsewhere is unaffected. An account-wide lock (an admin block, or one set before
enforce) still applies. If the per-source count cannot be written, the attempt counts on the
account, as inoff(source_store_errorin the audit details).observekeeps the account-wide lock and addssource,
source_failed_attemptsandsource_would_lockto the audit details. Deploy note: migration
0034 (new tablelogin_source_failures, swept with the used tokens); runobservefirst. An
attacker using many addresses getsMAX_FAILED_ATTEMPTStries from each, so keep the per-IP
rate limits and automatic IP blocking on. -
The policy enforcement point also covers the app-management routes. Under
POLICY_MODE
(shadow/enforce),/api/apps/{app_id}/users…and/api/apps/{app_id}/logsare now
decided like the admin API, recorded with sourceapp_pep, beforeRequireAppAccessand
RequireAppAdmin. The input carriesapp.idand the caller's role in that app
(principal.app_role, read server-side). A new baseline rule,app-admins, mirrors the two
gates, so shadow mode agrees with the code from the first request. The policy catalogue gains
app_actions./api/apps/{app_id}/service/*is unchanged. Deploy note: no migration. A
policy stored before this release has noapp-adminsrule: add it beforeshadowor
enforce(seedocs/EXTENSIBILITY.md), or every app-route request is a divergence, and in
enforcea403. WithPOLICY_MODE=off(the default) nothing changes. -
REFRESH_REUSE_MODE=enforcerevokes only the reused token's family. Underenforce, a
rotated refresh token presented again raised the user's token version (every session, the
consoles included) before the client was authenticated, on every replay, and also for a token
a logout had revoked; a concurrent replay was neither audited nor revoked. Now:- each refresh token carries a family id (
fam, kept across rotations; refresh tokens are
opaque to clients), andenforcerevokes that family only: that sign-in's tokens at that
client; - reuse is checked after client authentication and the token-version check;
- a token revoked by
/oauth/revokeor a logout is rejected without a reuse signal; - each token signals once;
- the concurrent replay is audited (
concurrent: true) and handled like any other reuse.
A refresh token issued before this release has no family; under
enforce, its reuse still
revokes all the user's tokens. Audit details gainrevoked(familyorall_user_tokens).
Deploy note: no migration; the records live inused_tokens.off(the default) is
unchanged, except that a replayed token is now rejected after client authentication. - each refresh token carries a family id (
-
The audit chain detects removed or blanked newest rows. The newest rows could be deleted, or
have their hash blanked, without breaking the chain: what remained still linked up, the next
row linked to the newest row still carrying a hash, and the scanner skipped rows without one.
The chain head (id and hash of the newest row, with an HMAC keyed bySECRET_KEY_BASE) is now
kept outside the audit table, inaudit_chain_head(migration 0033), and moved in the
transaction of every append. The next row links to the head, so a gap stays visible. The
integrity scanner reports a head that is missing, invalid or no longer matches the row it
names, and a row without a hash after the chain started. It now reads rows in id order and
checks the link between pages. It also logs the head it saw, outside the database. The first
anchoring is recorded in the chain (audit_chain_anchored), so a head deleted while the
server is stopped is reported at the next start instead of being silently recreated. Retention
keeps the newest row, which the head names. New violation details:unstamped_row_id,
chain_head(kindstayschain). Deploy note: migration 0033 (new table); the server
anchors the head on the existing log at startup. A database-only attacker who saved an earlier
head can still roll the log back to it; the scan log line is the evidence for that case. -
ADMIN_SCOPE_MODEis read like the other modes. The value is now trimmed and
case-insensitive, soEnforceorenforceturns the scope gate on instead of silently leaving
it off. Anything other thanenforcestill meansoff. The startup log's effective
configuration now includesadmin_scope_mode, so the mode in force is visible. Deploy note:
none, unless the variable was set with different case or spacing, in which case the gate turns
on at the next restart. -
The privileged scopes can be kept to the clients meant to hold them. New
PRIVILEGED_SCOPE_MODE(offdefault,observe,enforce).admin,monitoring:readand
monitoring:writewere requestable by any client at authorize, and withclient_credentials,
unlessSCOPE_POLICY_MODE=enforceand the client had a non-emptyallowed_scopes. Under
enforce, a client gets one only if it lists it inallowed_scopesor is an operator console
(OPERATOR_CONSOLE_CLIENT_IDS,ADMIN_CONSOLE_CLIENT_ID), on every grant (authorize, code,
refresh,client_credentials, token exchange), whateverSCOPE_POLICY_MODEsays; others get
invalid_scope.observeauditsscope_deniedwithreason: privileged_scope. The admin API
still checks the user's role; this stops a client from obtaining the scope by asking. Deploy
note: no migration; runobserveand checkscope_deniedevents beforeenforce, and list
the scope in theallowed_scopesof any non-console client that needs it. -
The admin-console refresh cookie is usable only by the console. When
ADMIN_CONSOLE_CLIENT_IDenables the refresh-cookie channel,/oauth/tokenread the cookie
for any refresh request without a token in the body.SameSite=Strictlets a page on another
origin of the same site send it, andALLOWED_ORIGINSmay grant that origin credentialed
CORS, so a script there could refresh as the console and read the tokens. The cookie is now
read only for the console's ownclient_id, with anX-Requested-Byheader (the CSRF defence
the router comment described but no code checked), and from the origins of
ADMIN_CONSOLE_REDIRECT_URIS(or without anOriginheader). In production the cookie is
__Host-refresh_tokenonPath=/, which a sibling subdomain cannot set or overwrite; the old
cookie is expired when the new one is set, and logout clears both. Deploy note: no migration,
no new variable; a browser still holding the old cookie signs in once more. The consoles use
their backend-for-frontend and do not use this channel. -
A locked account no longer reveals that it exists. The password check answered "account
locked" to any password, before the hash comparison: the answer and its speed told apart an
existing account from an unknown email. A locked account's password is now checked as any
other, and only the right password getsErrAccountLocked(403), so the owner still learns
why they cannot sign in. A wrong one getsErrInvalidCredentials(401), as an unknown email
does; it is audited aslogin_failedwithaccount_locked: trueand does not move the counter.
This applies to every password check:/api/auth/login, the hosted login, admin login,
/elevateand change-password. Deploy note: no migration, no environment variable; a client that
sends a wrong password to a locked account now gets401, not403. -
An app's service account can be kept away from accounts it did not create. New
SERVICE_USER_SCOPE_MODE(offdefault,observe,enforce). Underenforce, the service
API (/api/apps/{app_id}/service/users) no longer enrols an existing account in the app unless
it was created for this app or is already a member (409 account_exists; an admin adds it, or
the person signs in), and edits the global profile only of an account created for the app
(403 profile_not_owned).observeallows both and auditsservice_user_scope. The look-up
(GET) is unchanged:token_versionis how an app detects revoked user tokens. Deploy note:
no migration; runobserveand checkservice_user_scopeevents, which show the apps relying
on either, beforeenforce. -
IP blocks and alert-rule changes are audited. A manual block, an unblock, and creating,
changing or deleting an alert rule now record a security event naming the admin:
ip_blockedandip_unblocked(the block's address, reason, author and dates, read before
the row is deleted),alert_rule_created,alert_rule_updated(valuesbeforeandafter)
andalert_rule_deleted. Lifting a block and changing or deleting a rule arewarning. A
webhook URL is recorded as its host only. Unblocking or deleting an unknown id now answers
404(it answered204). Deploy note: no migration, no environment variable. -
Loopback, the server's own addresses and trusted proxies can no longer be blocked.
POST /api/admin/security/blocked-ipsnow refuses (400) a loopback or unspecified address,
one of the server's network addresses or any address inTRUSTED_PROXIES, and anything that
is not an IP address; it stores an IPv4-mapped address as IPv4, the form the block list is
matched against. The automatic defence (failed sign-ins, brute force) skips the same addresses
and logs it, and a block already stored for one of them is not enforced. Blocking one of them cut off the consoles, which reach the admin API through a
local proxy, and with them the route that lifts the block; behind a proxy missing from
TRUSTED_PROXIES, every request appears to come from it, so one burst of failed sign-ins
locked everyone out. Deploy note: no migration, no environment variable. -
A DPoP-bound token presented to Socrate's own APIs needs its proof. Under
DPOP_MODE
observeorenforce, a token carryingcnf.jktsent to/oauth/userinfo,/api/*, the
app routes, the service-account routes or the admin API must come with a fresh DPoP proof of the bound key for that request,
carryingath(RFC 9449 §7.1; newdpop.VerifyForResource,middleware.DPoPBinding). The
DPoPauthorization scheme is accepted next toBearer.enforceanswers401with a
WWW-Authenticate: DPoPchallenge;observelogs and auditsdpop_validation_failedand lets
the request through. Before, a bound token was accepted as a plain bearer token there. Unbound
tokens, andDPOP_MODE=off, are unchanged. CORS now allows theDPoPrequest header and
exposesWWW-Authenticate, so a browser client on an allowed origin can send its proof and
read the challenge. Deploy note: no migration, no new variable; runobservefirst and check
dpop_validation_failedevents beforeenforce. -
A revoked service-account token is refused. The service-account routes
(/api/apps/{app_id}/service/*) now check aclient_credentialstoken'sjtiagainst the
revoked list thatPOST /oauth/revokewrites, asAuthMiddlewaredoes for user tokens, and
answer401for a revoked token (and for one without ajti, which could never be revoked).
Before, a revoked service token stayed usable until it expired. Deploy note: no migration, no
environment variable. -
Saving a user can no longer clear an invite claim.
UserRepository.Updatenow also leaves
outinvite_app_id, which only account creation andClaimInviteAppset. A save of a pending
account loaded before another app claimed it (an admin edit racing the claim) used to write the
empty value back, so a third app could claim the account and its invite set the password.
Deploy note: no migration, no environment variable. -
The admin-API audience check covers the app-management routes. Under
ADMIN_API_AUDIENCE_MODEobserveorenforce,/api/apps/{app_id}/*(app users and app
logs) now accepts a token issued to an operator console, to Socrate's admin portal, or to that
same app (its backend forwards its app admins' tokens), and reports or refuses
(403 invalid_audience) a token issued to another application. Before, a global admin's token
held by any application's backend managed every app's users there, whatever the mode. The
service-account routes/api/apps/{app_id}/service/*are unchanged. A mismatch is audited as
admin_api_audience, as on the admin API. Deploy note: no migration, no new variable or
default; with the mode inobserve, check the audit foradmin_api_audienceevents on
/api/apps/paths beforeenforce. -
Saving a user can no longer restore an old password.
UserRepository.Updatenow also leaves
outhashed_password,password_changed_atandmust_change_password: a path that loaded a
user before a password change (a sign-in saving its last-login time racing a change or a
reset) used to write the old hash back, so the old password worked again. The password is
written only bySetPassword, which ends the existing sessions in the same statement, and by
UpdateProfile. Accepting an invite for a pending account now sets the password and the
verification withSetPassword(newPasswordChange.ConfirmedAt). Deploy note: no
migration, no environment variable. -
Saving a user no longer brings back a user deleted in the meantime.
UserRepository.Update
used GORM'sSave, which retries an update that matches no row as an insert that clears
deleted_at: a path that loaded a user before an admin deleted it (a sign-in saving its
last-login time, an MFA change) restored the account.Updateis now a plain update of the
live row and reports a deleted or missing user as not found. Deploy note: no migration, no
environment variable. -
The operator-console clients are protected objects. Changing, deleting or rotating the
secret of a client listed inOPERATOR_CONSOLE_CLIENT_IDSorADMIN_CONSOLE_CLIENT_ID
(PUT,DELETE,POST …/rotate-secreton/api/admin/apps/{id}) needs a superadmin
(403otherwise), on top of the step-up these routes already require. Every change to one,
and every refused attempt, is audited withconsole_client: trueatcriticalseverity
(newSecurityEvent.MinSeverity, which raises an event's severity and never lowers it). Other
clients are unchanged. Deploy note: no migration; setOPERATOR_CONSOLE_CLIENT_IDS(and
ADMIN_CONSOLE_CLIENT_ID) to the consoles' client_ids, without them no client is protected;
underPOLICY_MODEshadow, an admin's refused attempt is recorded as a divergence (the
decision point does not know which clients are consoles). -
Saving a user can no longer undo a session revocation or a lockout change.
UserRepository.Update(a full-row save) now leaves outtoken_version,
failed_login_attemptsandlocked_until, which only their targeted statements write. A path
that loaded a user before a concurrent logout, password change, failed sign-in, lock or reset
(for example a sign-in saving its last-login time) used to write the old values back: revoked
sessions became valid again, a lock was lifted, or a successful sign-in's counter reset was
undone. Password changes (ResetPassword,ChangePassword, the adminUpdatePassword) now
store the new hash and increment the token version in one statement (new
UserRepository.SetPassword), so the password and the revocation are saved together or not at
all. Unlocking a user uses the targeted reset, andcmd/seed -forceincrements the token
version in the database. Deploy note: no migration, no environment variable, no change of
default. -
User attributes that policy rules read are protected.
PUT /api/admin/users/{id}/attributes
now requires fresh step-up (it joinspolicy.StepUpActions); an admin cannot change their own
attributes (400), and only a superadmin changes a superadmin's (403). The audit entry
keeps recording names, never values, and now also says which attributes wereadded,
changedandremoved. Deploy note: no migration, no environment variable; under
POLICY_MODEshadoworenforce, add the action to the storeddestructive-step-uprule,
and expect shadow mode to record an admin editing a superadmin's attributes as a divergence
(the decision point does not see the target's role). -
Updating a superadmin requires step-up and revokes their sessions on a credential change.
PUT /api/admin/superadmins/{id}now requires a recent authentication (it joins
policy.StepUpActions). Changing a superadmin's email or password there bumps their token
version in the same transaction as the new credentials, so their existing sessions end, and sets
password_changed_atfor a password. The update writes only the edited columns, so it cannot
undo a concurrent revocation or failed sign-in (newUserRepository.UpdateProfile). An
admin can no longer set their own password through it (400): they use
POST /api/admin/change-password, which asks for the current password and applies the
lockout. The audit entry lists which fields were set (name,email,password), never their
values. Deploy note: no migration, no environment variable; a stored A4 policy needs the action
added to itsdestructive-step-uprule underPOLICY_MODEshadoworenforce, as for the
previous step-up additions. -
Creating or changing an OAuth client and deleting a user require step-up.
POST /api/admin/apps,PUT /api/admin/apps/{id}(redirect URIs,allow_impersonation,
allow_token_exchange, claim mappings, allowed scopes…) andDELETE /api/admin/users/{id}
now require a recent authentication like the other destructive admin routes
(403 elevation_required, thenPOST /api/admin/elevate); they joinpolicy.StepUpActions,
so the A4 baseline expresses the same obligation. A new test makes every state-changing admin
route either a step-up action or listed with a reason, so a new one cannot skip step-up
unnoticed. Deploy note: no migration, no environment variable; the admin console already
prompts for step-up on anyelevation_required, and the installer's client registration
runs right after its sign-in, within the window. A policy already stored (A4) keeps its own
destructive-step-uprule: withPOLICY_MODEshadoworenforce, add the three actions to
it in the policy editor, or the decision point will report them as divergences (the router's
own step-up check applies either way). -
Every password check counts failures and honours the lockout;
/elevateand
/change-passwordare rate-limited.POST /api/admin/elevate(re-authentication) and
POST /api/admin/change-passwordused to check the password without counting a wrong one or
refusing a locked account; they now go through the same check as sign-in, which also replaces
POST /api/admin/login's own copy of the lockout. A locked account gets403 account is lockedon both; a successful re-authentication or password change resets the counter. Both
routes are rate-limited with the login limiter, keyed per admin (the consoles reach them
through their BFF, from one address), falling back to the client IP. Deploy note: no
migration, no environment variable, no change of default. -
Magic-link sign-in applies the checks of the other sign-in paths.
POST /api/auth/magic-link/verifynow refuses (403) an account with MFA enabled — a link
proves one factor, so such a user signs in with the password and code — and a deactivated
client, and appliesADMIN_MFA_POLICYto a Socrate admin, as password sign-in does (a magic
link always requires a membership in the app, soADMIN_APP_SIGNIN_POLICY, which covers admins
without one, does not apply). Before, a magic link signed in an MFA-enrolled user with one factor
and ignored both the client's deactivation and the admin MFA policy. Tokens issued for a magic link carry noamr
that would suggest a second factor. Deploy note: no migration, no environment variable, no
change of default; MFA-enrolled users of an app that offers magic links sign in with their
password instead.