Repository navigation
v0.1.48-beta.2
Pre-release
Pre-release
·
114 commits
to main
since this release
This is a prerelease for testing. It is not for production use.
Breaking changes
- Switched-off MFA methods apply at sign-in and renewal. Turning a method off in Settings > Security > MFA used to stop only new setups. Now a code of a switched-off method is refused with 403
MFA_METHOD_DISABLED. Accounts with another factor (a passkey or recovery codes) sign in with it. Accounts whose only factor is switched off prove it once more, then set up an allowed method. Before you upgrade, check which methods are off and whether users still rely on them. See Switched-Off Methods. - Adding a factor needs a fresh proof.
POST /v1/users/me/mfa/confirm,POST /v1/portal/driver/mfa/confirmand passkey registration called with a session now needproof: a factor the account holds, else the current password, or a recent SSO sign-in for an SSO account without either. A call without it gets 400VALIDATION_ERRORwith the accepted kinds inproofKinds. Scripts and custom clients that set up MFA must send the proof. See Confirming Security Changes. - API keys from a session need a fresh proof.
POST /v1/api-keysand aPATCH /v1/api-keys/:idthat widens a key's permissions or sites, when called with a session, take the sameproof. Calls made with an API key are unchanged. Every new key now emails its owner. See API Keys. - Turning MFA off and removing a passkey need a factor or a recovery code.
DELETE /v1/users/me/mfaandDELETE /v1/portal/driver/mfatake{ proof }(a factor the account holds or a recovery code) instead of{ password }. Removing a passkey while the account holds a factor no longer accepts the password. A request with only the password gets 400VALIDATION_ERRORwithproofKinds. The driver app sends the password and now gets a 400 that points drivers to the portal. Update any script that turns MFA off. - Phone numbers are validated and stored as E.164. Every route that stores a phone (
PATCH /v1/users/me,POST /v1/users,PATCH /v1/users/:id,POSTandPATCH /v1/drivers/:id,PATCH /v1/portal/driver/profile,POST /v1/portal/auth/register) answers 400VALIDATION_ERRORfor a number that does not parse. A number without a country code is read as North American. Existing rows are not rewritten. Integrations that send local formats from other countries must send the country code. See Phone Number Changes. - Own email and phone are not editable through the users route.
PATCH /v1/users/:idon your own account withemailorphoneanswers 403SELF_EDIT_FORBIDDEN. Change your own phone throughPATCH /v1/users/me, which asks for a proof when the account holds a factor and a code sent to the new number when the account signs in with SMS codes. An admin still changes other users' email and phone on the Users page. See Your Own Account.
Features
- Required MFA (optional, off by default). An admin can require MFA for every operator or for chosen roles, and separately for drivers, in Settings > Security > MFA. Only when it is on do users without MFA set it up at their next sign-in, before the session starts, and renewals check the policy again. See Required MFA and Settings > Security > MFA.
- Recovery codes. Ten single-use codes per operator and driver, shown once when MFA is turned on, with a download option and a regenerate flow. A recovery code signs in when the usual factor is not at hand. See Recovery Codes.
- Passkeys and physical security keys. Operators and drivers can register passkeys and security keys as a second factor, and optionally sign in with a passkey alone (Settings > Security > MFA). Manage them in Profile in the CSMS and in Account > Security in the portal. See Passkeys and Security Keys.
- Security notices. Operators and drivers get an email (and a text for SMS sign-in accounts) when a factor is added or removed, MFA is turned on or off, an admin resets MFA, recovery codes are regenerated or used, the phone or email changes, or an API key is created. See Security Notices.
- Driver sign-in protection. Drivers get the operator sign-in lockout: 5 free failures, then a delay that doubles from 30 seconds up to 15 minutes. See Sign-In Lockout.
- Phone change confirmation. Changing the phone number needs a proof when the account holds a factor. Accounts that sign in with SMS codes confirm the new number with a code sent to it.
- API. New routes for recovery codes (
/v1/users/me/mfa/recovery-codes,/v1/portal/driver/mfa/recovery-codes), passkeys (/v1/users/me/webauthn/*,/v1/portal/driver/webauthn/*, passkey sign-in under/v1/auth/passkey/*and/v1/portal/auth/passkey/*, the passkey second factor under/v1/auth/webauthn/*and/v1/portal/auth/webauthn/*), factor proofs and phone verification.GET /v1/users/me/mfaandGET /v1/portal/driver/mfalist the accepted proof kinds. - Helm and CDK.
appSettings.security.mfaRequired,mfaRequiredRoles,mfaRequireDrivers,mfaWebauthnEnabledandmfaPasskeyLoginEnabled(CDKappSettings['security.mfa.*']) set the same values. Empty keeps the dashboard value. Both refuse required MFA while email and authenticator app codes are both off. See Helm chart values and AWS CDK. WEBAUTHN_RP_ID(API, optional) sets the passkey relying party ID. Unset, operators use the CSMS host and drivers the portal host. See Environment Variables.
Fixes
- The station OCPP command dialogs keep a long JSON response inside the dialog on phones.
- Passkey autofill on the CSMS and portal sign-in pages no longer restarts without end after a refused browser prompt.
- The next sign-in in a tab after Log Out opens the dashboard, not the page that was open at Log Out, whoever signs in.
- SSO sign-ins are bound to the browser that started them, and the SSO binding cookie uses the
__Host-prefix over HTTPS. - Percent-encoded paths (such as
/v1/%70ortal/...) are refused with 400 before any route hook runs. - Account, sign-in and admin user and driver replies send
Cache-Control: no-store. - MFA codes are bound to their purpose and, for SMS, to the number they went to. Code sends are capped per account and at 3 an hour per number across accounts.
- Parallel wrong MFA guesses can no longer race past the lock, and a settings read failure no longer lets a switched-off method through while another factor exists.
- A driver portal cookie resent as a Bearer token no longer passes as the mobile app.
- Vite is updated to 8.3.5 for the launch-editor advisories (GHSA-r825-w8mm-5pxw and related). This affects the development servers only.
Upgrade notes
- Migration
0479_release_0_1_48.sqlgrew in this build: it adds the MFA recovery code and WebAuthn credential tables, the challenge purpose and destination columns, the driver sign-in lock columns and the new MFA settings with today's values. Installs that ran v0.1.48-beta.1 run the whole file again on the next migrate; every statement is idempotent. - Required MFA is off by default, and passkey sign-in is off by default. Passkeys as a second factor are on by default.
- Passkeys need HTTPS or
localhost. A portal served on an IP address does not offer passkeys. - Choose
WEBAUTHN_RP_IDbefore users register passkeys. Changing it later makes every registered passkey unusable. - Users who disable MFA from a script, or who keep only a switched-off method, should set up a passkey or save recovery codes first.