fix(deploy): repair crash-looping CLI flags, wire missing security flags - #4
fix(deploy): repair crash-looping CLI flags, wire missing security flags#4lakhansamani wants to merge 4 commits into
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, and surfaced AUTHORIZER_URL/OAUTH2_1_STRICT in render.yaml. 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
|
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 Render 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. SurfacedAUTHORIZER_URL(sync:false, set in Render dashboard) andOAUTH2_1_STRICTinrender.yaml.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)