pondersource / nextcloud-mfa-awareness

Make Nextcloud aware of whether the current user is logged in with Multi-Factor Authentication
MIT License
0 stars 2 forks source link

Review this snippet and merge it #58

Closed thepeak99 closed 7 months ago

thepeak99 commented 1 year ago

https://sunet.drive.sunet.se/index.php/s/NnnneoJXFSpCdKf

michielbdejong commented 1 year ago

enable_mfa_gss2.1.1.patch

michielbdejong commented 1 year ago

So this patch adds it to the autologin function of the gss slave https://github.com/nextcloud/globalsiteselector/blob/d5d07be/lib/Controller/SlaveController.php#L112 We want to add these lines somewhere in https://github.com/pondersource/mfazones How should the step-up authentication work? When you try to access an MFA zone? But these are not discoverable if you're not MFA verified, right?

As @mrvahedi68 said, we can trigger this when the user tries to click the greyed-out 'MFA required or not' settings dialog for a folder

mrvahedi68 commented 1 year ago

I put this patch in mfazones application and it was triggered but no dialog shown. this code fired below function from Manager.php: https://github.com/pondersource/server/blob/29470b44a923e82bf4d3c65e63e68b774d5fadcf/lib/private/Authentication/TwoFactorAuth/Manager.php#L392

And as you see there this function only set some config values for user and it will be useful before finishing the login progress.

[I tested it with Admin, another user created by Admin that was not in admin group, usr1 and usr2] @michielbdejong @thepeak99

michielbdejong commented 7 months ago

Duplicate of #72