? ? ? Pending

User tests: Successful: Unsuccessful:

avatar AlexKirndoerfer
AlexKirndoerfer
10 Sep 2019

Summary of Changes

Added Enforce Two Factor Authentication to the core.

This change is supposed to force the user both in Back- and or Frontend to first setup their Two Factor Authentication before being able to proceed.
The enforcement triggers when the user tries to navigate somewhere else or the page is being reloaded.

Testing Instructions

  1. Setup Joomla! 4.0-dev build
  2. In the menu go the System
  3. Click on Plugins
  4. Then search for Two Factor Authentication
  5. Enable a Two Factor Authentication Plugin of your choice

image

  1. Edit the Two Factor Authentication Methode that you choose
  2. Select where the Authentication should be enabled Front- or Backend or Both (default is both Front- and Backend)
  3. After that click save & close
  4. In the menu now go again to System
  5. Click on Global Configuration
  6. Now scrolle down and click on Users at the bottom left
  7. At the bottom there should be a label Enforce Two Factor Authentication
  8. Select now where and if Two Factor Authentication should be enforced, note it should be the same setting as in point 8

image

  1. After that click save & close.
  2. Now depending on your settings go to the Frontend and log in or try to navigate somewhere else.

Expected result

You will be redirected to your user edit page until you finished successfully setting up Two Factor Authentication.

Documentation Changes Required

Description of the feature in the documentation, hence it is a core feature

avatar AlexKirndoerfer AlexKirndoerfer - open - 10 Sep 2019
avatar AlexKirndoerfer AlexKirndoerfer - change - 10 Sep 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Sep 2019
Category SQL Administration com_admin Postgresql com_config Language & Strings Installation Front End Plugins
avatar AlexKirndoerfer AlexKirndoerfer - change - 10 Sep 2019
Labels Added: ? ?
avatar SharkyKZ
SharkyKZ - comment - 10 Sep 2019

Why are plugin options in Global Configuration?

avatar infograf768 infograf768 - change - 10 Sep 2019
Title
Enforce2fa
[4.0] Enforce2fa
avatar infograf768 infograf768 - edited - 10 Sep 2019
avatar wilsonge
wilsonge - comment - 11 Sep 2019

Why are plugin options in Global Configuration?

I think it maybe makes more sense to put it in User Manager but this is a case where I don't think it necessarily makes sense to have them in the plugin. The plugin exists to force a redirect on every page but it's more like an extension to com_users than it is something truly independent

avatar SharkyKZ
SharkyKZ - comment - 11 Sep 2019

If the redirect is performed by the plugin (it is), the configuration options should be in the plugin. No need to couple it with anything here.

avatar roland-d
roland-d - comment - 11 Sep 2019

If the redirect is performed by the plugin (it is), the configuration options should be in the plugin.

We are doing the same thing with the Recaptcha.

avatar roland-d
roland-d - comment - 11 Sep 2019

Why are plugin options in Global Configuration?

They are not really the plugin options, someone can provide another plugin to enforce 2FA. Just as we do with reCaptcha.

avatar SharkyKZ
SharkyKZ - comment - 11 Sep 2019

They are not really the plugin options, someone can provide another plugin to enforce 2FA. Just as we do with reCaptcha.

Not a valid comparison. Captcha is a plugin group. This is a single system plugin. Unless you want to add enforce2fa plugin group and add selector for choosing which plugin from the group to use (please don't), the options should really be in the plugin.

avatar roland-d
roland-d - comment - 11 Sep 2019

Looking at how the plugin is now, we might as well move the code into the core and out of the plugin. How is that for an idea?

avatar brianteeman
brianteeman - comment - 11 Sep 2019

Looking at how the plugin is now, we might as well move the code into the core and out of the plugin. How is that for an idea?

I dont see this as functionally any different to the password requirements code which is just part of core without a plugin

(not comparing the aims etc of the code just the method of implementation)

avatar SharkyKZ
SharkyKZ - comment - 11 Sep 2019

Looking at how the plugin is now, we might as well move the code into the core and out of the plugin. How is that for an idea?

That would work, if you actually want TFA coupled with the application. Looking at existing TFA code I can't really tell whether it's hardcoded intentionally or because our login forms don't support plugins.

avatar joomla-cms-bot joomla-cms-bot - change - 11 Sep 2019
Category SQL Administration com_admin Postgresql com_config Language & Strings Installation Front End Plugins SQL Administration com_admin Postgresql com_config Language & Strings Installation Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 11 Sep 2019
Category SQL Administration com_admin Postgresql com_config Language & Strings Installation Libraries Administration com_config Language & Strings Libraries
avatar AlexKirndoerfer AlexKirndoerfer - change - 11 Sep 2019
The description was changed
avatar AlexKirndoerfer AlexKirndoerfer - edited - 11 Sep 2019
avatar AlexKirndoerfer
AlexKirndoerfer - comment - 11 Sep 2019

Moved enforce2fa to the core and updated the initial comment

avatar AlexKirndoerfer AlexKirndoerfer - change - 11 Sep 2019
The description was changed
avatar AlexKirndoerfer AlexKirndoerfer - edited - 11 Sep 2019
avatar AlexKirndoerfer AlexKirndoerfer - change - 11 Sep 2019
The description was changed
avatar AlexKirndoerfer AlexKirndoerfer - edited - 11 Sep 2019
avatar joomla-cms-bot joomla-cms-bot - change - 12 Sep 2019
Category Administration com_config Language & Strings Libraries Administration com_users Language & Strings Libraries
avatar AlexKirndoerfer AlexKirndoerfer - change - 12 Sep 2019
The description was changed
avatar AlexKirndoerfer AlexKirndoerfer - edited - 12 Sep 2019
797fa81 12 Sep 2019 avatar AlexKirndoerfer fix
avatar wilsonge
wilsonge - comment - 13 Sep 2019

Cache the result of the plugins in the session so that it's only done on the first page load per user being checked. Should reduce the performance hit.

avatar AlexKirndoerfer
AlexKirndoerfer - comment - 14 Sep 2019

added the use of sessions to determine whether the user has already setup 2fa

avatar ahghatol
ahghatol - comment - 19 Oct 2019

I have tested this successfully on 78df304

avatar tushar33 tushar33 - test_item - 19 Oct 2019 - Tested successfully
avatar tushar33
tushar33 - comment - 19 Oct 2019

I have tested this item successfully on 3d05393


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26253.

avatar Quy Quy - change - 19 Oct 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 19 Oct 2019

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26253.

avatar wilsonge wilsonge - change - 19 Oct 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-10-19 21:49:50
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 19 Oct 2019
avatar wilsonge wilsonge - merge - 19 Oct 2019
avatar wilsonge
wilsonge - comment - 19 Oct 2019

Thankyou again for coding this!

avatar SharkyKZ
SharkyKZ - comment - 19 Oct 2019

Still think it's bad idea to use plugin params like this.

avatar wilsonge
wilsonge - comment - 19 Oct 2019

I'm happy to see us find a way to improve that if we can find something straightforward

Add a Comment

Login with GitHub to post a comment