Skip to content

[PM-33164] Fix OIDC response_mode to use spec-compliant default#7154

Open
boris324 wants to merge 1 commit intobitwarden:mainfrom
boris324:fix/oidc-response-mode-fallback
Open

[PM-33164] Fix OIDC response_mode to use spec-compliant default#7154
boris324 wants to merge 1 commit intobitwarden:mainfrom
boris324:fix/oidc-response-mode-fallback

Conversation

@boris324
Copy link

@boris324 boris324 commented Mar 4, 2026

Fixes #5461

Summary

Changed the hardcoded response_mode from form_post to query for external IdP OIDC configurations in DynamicAuthenticationSchemeProvider.

Per the OpenID Connect Discovery 1.0 spec, when the response_modes_supported field is omitted from the IdP discovery document, the default supported modes are query and fragmentnot form_post.

This fix resolves SSO login failures with strict IdPs (e.g., Kanidm) that do not support form_post and actively reject requests using it. The query mode is already what Bitwarden accepts on the callback path, so this change aligns the request with actual behavior.

Test plan

  • Verify SSO login works with IdPs that only support query response mode
  • Verify SSO login still works with IdPs that support both query and form_post
  • Check that the OIDC authorization redirect uses response_mode=query

Change hardcoded response_mode from "form_post" to "query" for
external IdP OIDC configurations. Per OpenID Connect Discovery 1.0
spec, the default supported response modes when omitted are "query"
and "fragment" - not "form_post". Using "form_post" breaks SSO login
with strict IdPs that don't support it and actively reject it.

The "query" mode is what Bitwarden already accepts on the callback,
so this change aligns the request with actual behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@boris324 boris324 requested a review from a team as a code owner March 4, 2026 22:47
@boris324 boris324 requested a review from enmande March 4, 2026 22:47
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-33164
Link: https://bitwarden.atlassian.net/browse/PM-33164

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title Fix OIDC response_mode to use spec-compliant default [PM-33164] Fix OIDC response_mode to use spec-compliant default Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenID Connect response_mode handling - flawed discovery, missing validation

3 participants