Replies: 2 comments 1 reply
|
Decided: an account belongs to exactly one provider. That was the question blocking the design, so here is the reasoning and what follows from it. A household is a list of people, and a person has one identity source. Letting one account hold two identities buys flexibility that nobody in a household actually needs, and it costs a new table plus a migration that every existing installation has to survive. But one thing does have to change before a second provider is allowed in, and it is not in the list above: CREATE UNIQUE INDEX idx_users_oidc_sub ON users(oidc_sub) WHERE oidc_sub IS NOT NULL;That index is global, and So the identity work is: lookup and uniqueness move from Still open, and the harder half: where the configuration lives. Numbered variables ( Related: #847 (SSO as the only way in) is implemented in #849. |
|
Correcting myself: the identity half does not stand on its own after all. My last comment said the lookup change - moving from What breaks. Where the actual key comes from. The projects that solve this properly - Nextcloud's So the two halves are one piece of work after all, and in this order: decide where provider configuration lives and what names providers get, then build the lookup and the index on that name. Doing the index first would be a migration that has to be migrated again. What does stay true from the last comment: the security reasoning. One implementation note for whoever gets there, since it is easy to miss: Still open, and still the deciding question: numbered env vars do not fit the wizard or the deploy descriptors, a JSON blob in the env is hostile to the wizard, and a database table means SSO configuration stops being reproducible from |
Uh oh!
There was an error while loading. Please reload this page.
Split out of #654, where @Kyrodan asked for it alongside three other SSO wishes. This one is separate because it is by far the largest of them: it touches the data model, not just the login screen.
The request. Support more than one OIDC provider, each with its own button label on the login page ("Sign in with Authentik", "Sign in with Entra ID") rather than the single generic "Sign in with SSO".
Why this is not a small change. The current implementation assumes exactly one provider throughout:
OIDC_ISSUER,OIDC_CLIENT_ID,OIDC_CLIENT_SECRET,OIDC_REDIRECT_URI) with no room for a second set. Numbered variables (OIDC_2_ISSUER) would be an awkward fit for a wizard and for the deploy descriptors, several of which enumerate every variable by hand.Configuration./oidc/startand/oidc/callbackcarry no provider identifier, so a callback cannot tell which provider it came from.usersstores oneoidc_suband oneoidc_provider. Two providers means either one identity per account per provider (a new table) or a decision that an account belongs to exactly one provider.The
oidc_providercolumn already stores theissclaim rather than a fixed string, which was done with exactly this in mind, so the identity side is not starting from zero.Open questions:
.envalone, which is a real loss for a self-hosted app.I would want the first question answered before anything is designed, since it decides whether this needs a migration at all.
Related: #654 (
OIDC_ALLOW_SIGNUP, shipped) and #847 (SSO as the only way in).All reactions