-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Passwordless authentication does not ask for PIN when using security keys. #41599
Comments
Duplicate |
Well, I would not say that this is a duplicate of my issue, despite being very close. Here, now, Nextcloud seems to create a non-resident credential, and without PIN protection. This is a valid security threat: if someone finds a lost Yubikey with an email (stored in a field in PIV or GPG apps, or whatever), and tries to login with that email (if it matches NC user), all they would have to do is to touch the key. PIN protection should be required by default for non-resident FIDO2 credentials, with an option to turn it off for those who know what they are doing. My issue #41191 is about going fully-WebAuthn, without having to type a username, with user identification only by resident FIDO2 credential (aka passkey). In my vision, users should have 3 options when going passwordless:
|
While using a fido2 token without user verification (UV) as a 2nd factor is fine, using it without UV as a login method can lead to unauthorized authentication if someone get a physical access to the token. Until a fix is merged, users should avoid webauthn if they doesn't have a hardware token with UV required. As a workaround, if you self host your own Nextcloud instance you can add this hook: 20_FIDO2_UV.sh (must be executable)
docker-compose.yaml
|
@p1gp1g does #44442 have an option to keep the old way (without user verification)? While the current implementation is a valid security threat to most users (thank you for fixing it!), it's OK for some threat models (i.e. for one of my Nexclouds that's available from within the LAN only: I prioritize convenience of not doing UV here over a highly improbable event of a stranger using my webauthn token to access resources on my network - at least until #41191 is resolved). |
@tushev , as mentioned in the PR:
Regarding the convenience VS security : having a single character password is convenient, but it should not be allowed for regular users. Advanced users know they have to use a strong password and can in some very specific context (like an instance accepting requests from localhost only) use a weak one. So they don't need a technical solution to avoid weak passwords. But if there isn't a technical solution enforcing strong passwords, regular users will end with weak ones. That is why, by default you should technically enforce the use of strong password. |
@p1gp1g thank you!
Agreed. Ideally, such things should be hidden in a configuration file: this way most inexperienced users are barred out from disabling passwords strength enforcement. I guess the same may be implemented for UV at some point in the future. |
Bug description
Hello,
I created a post on this topic on July last year but I never got a reply. The passwordless authentication seems to work in an unusual manner. It works well when I create a passkey with my browser (I find it unusual that it asks for a username, but there is already an issue open on this topic). However, if I add a YubiKey as a login device, it doesn't ask for a PIN; touching the security key button allows the login. Thus, anyone who would borrow my security key could access my account. Furthermore, I notice YubiKeys which do not support passwordless login can be added. I was able to add a YubiKey 4 WebAuthn device passwordless authentication device; no PIN is set on this key since it doesn't support FIDO2.
Steps to reproduce
Expected behavior
The few passwordless implementations I know (Microsoft 365, Google) ask for a PIN; ownership of the security key is not sufficient to access the account.
Installation method
Community Manual installation with Archive
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 22.1 to 22.2)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
Let me know if you have any specific questions regarding my setup.
The text was updated successfully, but these errors were encountered: