Repository navigation
Conversation
Keep existing installations enabled by default and make the sign-in policy and self-service factor decisions honor the server setting without changing stored credentials. Refs ZL154#345
Refuse passkey ceremonies before side effects, reject passkey sign-in bridge tokens, and share the effective challenge inventory across the provider, middleware and portal. Keep saved credentials visible for removal while reporting effective coverage and self-service eligibility. Refs ZL154#345
Check the exact configuration Jellyfin is about to save after the step-up gate and return a conflict listing users who still depend on passkeys. Reuse the challenge inventory for imports and inspect full-import replacement records before writing either configuration or user data. Refs ZL154#345
Keep each existing sign-in entry point compatible with the enabled default. Use the shared usable-method inventory only for the new disabled state and its turn-off guard, so upgrading does not normalize unrelated legacy challenge behavior. Refs ZL154#345
EmergencyLockout rearms PasskeyRequiresSecondFactor again from the stored credentials, as ZL154#343 did. Rearming only adds protection; tying it to the new switch left an opted-out passkey in place during an emergency taken while passkeys were off, and that passkey would skip the challenge once they were turned back on. Rename PasskeyPolicy.HasEnrolled to HasUsable: it returns false for a user with enrolled passkeys while the server has them off, so the old name misled exactly where the distinction matters. Document PasskeysEnabled, point HideBuiltInPasskeyButton to it, comment the public-config field, say when SignInFactors uses the shared inventory, and fix the whitespace of the new test files. Refs ZL154#345
…in pages The server refuses passkeys while PasskeysEnabled is off, so the pages stop offering them. inject.js leaves out the passkey sign-in button. The Setup page drops the registration controls, the ZL154#343 switch and the passkey option of its step-up prompt, and keeps saved passkeys listed with a notice so users can still remove them. The admin page gets the "Allow passkeys" setting next to email codes, offers the passkey in its step-up modal only while passkeys are allowed, and reads that again after a save. A save the server refuses with 409, because some users would be left without another way to verify their sign-in, now names those users as text in the page language and leaves the form as the admin left it. A refused save no longer ends in an uncaught promise rejection. The challenge page needs no change: it offers the passkey only when the server lists it, which a new test pins. New strings in all eight bundles, Node tests for each page, and the two new test files in CI. Refs ZL154#345
Explain what turning passkeys off does on the server and on the pages, why turning it off is refused while a user depends on a passkey, the two ways out, and how it differs from hiding the passkey button. Point to it from the passkey section and from the hide-buttons section. Refs ZL154#345
The turn-off guard only looked for users with nothing left to answer the sign-in challenge. Two other ways the switch could quietly drop a second factor slipped through: - an email or recovery code answers the challenge but never makes it required, so a user whose passkey choice was the only reason password sign-in asked for a second factor would be left with the password alone; - a recovery code or a Telegram chat answers the challenge but is not a self-service factor, so the Setup page step-up would stop asking for proof. The guard now lists a user with stored passkeys when any of the three holds, through the challenge inventory, the sign-in challenge policy (with the user's administrator status for the enforcement scope) and the self-service factor list as they are. The refusal, the settings help text and the README now say that these users rely on a passkey for their second factor. Also drop a needless cast and simplify an assertion in the save tests. Refs ZL154#345
…e sign-in Restore the original session fault handling and leave structural recovery for a separate change.
4 tasks done
| return providers.Count == 0 | ||
| || (providers is [Type other] | ||
| && other.Assembly == serverAssembly | ||
| && other.FullName == "Jellyfin.Server.Implementations.Users.InvalidAuthProvider"); |
| if (condition == "scope") fixture.Config.EnforcementScope = EnforcementScope.All; | ||
| if (condition == "totp") await fixture.Store.MutateAsync(fixture.User.Id, d => d.TotpEnabled = d.TotpVerified = true); | ||
| if (condition == "password") fixture.User.Password = "stored"; | ||
| if (condition == "missing") fixture.Users.GetUserById(fixture.User.Id).Returns((User?)null); |
9 of 16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the second part of #360, from the reporter's follow-up comment. For an account that cannot sign in with a password at all, the "Ask for a second factor after password sign-in" preference no longer makes the account require a sign-in challenge. The rule applies only when all of these hold: the account has no local password, Block sign-in with an empty password is on, the account signs in through this plugin's own provider, and that provider delegates password checks to Jellyfin's built-in provider. The stored preference is never changed and applies again as soon as the account gets a password.
Mandatory scope, a verified authenticator app and pending emergency recovery still require the challenge (recovery is reported with a new
recoveryreason). Setup hides the switch for such an account and shows "Password sign-in is unavailable for this account. Your passkey preference is saved for when password sign-in becomes available." in all eight languages. MyStatus, the admin Users list and the user export report the same effective reason. On Quick Connect, an approval only creates verified trust for the new session when the approving session itself carries proof.Depends on #347. This branch is stacked on #347 because both change the same policy line: the new rule sits inside #347's
PasskeyPolicy.HasUsablecheck, and #347's disable guard passes the new argument explicitly. The first 8 commits are #347; this PR adds the 13 commits aftere1d9871. Please merge #347 first, and I will rebase this branch onto main right after.Type of change
Related issues
Refs #360 (the redirect part is in #361). Depends on #347.
How was this tested?
Server tested against: Jellyfin 10.11.11 and 12.4.0 (official Docker images, disposable containers), with packages built from #347 alone (
e1d9871) and from this branch (52c31d7) for each ABI.Clients tested with: Jellyfin Web in headless Chromium 159.0.8154.6 with a CDP virtual authenticator for the passkey, driven by a script against those running servers.
twoFactorRequired, portal,ChallengeIssued). With this branch it was not: every protected request succeeded, no audit entry or verified mark was created for the restored token, and the stored preference stayed on.Checklist
dotnet formatif unsure)dotnet build+dotnet testgreen)Screenshots / log slices
Live results, password removed, account on the plugin's provider, server restarted:
e1d9871)52c31d7)Local checks on the stacked branch:
Additional notes
Trade-off: for an eligible account, an OIDC or proxy sign-in with its bypass turned off, and a session restored after a restart, no longer get the passkey-only challenge. That challenge protected a password sign-in the account cannot make.
Scope: the plugin can confirm this only for accounts that sign in through its own provider, so accounts assigned directly to Jellyfin's default provider keep today's behavior. An installation with any other authentication provider (for example an LDAP plugin) also keeps today's behavior, even when that provider is disabled or listed after the built-in one.
This branch has textual overlaps with #361 (README) and #352 (
Plugin.cs). I will resolve them by rebasing whichever is merged later.