Migrate OIDC to ash_authentication identity_resource (UserIdentity) and unpin to 4.15+ #557
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
local-it/mitgliederverwaltung#557
Loading…
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?
Why — this changed on 2026-10-06
A disclosure of 18 advisories in
ash_authentication/ash_authentication_phoenixlanded today. The previous version of this issue said there was "no live gap" because
our custom design already resolves sign-in by the provider's
sub. That statement isstill true for the advisory it referred to, and no longer true for the issue as a whole:
several of the new advisories are not avoided by
sub-based resolution.Priority therefore moves from "maintenance before the requirement becomes hard" to
"security work ahead of the refactoring milestone".
What applies to us
Verified as not applicable (gated out by our configuration):
oidc_id == user_info.sub(`lib/accounts/user.ex:287),register_with_oidcupserts onunique_oidc_id` (:316, :606)require_token_presence_for_authenticationistrueinconfig/dev.exs:107and `confi, andretrieve_from_bearer/3` is not wired anywhererequire_interaction? true; no confirmation add-on, no magic-linremember_mestrategy not enabledrequire_confirmed_withfails openaudit_logadd-on configuredapi_keystrategymagic_linkstrategyMv.Accounts.User)Likely applicable — confirm each against the 4.15 source during analysis, do not take
this table on trust:
AshAuthentication.Strategy.OAuth2.Plug.callback/2, which ouroidcstrategy uses.sub-based resolution does not protect against it.jtiis never checked. Relevant givenstore_all_tokens? trueand a configuredsession_identifier.passwordstrategy hasresettablewith a sender.ash_authentication_phoenix, fixed in2.17.4;mix.exspins~> 2.10, so that partis a lockfile-only bump.
Scope
mix.exsto{:ash_authentication, "~> 4.15"}and updatemix.lock; bringash_authentication_phoenixto at least2.17.4in the lock.mix ash_authentication.upgrade) and wireidentity_resourceinto the:oidcstrategy. 4.14+ failsmix compile --warnings-as-errorsuntil this exists.email_verifiedhandling: a confirmation add-on monitoring:email, ortrust_email_verified? trueif the IdP is trusted to assert ownership.users.oidc_idintouser_identitiesas theprovider's
iss/subpair. See open questions — this is the step that can lock everyexisting member out of SSO.
register_with_oidc,link_oidc_id,OidcEmailCollision,LinkOidcAccountLive,OidcRoleSync.GHSA-777c-2fxx-qr28entry and its comment block from.deps_audit_ignore.Open questions
identity_resourceconfigured, what does 4.15 do on the firstlogin of a user who has no
user_identitiesrow — link the existing user, create aduplicate, or reject? This decides whether step 4 is a one-line backfill or a careful
migration. Verify against the 4.15 source, not the changelog.
subinusers.oidc_idbut notiss. Canissbe derivedfrom our single configured provider for the backfill, or does the first post-upgrade
login have to establish the pair?
email_verified?rauthy-bootstrap/clients.jsondoes not say; this needs checking against the instance.have to do it? Determines whether the session-fixation advisory is closed by the bump
alone.
Acceptance criteria
just cigreen with noGHSA-777c-2fxx-qr28entry in.deps_audit_ignore, andmix deps.audit --ignore-file .deps_audit_ignorereporting no findings.to the same
Memberrecord.to that user's account.
iss/subpair is already known resolves to the same local user.session_paramsentry behind(regression test for the replayable-state advisory).
users.oidc_idvalues, androlls back cleanly.
Notes
~> 4.15.0but carries nomix.lock, becauseits artifact step cannot compile 4.15 against the current code. Close it, or let this
issue supersede it.
this one.
Migrate OIDC to ash_authentication identity_resource (UserIdentity) and unpin to 4.14+to Migrate OIDC to ash_authentication identity_resource (UserIdentity) and unpin to 4.15+