DISCUSSION
There are some discussions (see references) on "forced 2FA" inside the TOTP-2FA-Repo that should be continued here in "core".
What's it about?
There should be a GUI (with some backend logic) to...
Ideas and discussions
My initial idea on that is to provide a table (just like user admin) with a list of all configured 2FA endpoints like so:
I made a gist with the (very-early-super-basic) idea of the GUI.
@GitHubUser4234 (correctly) objected that the force-state I was thinking about can be skipped if there is a checkbox like "force" for an entity.
More Ideas
@ChristophWurst wrote
to me, the grid view looks complex and overwhelming. Also I'm worried about real-world setups where you have thousands of users and numerous groups. The grid would be really long then.
No, it should not. The list will only contain entities that differ from the default state.
References
What do you think? ;)
cc @nextcloud/designers
@ChristophWurst Would be great if you could somehow find the related guys to remind them to have a look at it, this PR is awesome!
(from my comment in #41)
What I would like to see is a way to see which users in the system have enabled 2FA..
Overall IMHO an implementation of "Required 2FA" would be
The ideas above are just the perfect recipe for what am looking for;
But it looks like it may take a while to accomplish it all, the more immediate need is the ability to be able to force 2FA and be able to check which users have it enable/disable. In the initial enable process a Temp one time password key could be generated for the user with option to automatically redirect them to their "personal page" from where they can complete the 2FA setup.
This is a blocker issue for adoption at my company. If I can't require 2FA for all users, then we cannot use the product. I've tried to use sudo -u apache ./occ twofactor:enable
as a workaround, but even that doesn't seem to work.
Any ETA on when this might be implemented?
Agree with @stobias123 This would make Nextcloud soo much better for enterprise users.
Design wise;
Glad y'all are working on this! It's great to have 2FA as an option, but as an admin, the ability to _force_ 2FA is a requirement—otherwise I spend too much time chasing down users and telling them to opt-in. If folks can cheat, they'll cheat.
A simple "force" checkbox on the the plugin config page would satisfy my needs—I don't plan to allow users to opt-out of 2FA once it's enabled instance-wide.
Agree with @stobias123 This would make Nextcloud soo much better for enterprise users.
Who also have the option to go to https://nextcloud.com/enterprise/ to see the development actually speed up here 😉
@LukasReschke - It's a bit hard to sell management on the pitch that "if we buy it, maybe they'll prioritize real enterprise features."
That said.. We do have a quote from the nextcloud team and will be purchasing support.
Nextcloud devs, We have several customers who are wanting this feature in place. Is there some kind of bounty that could be setup, such that if we raise X amount of $ you'll get this done in a certain time-frame?
Is there some kind of bounty that could be setup, such that if we raise X amount of $ you'll get this done in a certain time-frame?
@urkle while there is bountysource indeed (as pointed out by @MariusBluem ) this is more suitable for our sales team I think, please contact them ( sales AT nextcloud.com )
I can help in the design stuff if needed.
@Espina2 @nextcloud/designers That would be appreciated. Design proposals are always welcome :-)
Also note that not all actions may be available, so for some factors self-enrolling may not be available or resetting the token may not be available. This also needs to be kinda reflected in the UI.
Also you may have hundreds of thousands of users so a search and paging should work etc… :-/
@LukasReschke I will try come with something tomorrow. I will post and after that he can tune that kind of details. :)
It seems that it would best be integrated in the Users management directly, right? There you directly have the groups and users, can manage defaults and exceptions. cc @LukasReschke
What I would propose for the UI is to keep it much simpler. Right now, each of the 2FA techs is a separate app, right? TOTP and U2F at least. So you don't have to decide WHAT 2FA is enforced or allowed: the ones that are are installed, simple. For that 1 in a million use case where you want a different 2FA support for one group than for another (why on earth?) - built a custom app please 🌷
So then the admin UI is simply "enforce 2FA" and then the user can use any of the 2FA solutions that are installed.
The UI for enabling 2FA doesn't have to be done at the login screen, that creates the problem of having to maintain two interfaces. Better redirect the user to the login screen with the 2FA authentication whenever he/she logs in and bother him/her hard enough to enable it. Think about hiding the app bar with CSS, perhaps disabling file syncing if that's relatively easy.
Sure, the user can work around it but if they HATE their IT department that much that they want to avoid enabling 2FA at all cost (including having to edit CSS and live with no file access) well - I'd say they deserve and can have it 💛
This is less work, less maintenance AND much simpler. Am I right, @boppy ?
Suggestion.
While these subsystems are getting reshuffled, make it intentionally _multifactor_ auth, with an enable/disable option per-each, and a counter-with-max of 2-or-sum-of-enabled for "how many minimum required".
What I would propose for the UI is to keep it much simpler.
I second that.
From the user point of view, the default should be as simple as Activate 2FA, yes/no and they it displays a TOTP qrcode that can be scanned from FreeOTP or Google Authenticator. That will work for everyone.
If other 2FA need to be implemented, they can be at a later time.
Hey guys,
Is there anything new regarding the two factor authentication? I am really looking forward to a even better solution within Nextcloud. Thanks to the Nextcloud team and its community for their contribution so far.
Yours
I've started planning this feature. Please see the overview board at https://github.com/orgs/nextcloud/projects/17 and the linked tickets targeting specific aspects of enforced 2FA. People who have helpful insights on these topics, please feel free to add your comments and provide feedback to the specs outlined in individual tickets.
Hello,
I ended up upgrading (fresh install) to v14.x this weekend and ran across the "Official" 2FA app/module and got excited! I see this has been in the works for a while and just wanted to get a feel as to when it might be ready and working?
I created a test user that is not currently in a group (have the 2FA with default "no group unchecked")
Logging into a web browser (firefox), 2FA box is not checked... so I would assume "Disabled".
Running the cmds below I attempted to enable it. When I logged back in to the browser session it was still unchecked (disabled). I even restarted services.
[root@nextcloud nextcloud 271]# su -m www -c 'php /usr/local/www/nextcloud/occ twofactorauth:disable testuser'
Two-factor authentication disabled for user testuser
[root@nextcloud nextcloud 272]# su -m www -c 'php /usr/local/www/nextcloud/occ twofactorauth:enable testuser'
Two-factor authentication enabled for user testuser
[root@nextcloud nextcloud 273]# su -m www -c 'php /usr/local/www/nextcloud/occ twofactorauth:state testuser'
Two-factor authentication is not enabled for user testuser
Disabled providers:
- backup_codes
- totp
From the output, the "enable" cmd looks like it does the job, but the "state" cmd output says otherwise.
Hoping to force enable all users via CLI.
@fireheadman you'll need to wait till version 15. There you can enforce 2FA for all users / groups.
Also lets close this ticket as it is done in 15
in nextcloud 15 from snap, to make this app work , you would want (or should I say must) to execute this with nextcloud.mysq-client:
ALTER TABLE oc_twofactor_admin_codes MODIFY COLUMN id bigint AUTO_INCREMENT;
Otherwise it will error out with SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value.
As it uses sql statement without altering record id...
Please file new tickets for bugs.
I'm locking this issue as resolved.
Most helpful comment
I can help in the design stuff if needed.