Fix HTTPS OIDC callback behind the reverse proxy #8
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/oidc-proxy-https"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause
The public
https://dome.marut.network/oidc/authenticate/currently emitsredirect_uri=http://dome.marut.network/oidc/callback/(confirmed from its actual 302 Location). The provider error combines unknown client and mismatched callback into the same message. Dome missed the trusted-proxy setting present in Mado, so Django sees the internal HTTP transport instead of external HTTPS.Fix
Set
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https"), matching Mado. No client ID changes, HTTP production callback registration, manual callback override or mode flag. Document that the trusted proxy must overwrite the header and block direct untrusted access to the application port.Verification
git diff --checkpass. Independent read-only review passed.Rollout
Deploy this commit using the existing trusted TLS-terminating proxy. Ensure the registered callback remains
https://dome.marut.network/oidc/callback/. The live deployment still emits HTTP until updated. Rollback is reverting the single setting; no schema changes.