fix(deploy): repair crash-looping CLI flags, wire missing security flags - #8
Conversation
--enable-totp-login/--enable-mfa/--enable-email-otp/--enable-sms-otp don't exist in the authorizer binary; cobra rejects unknown flags so every deploy from this Dockerfile crash-loops on boot. Renamed to the current --disable-totp-login/--disable-webauthn-mfa/--disable-email-otp/ --disable-sms-otp/--disable-mfa flags. Also added --url (CWE-640 host-header-injection mitigation, was never wired to any env var), --oauth2-1-strict, and --enable-org-discovery. Re-pinned the base image to 2.4.0-rc.7: 2.3.0 predates the flag rename above, so it doesn't have the --disable-* flags either. Move to the stable 2.4.0 tag once it ships.
Mirrors the same change in the helm chart. Without a distinct encryption key, rotating the JWT secret locks out every enrolled TOTP user with no re-encryption path.
Adds --fga-allow-unconstrained-agents, --microsoft-allowed-tenants and --oauth-allow-unverified-provider-email. Both booleans default false, matching the server's secure-by-default posture. 2.4.0 also made --enable-email-verification with no SMTP a fatal boot error rather than a per-user quirk. Nothing here sets it, so no template ships a crash-looping default, but an operator can set it from the platform env — so the READMEs now say what happens.
|
Pushed 2.4.0 config coverage on top of this PR. Two commits
New flags
Audit result: no template ships a crash-looping default2.4.0 turned The remaining exposure is an operator setting VerifiedI did not just eyeball the escaping — a broken
Then ran the extracted script with Booleans land on the secure default; the tenant list is empty, which the server reads as unrestricted. |
|
rc.15 was tagged and released but its build was cancelled, so no image was ever pushed — and it was cut from a commit predating the audit, so it could not have carried these flags anyway. rc.16 is the first RC that has them; verified against the published image.
✅ Blocker cleared — re-pinned to
|
rc.17 adds the verify-email decision core and the empty-subject token rejection, which rc.16 was built one commit too early to include.
Re-pinned to
|
| Suite | Result |
|---|---|
make test-all-db |
exit 0 — 42 packages, 0 failures, all seven backends (internal/storage 215s + arangodb, cassandradb, couchbase, dynamodb, mongodb, sql, schemas) |
make e2e-playground |
exit 0 — 86 passed (37.7s) |
Run sequentially rather than in parallel: no port overlap, but Scylla plus six authorizer instances and browsers contend for CPU, and a false red there costs more than it saves. Both stacks tore down cleanly — zero leaked containers either time.
rc.17 provenance verified two independent ways
Tag SHAs:
rc.17 -> 0ada7ef4 (the #755 merge commit, == main)
rc.16 -> 3f17f68a (one commit earlier)
And in the published images themselves:
ConsumeEmailVerificationToken: rc.17 → 3 matches
rc.16 → 0 matches
Plus all four new flags present in the rc.17 image (--encryption-key, --fga-allow-unconstrained-agents, --microsoft-allowed-tenants, --oauth-allow-unverified-provider-email).
helm lint clean; the chart renders image: quay.io/authorizer/authorizer:2.4.0-rc.17.
Ready to merge from my side.
rc.18 bumps cel-go to v0.29.2 for GHSA-gcjh-h69q-9w9g. Verified from the published image: the binary links cel-go@v0.29.2.
Re-pinned to
|
| Suite | Result |
|---|---|
make test-all-db |
exit 0 — 42 packages, 0 failures, all seven backends |
make e2e-playground |
exit 0 — 86 passed |
| CI Go tests + release smoke + Trivy | pass |
Both stacks tore down clean. helm lint and helm template pass, rendering image: quay.io/authorizer/authorizer:2.4.0-rc.18; each deployment Dockerfile's CMD was re-checked as valid JSON and valid shell after the edit.
Ready to merge.
Summary
--enable-totp-login/--enable-mfa/--enable-email-otp/--enable-sms-otpdon't exist in the authorizer binary; cobra rejects unknown flags and exits 1, so every Railway deploy from this Dockerfile currently crash-loops on boot. Renamed to the current--disable-totp-login/--disable-webauthn-mfa/--disable-email-otp/--disable-sms-otp/--disable-mfaflags.--url(CWE-640 host-header-injection mitigation — was defined nowhere in this repo),--oauth2-1-strict,--enable-org-discovery.2.3.0to2.4.0-rc.7:2.3.0predates the flag rename above and doesn't have the--disable-*flags either. Move to the stable2.4.0tag once it ships.Test plan
quay.io/authorizer/authorizer:2.4.0-rc.7image and confirmed the container boots and serves/healthz(previously exited 1 on the phantom flags)