mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
fix(auth): count a passkey as the second factor on the managed-profile acts
An account whose only strong credential is a primary passkey was refused auth.stepup.mfa_not_enrolled on every action behind requireFreshMfa, so it could not create, edit, hand over or delete a managed profile or manage its guardians, although a passkey sign-in or re-proof already stamps the session the gate reads. requireFreshMfa now defaults to the any-possession proof source: a passkey makes the gate reachable, and a passkey re-proof through the dialog clears it. The refusal offers passkey in meta.methods, never the password. hasSecondFactorEnrolled keeps its narrow meaning on purpose. It decides whether the conditional gates apply at all (account deletion, the data reset, the password change, the export, offering manage access, the recent-proof branches and the native Bearer rules), so none of those change, and password sign-in still challenges only TOTP and security keys. The MFA-management routes keep the second-factor source. The decision and its limits are written beside FreshFactorProofSource. Copy, the OpenAPI description and the sharing and key-rotation docs say "second factor or passkey" where this gate applies. Refs #959
This commit is contained in:
1 parent
d9b6061d28
commit
792fc89a93
17 files changed
+381
-63
No files matched your search
@@ -189,9 +189,11 @@ no password, no passkey and no e-mail address, and it is never presented
|
||||
as something to log in as.
|
||||
|
||||
- It is created from **Settings → Shared access**, under a fresh second
|
||||
factor. An account with no second factor enrolled is refused rather than
|
||||
waved through, because the act creates a permanent management
|
||||
relationship over a person who cannot object to it.
|
||||
factor. A passkey counts as one: a guardian who signs in with a passkey,
|
||||
or confirms it in the dialog the app opens, gets through. An account with
|
||||
neither a second factor nor a passkey is refused rather than waved
|
||||
through, because the act creates a permanent management relationship
|
||||
over a person who cannot object to it.
|
||||
- Creation takes a display name, optionally a real date of birth, and the
|
||||
language and timezone the record's own days and reminders are measured
|
||||
in. A year on its own is never turned into the first of January. The
|
||||
@@ -356,10 +358,11 @@ Four operational notes:
|
||||
and no address to look it up by.
|
||||
- **The second-factor requirement is not the same on both features, and
|
||||
the difference is deliberate.** Creating a managed profile, deleting
|
||||
one and inviting a second guardian require a second factor
|
||||
unconditionally: an account with none enrolled is refused and told to
|
||||
set one up, because those acts create or end a permanent relationship
|
||||
over somebody who cannot object. Offering manage access on an ordinary
|
||||
invitation asks for a fresh factor only from an account that has one, so
|
||||
one, handing it over and inviting a second guardian require a second
|
||||
factor unconditionally, and a passkey counts as one there: an account
|
||||
with neither is refused and told to set one up, because those acts
|
||||
create or end a permanent relationship over somebody who cannot object.
|
||||
Offering manage access on an ordinary invitation asks for a fresh factor
|
||||
only from an account with TOTP or a security key, so
|
||||
an instance where nobody has enrolled a factor can still use every level
|
||||
of ordinary sharing. All of them are browser-only either way.
|
||||
Reference in new issue
Block a user