Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve HTTP 400 errors related to SSO/OIDC #170

Open
stevejalim opened this issue Oct 18, 2023 · 2 comments
Open

Resolve HTTP 400 errors related to SSO/OIDC #170

stevejalim opened this issue Oct 18, 2023 · 2 comments
Assignees
Labels
bug Something isn't working P1 Very important: do next

Comments

@stevejalim
Copy link
Collaborator

stevejalim commented Oct 18, 2023

Sometimes the Wagtail admin pages will trigger a 400 Bad Request error, which goes away if re-attempted (eg page is refreshed, or the draft is re-saved). This does result, frustratingly, in lost work, and is hard to predict, so frequent draft-saving is the only current mitigation, and that itself is not ideal.

The traceback puts this down to the SSO integration code from Mozilla's OIDC app.

mozilla/mozilla-django-oidc#303 outlines the actual issue when I (@stevejalim) encountered this on an MDN Wagtail build, plus mozilla/mozilla-django-oidc#312 as a related issue and mozilla/mozilla-django-oidc#358 as a possible fix.

We can talk with SUMO about have had to deal with this, because mozilla/mozilla-django-oidc#358 suggests it should be a solved thing.

However, if we can't remedy it with OIDC-level configuration we could also consider:

  • adding autosave to Wagtail in a way that automatically refreshes the OIDC session if need be
  • adding JS to the wagtail UI that periodically triggers a session refresh (without the autosave)
@stevejalim stevejalim converted this from a draft issue Oct 18, 2023
@stevejalim stevejalim added the bug Something isn't working label Oct 18, 2023
@stevejalim
Copy link
Collaborator Author

Here's the Sentry issue tracking this https://mozilla.sentry.io/issues/4524518956/

@stevejalim
Copy link
Collaborator Author

stevejalim commented Oct 19, 2023

Here's how it looks when it occurs - we could add custom HTTP 400 template to help explain things, but that's not much of a sticking plaster

Image

@stevejalim stevejalim self-assigned this Oct 19, 2023
@stevejalim stevejalim added the P1 Very important: do next label Oct 19, 2023
@stevejalim stevejalim moved this from Prioritized backlog to In Progress in Birdbox Nov 3, 2023
@stevejalim stevejalim moved this from In Progress to Prioritized backlog in Birdbox Nov 3, 2023
@stevejalim stevejalim moved this from Prioritized backlog to In Progress in Birdbox Nov 22, 2023
@stevejalim stevejalim moved this from In Progress to In review in Birdbox Nov 28, 2023
@stevejalim stevejalim moved this from In review to Done in Birdbox Nov 29, 2023
@stevejalim stevejalim moved this from Done to In review in Birdbox Nov 29, 2023
@stevejalim stevejalim moved this from In review to Done in Birdbox May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Very important: do next
Projects
Status: Done
Development

No branches or pull requests

1 participant