Bootstrap-styled error page for OAuth allowlist denial and other auth failures #57
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proxy#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Today the auth failure response in
hero_proxy_serveris a bare HTTP body string, surfaced by the operator (mik-tf) walking through a denied SSO flow and landing on a near-unstyledForge user not in admin allowlistpage that looks like the browser's default error chrome. There are seven such sites incrates/hero_proxy_server/src/proxy.rsreturning plaintext bodies for failures (Body::from("Email not in allowed list")at proxy.rs:533,Body::from("Forge user not in admin allowlist")at proxy.rs:540,Body::from("Unauthorized")at proxy.rs:387 for bearer auth,Body::from(format!("Signature auth failed: {e}"))at proxy.rs:455 and the missing bearer/signature header case around proxy.rs:461 to 466, plus one site indomain.rs). Proposal: add one Askama templateoauth_error.htmlextending the same Bootstrap base the cockpit uses (hero_admin_lib), rendered for the three distinguishable error classes (not_in_allowlist,oauth_exchange_failed,bearer_or_signature_missing), with an industry-standard shape: clear "Sign in failed" heading, one-line plain-English reason, a "Try again" primary button that retriggers the OAuth dance, a secondary "Sign in with a different account" link that clears the session and re-OAuths, and a small "Need access? Contact the workspace admin." footer line. Estimated scope around 2 to 3 hours including the template, the three error-class wire points in proxy.rs, and a minimal integration test that asserts the error class lands as HTML with the right status code.Signed-by: mik-tf mik-tf@noreply.invalid