FR: TOTP 2FA for internal auth #2544
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2544
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?
What new feature do you want to see? What problem does it solve?
It would be really helpful for c10y users to be able to set up a 2FA mechanism for their accounts. Homeservers can already achieve this by delegating auth to an OIDC provider, but for smaller homeservers this adds a lot of additional complexity just to improve account security, in cases where the homeserver is too small to otherwise justify an OIDC setup. Users with 2FA set up would not be able to log in via UIA.
Further reading
No response
Additional context
What I'd really like to do is reduce how susceptible users are to casual password guessing. Another possible way to do this, if integrated 2FA is considered a bit much for the internal auth system, might be a way to enforce a minimum password strength.
The issue with adding native support for anything more than username+password is that we can't offer those options to people running in hybrid oauth compatibility mode, because Matrix's UIA authentication (the challenge/response mechanism predating OAuth) doesn't have support for arbitrary flow stages, nor any sort of two-factor auth. This is the same reason we can't really implement support for passkeys or other common goodies like that. Supporting additional security factors or auth methods would require servers switch to "exclusive" oauth compatibility mode, however ecosystem support for oauth - while growing - is still pretty lacklustre. Plus, switching to exclusive post-factum will break any legacy auth sessions, possibly in such a way that the user can never log in again (e.g. can't reset password or initiate a crypto key backup because UIA is now disabled).
I think the broad consensus from the maintainer team is that we'd love to implement extra stuff like this, but doing so will end up presenting a confusing and unintuitive UX. Ideally, legacy auth needs deprecating in the specification (it's not currently!) so that we can even remotely justify easing out support for it, but such a spec proposal would likely be fiercely contested and we don't have time to play the bureaucracy game long enough to see it through.
I think I've summarised the team's thoughts here but @ginger may have more to say, not sure