Repository navigation
v0.8.1
A security release. It closes a critical authorization bypass of the admin API, which affects every release since 0.1.0. It also fixes the two vulnerabilities EQSTLab reported: the unauthenticated setup wizard, and the remaining fallback to admin/admin bootstrap credentials outside production. Upgrade as soon as you can, and read Before you upgrade.
Before you upgrade:
- The setup wizard now needs an admin login. Every
/setup-wizard/*endpoint takes the Admin API credentials (an admin JWT orx-admin-api-key) and thesuper-adminrole. Scripts that called it anonymously get401. The console page moved to/console/setupand asks you to sign in first. Once setup is completed or skipped, every wizard write answers409. ADMIN_PASSWORDno longer defaults toadmin. This only matters for a first start on an empty database. Outside production, an unset value now gets a random password that the first start prints once in its log, andadminor a documented placeholder stops the start unlessALLOW_INSECURE_ADMIN_PASSWORD=true. Existing admins and passwords are not changed.
Security
-
The setup wizard was reachable without authentication (GHSA-2463-97f9-hw7j, reported by EQSTLab). The
/setup-wizard/*endpoints sat outside/admin, so no guard applied to them, and the service never checked whether setup was already done. Anyone who could reach an instance could read the wizard state, use the SMTP test, skip or reset the wizard, and complete it to create a new realm with a super-admin user of their choosing. Now:- every wizard endpoint,
statusandstateincluded, requires the same credentials as the Admin API and thesuper-adminrole (a new@RequireAdminAuth()metadata makesAdminApiKeyGuardenforce off the/adminprefix; the guard never got weaker); - once the wizard is completed or skipped,
admin-account,realm-settings,smtp-config,smtp/test,client,sdk-generated,complete,skipandresetanswer409 Conflict("Setup is already complete"); - each write runs in a transaction that locks the wizard state row and checks it is still open, so two concurrent
completecalls create one realm and the other gets409, and completing is all-or-nothing; resetonly clears the answers of a wizard still in progress, never realms or users, and is refused after setup;stateand the write responses are built from an allowlist: never the admin's password hash or a client secret, and the SMTP password only as the placeholder;- the unused
WizardRequiredGuardis removed.
The console's wizard moved inside the signed-in routes (/console/setup;/setupredirects there), checks with the server first, and says setup is already complete instead of showing the form.
- every wizard endpoint,
-
Admin actions could be reached without credentials (GHSA-cxj4-xh78-x373; affects 0.1.0 to 0.8.0).
AdminApiKeyGuardonly enforced admin credentials when the request path began with/admin, compared case-sensitively. Two kinds of admin actions were open as a result:- The admin API through a differently cased path. Express matches routes case-insensitively, so such a request reached the admin handlers while the guard let it through. Handlers without a role requirement (most of the admin API) then ran with no authentication.
- The registration admin actions (0.3.0 to 0.8.0). They live under
/realms/{realm}/registration, not/admin, so their explicit@UseGuards(AdminApiKeyGuard)did nothing. Anyone could list pending registrations, approve or reject them, and list, create, change or delete the realm's registration fields.
The guard now enforces admin credentials when any of these holds: the path, in lower case, is under
/admin; the matched controller is declared underadmin; the route has@RequireAdminAuth(); or the route namesAdminApiKeyGuardin@UseGuards.@Public()routes, including the public registration routes, stay open. Admin events are recorded for differently cased writes too. -
No more
admin/adminbootstrap credentials (GHSA-jfx3-gv42-6qwv, reported by EQSTLab). 0.7.0 refused a weakADMIN_PASSWORDin production, but any otherNODE_ENV(includingnpm run start:prod, which sets none) still created the first admin asadmin/adminwhenADMIN_PASSWORDwas unset. Now the first admin never gets a known password: unset outside production, a random 32-character password is generated and printed once, only by the instance whose seed was stored (a configured password is never logged);admin,password,changeme,change_this_passwordand.env.example'sREPLACE_ME_WITH_A_STRONG_PASSWORDare refused everywhere unlessALLOW_INSECURE_ADMIN_PASSWORD=trueoutside production. Production's rules are unchanged, and also refuse the.env.exampleplaceholder.GET /admin/auth/demo-infono longer falls back toadmineither. The E2E suite sets explicit test credentials. The docs no longer mention a default password.
Install
- Docker:
docker pull islamawad/idenplane:0.8.1 - Helm: chart
0.4.1fromhelm/idenplane(appVersion0.8.1) - Upgrading from 0.7.x or earlier: read the 0.8.0 Before you upgrade notes too. That upgrade can't be rolling.