Default organization flow for SSO_ONLY
#7106
Replies: 4 comments 2 replies
|
same problem here, I can't reach the password creation screen for my new sso users because of "The current user isn't member of the organization" |
|
Already fixed in |
I'd rather take the organization(s) to join from an OIDC claim.
That would allow for better segmentation of credentials and who gets to access them. That does not quite align with your first scoping constraint as it may assign any number of pre-existing organizations. I would still think that it is reasonable to implement.
|
|
I’ve implemented this in #7422. The approach uses a SSO_DEFAULT_ORG config variable: on first successful SSO login, if the user isn’t already a member of the configured default organization, they get automatically enrolled as a regular User. It reuses the existing organization membership/invitation code paths and integrates into the current SSO auto-enroll flow, matching the narrow scope outlined here — a single pre-existing org, no auto-creation of new orgs, no full group/org sync. Now it’s up to the maintainers to weigh in and see what they think of the approach |
Uh oh!
There was an error while loading. Please reload this page.
I would like to discuss an opt-in flow for
SSO_ONLY=truewhere SSO users can be automatically invited or provisioned into a pre-existing default organization.Current behavior
Today, SSO authentication works, but organization membership is still separate and manual.
In practice, the flow is:
References:
https://github.com/dani-garcia/vaultwarden/wiki/Enabling-SSO-support-using-OpenId-Connect
How can I set up all SSO users to automatically be members? #6192
SSO: "Failed to retrieve the associated organization" #6374
Code context
From the current codebase:
create_organization()creates the organization, the creator membership, and the initial collection, but does not provide any default-org SSO behavior:src/api/core/organizations.rsGET /organizations/<identifier>/auto-enroll-statusvaultwarden-dummy-oidc-identifiersrc/api/core/organizations.rssrc/sso.rsProposal
Add an opt-in configuration for a pre-created default organization when
SSO_ONLY=true.For example:
SSO_DEFAULT_ORG_NAME=<name>or similarExpected behavior:
This would remove the current requirement to bootstrap with a local user just to manually invite every SSO user.
Prior art
OIDCWarden appears to already implement related features:
Relevant commits include:
cff6c2b3— base SSO + organization enrollment handling14de1e71— allow group/organization mapping to trigger invitation1497dded— organization role support0c006894— organization/group sync rework74819b95—SSO_ONLYinvite-flow fixIt still requires the organization to be created first.
Reference:
https://github.com/Timshel/OIDCWarden
Possible implementation direction
A minimal first step could be:
Scope boundary
This proposal is intentionally narrow:
The goal is to reduce the current
SSO_ONLYbootstrap friction while keeping the scope small and clearly separated from broader commercial-module functionality.All reactions