Skip to content
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

Guest users can't use 2FA #149

Closed
schiessle opened this issue Aug 9, 2019 · 6 comments
Closed

Guest users can't use 2FA #149

schiessle opened this issue Aug 9, 2019 · 6 comments
Labels
bug Something isn't working integration Compatibility with other apps/systems

Comments

@schiessle
Copy link
Member

If I try to enable 2FA (U2F) for a guest user I get a 500, the response body contains following message:

This application requires JavaScript for correct operation. Please enable JavaScript and reload the page.
Nextcloud
Error

    Access to this resource is forbidden for guests.

Nextcloud – a safe home for all your data

Also generating backup codes throws the same error.

@schiessle schiessle added the bug Something isn't working label Aug 9, 2019
@drhirn
Copy link

drhirn commented Nov 21, 2019

I had to whitelist the 2FA-app (twofactor_totp in my case) for guests to get it working.

@nursoda
Copy link

nursoda commented Oct 3, 2022

This still is an issue for multiple twofactor apps. As guest, in https://cloud.nextcloud.com/settings/user/security one cannot create Backup-Codes, enable TOTP or add webauthn-Tokens. "Nextcloud notification" can be switched on but it is not used. So it seems that 2FA isn't available for Guest accounts at all, at least in NC25.

@sebastiaanveld
Copy link

sebastiaanveld commented Oct 13, 2023

If I enale 2FA for Guest accounts on first logon they get a message that 2FA is enabled for them but not configured and to get in contact with the admin user. For internal accounts this works fine as at this same point you are forced to setup 2FA for your account.

Environment: Nextcloud 27.1.2, PostgreSQL, PHP 8.1, Apache2 (running on Ubuntu)

Result: guest account is not able to setup 2FA

Expected result: guest account should be able to setup 2FA at this point. For NC local admin account I've setup it this way and new local accounts are forces to setup 2FA at first logon. I would expect this to work the same wat for guest accounts.

Steps to duplicate:

  • Enable the Guest App
  • NC> Administration> Guests:
  • Enable "Limit guest access to an app's allowlist", add "twofactor_totp" and "twofactor_backupcodes". << mind with or without those you get the same messag at logon to nc as a guest.
  • NC> Administration> Security:
  • Two-factor authentication is enforced for all members of the following groups.: Add "guest_app". Mind that "admins" is also lised here for local admin accounts.
  • Now share an folder with an email address and select "Invite guest" to let them create an account
  • User receives the invite link. Create an account by adding the reuqested password.
  • The login dialog now apprears, so login with teh guest email and password just set.
  • Now the dialog appears on link https:///login/selectchallenge popping up "Twofactor authentication is enabled, but not configured for your account. Please contact yoiur admin for help".
  • Only option the user now has is to click "dismiss login".

Screenshot:
image

Now if you for NC> Administration> Security, remove "guest_app" from "Two-factor authentication is enforced for all members of the following groups." again and the logon as teh guest user Settings> Security also does not list the 2FA option which sloud be enabled by "Limit guest access to an app's allowlist" adding "twofactor_totp" and "twofactor_backupcodes" in the admin settings.

image

To add some context on the use case: We use the Sendent for Outlook plugin and would like to leverage sharing with guest accounts. For protecting shared data this requires 2FA for guest accounts.

@sebastiaanveld
Copy link

sebastiaanveld commented Feb 23, 2025

Thanks @st3iny, hope your work makes it into NC31.

@st3iny
Copy link
Member

st3iny commented Feb 23, 2025

Thanks, I guess we can close this now.

@st3iny st3iny closed this as completed Feb 23, 2025
@st3iny
Copy link
Member

st3iny commented Feb 23, 2025

PS: Yes, this is part of 31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integration Compatibility with other apps/systems
Projects
None yet
Development

No branches or pull requests

6 participants