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

Multi-Factor Authentication (replaces Two Factor Authentication) #37811

Closed
wants to merge 200 commits into from
Closed
Show file tree
Hide file tree
Changes from 198 commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
5b9f73b
Captive TFA
nikosdion May 13, 2022
fc8e8ae
Captive TFA
nikosdion May 13, 2022
e2ce55f
Captive TFA
nikosdion May 13, 2022
1525bed
Captive TFA
nikosdion May 13, 2022
30f2192
Captive TFA
nikosdion May 13, 2022
b9c0bf0
Captive TFA
nikosdion May 13, 2022
4b9047b
Captive TFA
nikosdion May 13, 2022
c4a257c
Captive TFA
nikosdion May 13, 2022
2e794f2
Captive TFA
nikosdion May 13, 2022
c21385b
Captive TFA
nikosdion May 14, 2022
39af3a5
Captive TFA
nikosdion May 14, 2022
9aaf82b
Captive TFA
nikosdion May 14, 2022
f2fb3f3
Captive TFA
nikosdion May 14, 2022
61cfe95
Captive TFA
nikosdion May 14, 2022
9711fb6
Captive TFA
nikosdion May 14, 2022
58a54bc
Captive TFA
nikosdion May 14, 2022
4c13691
Captive TFA
nikosdion May 14, 2022
3f3775c
Captive TFA
nikosdion May 14, 2022
89a7bd0
Captive TFA
nikosdion May 14, 2022
13fe960
Captive TFA
nikosdion May 14, 2022
d3017a4
Captive TFA
nikosdion May 14, 2022
51e9dbf
Captive TFA
nikosdion May 14, 2022
0994769
Captive TFA
nikosdion May 14, 2022
8ad9907
Captive TFA
nikosdion May 14, 2022
bc234a1
Captive TFA
nikosdion May 14, 2022
1333e52
Merge branch '4.2-dev' into feature/tfa
nikosdion May 14, 2022
47588c1
Captive TFA
nikosdion May 14, 2022
ddfa506
Captive TFA
nikosdion May 15, 2022
9611c36
Captive TFA
nikosdion May 15, 2022
8e11155
Captive TFA
nikosdion May 15, 2022
ab2e747
Captive TFA
nikosdion May 15, 2022
80a35a3
Captive TFA
nikosdion May 15, 2022
865f621
Captive TFA
nikosdion May 15, 2022
1c1a167
Captive TFA
nikosdion May 15, 2022
6045ba4
Captive TFA
nikosdion May 15, 2022
5ba08ed
Captive TFA
nikosdion May 15, 2022
7aaa6d9
Captive TFA
nikosdion May 15, 2022
259b4ba
Captive TFA
nikosdion May 15, 2022
25855e6
Captive TFA
nikosdion May 15, 2022
93ce4b2
Captive TFA
nikosdion May 15, 2022
82ef6a1
Captive TFA
nikosdion May 16, 2022
b275436
Merge branch '4.2-dev' into feature/tfa
nikosdion May 16, 2022
d7f0395
Captive TFA
nikosdion May 16, 2022
eef166e
Captive TFA
nikosdion May 16, 2022
b27cb8f
Captive TFA
nikosdion May 16, 2022
47d570f
Captive TFA
nikosdion May 16, 2022
92fbbb3
Captive TFA
nikosdion May 16, 2022
bdf19c4
Captive TFA
nikosdion May 16, 2022
9da3498
Captive TFA
nikosdion May 16, 2022
d3b20a5
Captive TFA
nikosdion May 16, 2022
2923cc9
Captive TFA
nikosdion May 16, 2022
68c0a16
Captive TFA
nikosdion May 16, 2022
4256f11
Captive TFA
nikosdion May 16, 2022
e321be0
Captive TFA
nikosdion May 16, 2022
aa98942
Captive TFA
nikosdion May 16, 2022
c150aba
Captive TFA
nikosdion May 16, 2022
7c96b49
Captive TFA
nikosdion May 16, 2022
d8a7d28
Captive TFA
nikosdion May 16, 2022
845cb67
Captive TFA
nikosdion May 16, 2022
67bc308
Captive TFA
nikosdion May 16, 2022
bddb12d
Captive TFA
nikosdion May 16, 2022
9c5be51
Captive TFA
nikosdion May 16, 2022
8958daf
Captive TFA
nikosdion May 16, 2022
157a823
Captive TFA
nikosdion May 16, 2022
2e74336
Captive TFA
nikosdion May 16, 2022
db4e68f
Captive TFA
nikosdion May 17, 2022
9353c23
Captive TFA
nikosdion May 17, 2022
9a56655
Captive TFA
nikosdion May 17, 2022
e81551b
Captive TFA
nikosdion May 17, 2022
4ec9196
Captive TFA
nikosdion May 17, 2022
6327372
Captive TFA
nikosdion May 17, 2022
27e12ba
Captive TFA
nikosdion May 17, 2022
536c3b5
Captive TFA
nikosdion May 17, 2022
add3d21
Captive TFA
nikosdion May 17, 2022
ca1df67
Captive TFA
nikosdion May 17, 2022
3f4b0d0
SQL code style and consistency fixes
richard67 May 17, 2022
5f795c9
Add "CAN FAIL" installer hint
richard67 May 17, 2022
cbf3517
Change longtext to mediumtext
richard67 May 17, 2022
b79caec
Change longtext to mediumtext in update script
richard67 May 17, 2022
2a5ab39
No default value for method
richard67 May 17, 2022
af54b6a
Use real null values for last_used
richard67 May 17, 2022
1433833
Captive TFA
nikosdion May 17, 2022
4561bd3
Captive TFA
nikosdion May 17, 2022
fa2a278
Captive TFA
nikosdion May 17, 2022
55e62f6
Captive TFA
nikosdion May 17, 2022
dcc511b
Captive TFA
nikosdion May 17, 2022
bb1ab26
Captive TFA
nikosdion May 17, 2022
0f5b388
Captive TFA
nikosdion May 17, 2022
ec3b7ee
Captive TFA
nikosdion May 17, 2022
0e385b1
Captive TFA
nikosdion May 17, 2022
63544ba
Captive TFA
nikosdion May 17, 2022
63ea23d
Captive TFA
nikosdion May 17, 2022
ba786c6
Captive TFA
nikosdion May 17, 2022
9cd5ebc
Captive TFA
nikosdion May 17, 2022
a9c3881
Captive TFA
nikosdion May 17, 2022
c5852fe
Captive TFA
nikosdion May 17, 2022
ab4fcab
Captive TFA
nikosdion May 17, 2022
39a79a0
Captive TFA
nikosdion May 17, 2022
ef88682
Captive TFA
nikosdion May 17, 2022
0fb29d4
Captive TFA
nikosdion May 17, 2022
d9303d7
Captive TFA
nikosdion May 17, 2022
8f6b0b9
Captive TFA
nikosdion May 17, 2022
c91d859
Captive TFA
nikosdion May 17, 2022
f719269
codestyle changes
brianteeman May 17, 2022
f12fd90
Renamed SiteTemplateAware to SiteTemplateTrait
nikosdion May 17, 2022
3b9bd78
Remove more instances of "2SV"
nikosdion May 17, 2022
e30e9ef
s/Two Step Verification/Two Step Validation/
nikosdion May 17, 2022
cc028e9
Language style
nikosdion May 17, 2022
1917c0f
Remove unnecessary language string
nikosdion May 17, 2022
acdf9e2
Remove redundant paragraph tags from PLG_TWOFACTORAUTH_EMAIL_XML_DESC…
nikosdion May 17, 2022
8c0e97d
Remove redundant paragraph tags from PLG_TWOFACTORAUTH_EMAIL_XML_DESC…
nikosdion May 17, 2022
6f582f2
Merge pull request #5 from brianteeman/patch-6
nikosdion May 17, 2022
752ff54
Remove the info tooltip in the methods list
nikosdion May 17, 2022
fe9f082
Merge remote-tracking branch 'nikosdion/feature/tfa' into feature/tfa
nikosdion May 17, 2022
64de893
Simplify the TFA enabled / disabled message
nikosdion May 17, 2022
086d15f
Fix layout of backup codes in methods list
nikosdion May 17, 2022
01a29a3
Fix mail message
nikosdion May 17, 2022
34dee38
Confirm TFA method deletion
nikosdion May 17, 2022
f5c53ca
Merge branch '4.2-dev' into feature/tfa
nikosdion May 18, 2022
64c9570
Simplify code label in Email plugin
nikosdion May 18, 2022
94ce1ec
Remove more dead code referencing the legacy TFA
nikosdion May 18, 2022
b1d5f65
Use concrete events
nikosdion May 18, 2022
963584e
WebAuthn support for some Android devices and FIDO keys
nikosdion May 18, 2022
61b73d2
Rename Tfa to Mfa
nikosdion May 18, 2022
b492375
Move Joomla\CMS\Event\TwoFactor to Joomla\CMS\Event\MultiFactor
nikosdion May 18, 2022
b5250c9
Two Factor Authentication => Multi-factor Authentication
nikosdion May 18, 2022
97eddfd
`#__user_tfa` => `#__user_mfa`
nikosdion May 18, 2022
992b833
twofactorauth => multifactorauth
nikosdion May 18, 2022
538b7ec
Change the post-install message
nikosdion May 18, 2022
bf819dc
Remove references to “second factor”
nikosdion May 18, 2022
fe7cfc5
Remove the legacy TFA plugins
nikosdion May 18, 2022
b0fe4f0
I missed a few things
nikosdion May 18, 2022
159606e
I missed a few more things
nikosdion May 18, 2022
ca0a5bd
Wrong redirection from post-installation messages
nikosdion May 18, 2022
9234683
Fix NotifyActionLog expected event names
nikosdion May 18, 2022
d1e4b74
Improve display of Last Used date
nikosdion May 18, 2022
36a1829
MFA extension helper
brianteeman May 18, 2022
63ed002
Merge branch '4.2-dev' into feature/tfa
richard67 May 18, 2022
2adc051
Remove unused field
nikosdion May 19, 2022
78e5ad3
Remove no longer used language strings
nikosdion May 19, 2022
d5a7544
Merge remote-tracking branch 'nikosdion/feature/tfa' into feature/tfa
nikosdion May 19, 2022
355b950
Undo changes in old SQL scripts
nikosdion May 19, 2022
b27ef83
Merge pull request #6 from brianteeman/patch-7
nikosdion May 19, 2022
fc173fb
Merge remote-tracking branch 'nikosdion/feature/tfa' into feature/tfa
nikosdion May 19, 2022
f55acea
Improve layout and accessibility of the methods list page
nikosdion May 19, 2022
545efcf
Add missing options to plg_multifactorauth_email
nikosdion May 19, 2022
b2b6b6c
Sort lines alphabetically
nikosdion May 19, 2022
da2112f
Add label to the One Time Emergency Password input
nikosdion May 19, 2022
ceaa4a3
Sort lines
nikosdion May 19, 2022
d79f355
Fix PHPCS complaint
nikosdion May 19, 2022
e02371f
Formatting of XML files
nikosdion May 19, 2022
5e9aa8f
Forgot to remove extra CSS class
nikosdion May 19, 2022
4e1e25c
Apply suggestions from code review
nikosdion May 20, 2022
ac4d88f
Commit suggestions from code review
nikosdion May 20, 2022
3302ba4
Commit formatting suggestions from code review
nikosdion May 20, 2022
1b1f5e3
Commit formatting suggestions from code review
nikosdion May 20, 2022
a8637b7
Commit formatting suggestions from code review
nikosdion May 20, 2022
f856f86
Commit formatting suggestions from code review
nikosdion May 20, 2022
4b9209f
Commit formatting suggestions from code review
nikosdion May 20, 2022
2536919
Commit formatting suggestions from code review
nikosdion May 20, 2022
c8f71d6
Commit formatting suggestions from code review
nikosdion May 20, 2022
dfe386b
Commit formatting suggestions from code review
nikosdion May 20, 2022
40c45e5
Commit formatting suggestions from code review
nikosdion May 20, 2022
c5d8886
Merge branch '4.2-dev' into feature/tfa
nikosdion May 20, 2022
6bc34f8
Update build/media_source/plg_multifactorauth_webauthn/js/webauthn.es…
nikosdion May 20, 2022
def44de
Fix update SQL
nikosdion May 21, 2022
bbc4b34
Merge remote-tracking branch 'nikosdion/feature/tfa' into feature/tfa
nikosdion May 21, 2022
287b475
Onboarding would result in a PHP exception
nikosdion May 21, 2022
36ccc78
Make MFA plugins' publish state consistent between MySQL and PostgreSQL
nikosdion May 21, 2022
296757d
Update administrator/components/com_users/src/Controller/MethodsContr…
nikosdion May 21, 2022
8ab585b
Update administrator/components/com_admin/sql/updates/mysql/4.2.0-202…
nikosdion May 21, 2022
a489763
Update administrator/components/com_admin/sql/updates/postgresql/4.2.…
nikosdion May 21, 2022
8a306d4
Update administrator/components/com_admin/sql/updates/mysql/4.2.0-202…
nikosdion May 21, 2022
81c1e47
Update administrator/components/com_admin/sql/updates/postgresql/4.2.…
nikosdion May 21, 2022
162d04e
Merge branch '4.2-dev' into feature/tfa
nikosdion May 23, 2022
6ba1f9c
Update administrator/components/com_admin/sql/updates/postgresql/4.2.…
nikosdion May 23, 2022
fa07f71
Restore obsolete language strings
nikosdion May 23, 2022
3b020af
Re-add the obsolete plugins' language files
nikosdion May 23, 2022
086d76d
Merge remote-tracking branch 'nikosdion/feature/tfa' into feature/tfa
nikosdion May 23, 2022
6daa821
Remove no longer used twofactor field
nikosdion May 23, 2022
1e32f83
Rename CSS class to com-users-profile__multifactor
nikosdion May 23, 2022
f5b6869
Merge branch '4.2-dev' into feature/tfa
nikosdion May 23, 2022
f848778
Update administrator/language/en-GB/plg_multifactorauth_email.sys.ini
nikosdion May 24, 2022
bef3889
Update administrator/language/en-GB/plg_multifactorauth_email.ini
nikosdion May 24, 2022
7f51791
Update administrator/language/en-GB/plg_multifactorauth_email.ini
nikosdion May 24, 2022
c9fd07c
Update administrator/language/en-GB/com_users.ini
nikosdion May 24, 2022
a0ec263
Update administrator/language/en-GB/com_users.ini
nikosdion May 24, 2022
8ae8d9a
Update administrator/language/en-GB/com_users.ini
nikosdion May 24, 2022
d4417bd
Update administrator/language/en-GB/com_users.ini
nikosdion May 24, 2022
b85b84b
Update administrator/language/en-GB/com_users.ini
nikosdion May 24, 2022
d4295f9
Accessibility improvement
nikosdion May 24, 2022
f7cfb98
Improve language
nikosdion May 24, 2022
7227c6c
Change the heading level
nikosdion May 24, 2022
e9c0c7c
Fix case of extension registry file
nikosdion May 24, 2022
c49f008
Remove accidental double space after echo
nikosdion May 24, 2022
db6dbd7
Remove BS3 leftovers
nikosdion May 24, 2022
7044c3b
Remove BS3 leftovers
nikosdion May 24, 2022
d605bbc
Remove BS3 leftovers
nikosdion May 24, 2022
7e187e8
Update administrator/components/com_users/tmpl/methods/list.php
nikosdion May 25, 2022
185c6e6
Update components/com_users/tmpl/methods/list.php
nikosdion May 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -7809,6 +7809,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/libraries/vendor/maximebf/debugbar/build',
// From 4.1 to 4.2.0
'/libraries/vendor/nyholm/psr7/doc',
'/plugins/twofactorauth/totp',
'/plugins/twofactorauth/yubikey',
);

$status['files_checked'] = $files;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
--
-- Create the new table for MFA
--
CREATE TABLE IF NOT EXISTS `#__user_mfa` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int unsigned NOT NULL,
`title` varchar(255) NOT NULL DEFAULT '',
`method` varchar(100) NOT NULL,
`default` tinyint NOT NULL DEFAULT 0,
`options` mediumtext NOT NULL,
`created_on` datetime NOT NULL,
`last_used` datetime,
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci COMMENT='Multi-factor Authentication settings';

--
-- Remove obsolete postinstallation message
--
DELETE FROM `#__postinstall_messages` WHERE `condition_file` = 'site://plugins/twofactorauth/totp/postinstall/actions.php';

--
-- Add new MFA plugins
--
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
(0, 'plg_multifactorauth_totp', 'plugin', 'totp', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 1, 0),
(0, 'plg_multifactorauth_yubikey', 'plugin', 'yubikey', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 2, 0),
(0, 'plg_multifactorauth_webauthn', 'plugin', 'webauthn', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 3, 0),
(0, 'plg_multifactorauth_email', 'plugin', 'email', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 4, 0),
(0, 'plg_multifactorauth_fixed', 'plugin', 'fixed', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 5, 0);

--
-- Update MFA plugins' publish status
--
UPDATE `#__extensions` AS `a`
INNER JOIN `#__extensions` AS `b` on `a`.`element` = `b`.`element`
SET `a`.enabled = `b`.enabled
WHERE `a`.folder = 'multifactorauth'
AND `b`.folder = 'twofactorauth';

--
-- Remove legacy TFA plugins
--
DELETE FROM `#__extensions`
WHERE `type` = 'plugin' AND `folder` = 'twofactorauth' AND `element` IN ('totp', 'yubikey');

--
-- Add post-installation message
--
INSERT IGNORE INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`)
SELECT `extension_id`, 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_TITLE', 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_BODY', 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_ACTION', 'com_users', 1, 'action', 'admin://components/com_users/postinstall/multifactorauth.php', 'com_users_postinstall_mfa_action', 'admin://components/com_users/postinstall/multifactorauth.php', 'com_users_postinstall_mfa_condition', '4.2.0', 1 FROM `#__extensions` WHERE `name` = 'files_joomla';

--
-- Create a mail template for plg_multifactorauth_email
--
INSERT IGNORE INTO `#__mail_templates` (`template_id`, `extension`, `language`, `subject`, `body`, `htmlbody`, `attachments`, `params`) VALUES
('plg_multifactorauth_email.mail', 'plg_multifactorauth_email', '', 'PLG_MULTIFACTORAUTH_EMAIL_EMAIL_SUBJECT', 'PLG_MULTIFACTORAUTH_EMAIL_EMAIL_BODY', '', '', '{"tags":["code","sitename","siteurl","username","email","fullname"]}');
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
--
-- Create the new table for MFA
--
CREATE TABLE IF NOT EXISTS "#__user_mfa" (
"id" serial NOT NULL,
"user_id" bigint NOT NULL,
"title" varchar(255) DEFAULT '' NOT NULL,
"method" varchar(100) NOT NULL,
"default" smallint DEFAULT 0 NOT NULL,
"options" text NOT NULL,
"created_on" timestamp without time zone NOT NULL,
"last_used" timestamp without time zone,
PRIMARY KEY ("id")
);

CREATE INDEX "#__user_mfa_idx_user_id" ON "#__user_mfa" ("user_id") /** CAN FAIL **/;

COMMENT ON TABLE "#__user_mfa" IS 'Multi-factor Authentication settings';

--
-- Remove obsolete postinstallation message
--
DELETE FROM "#__postinstall_messages" WHERE "condition_file" = 'site://plugins/twofactorauth/totp/postinstall/actions.php';

--
-- Add new MFA plugins
--
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
nikosdion marked this conversation as resolved.
Show resolved Hide resolved
(0, 'plg_multifactorauth_totp', 'plugin', 'totp', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 1, 0),
(0, 'plg_multifactorauth_yubikey', 'plugin', 'yubikey', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 2, 0),
(0, 'plg_multifactorauth_webauthn', 'plugin', 'webauthn', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 3, 0),
(0, 'plg_multifactorauth_email', 'plugin', 'email', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 4, 0),
(0, 'plg_multifactorauth_fixed', 'plugin', 'fixed', 'multifactorauth', 0, 0, 1, 0, 1, '', '', '', 5, 0);

--
-- Update MFA plugins' publish status
--
UPDATE "#__extensions" AS "a"
SET "enabled" = "b"."enabled"
FROM "#__extensions" AS "b"
WHERE "a"."element" = "b"."element"
AND "a"."folder" = 'multifactorauth'
AND "b"."folder" = 'twofactorauth';

--
-- Remove legacy TFA plugins
--
DELETE FROM "#__extensions"
WHERE "type" = 'plugin' AND "folder" = 'twofactorauth' AND "element" IN ('totp', 'yubikey');

--
-- Add post-installation message
--
INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled")
SELECT "extension_id", 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_TITLE', 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_BODY', 'COM_USERS_POSTINSTALL_MULTIFACTORAUTH_ACTION', 'com_users', 1, 'action', 'admin://components/com_users/postinstall/multifactorauth.php', 'com_users_postinstall_mfa_action', 'admin://components/com_users/postinstall/multifactorauth.php', 'com_users_postinstall_mfa_condition', '4.2.0', 1 FROM "#__extensions" WHERE "name" = 'files_joomla'
ON CONFLICT DO NOTHING;

--
-- Create a mail template for plg_multifactorauth_email
--
INSERT INTO "#__mail_templates" ("template_id", "extension", "language", "subject", "body", "htmlbody", "attachments", "params") VALUES
('plg_multifactorauth_email.mail', 'plg_multifactorauth_email', '', 'PLG_MULTIFACTORAUTH_EMAIL_EMAIL_SUBJECT', 'PLG_MULTIFACTORAUTH_EMAIL_EMAIL_BODY', '', '', '{"tags":["code","sitename","siteurl","username","email","fullname"]}')
ON CONFLICT DO NOTHING;
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ public function getNonCoreExtensions()
*
* @since 3.10.0
*/
public function getNonCorePlugins($folderFilter = ['system','user','authentication','actionlog','twofactorauth'])
public function getNonCorePlugins($folderFilter = ['system','user','authentication','actionlog','multifactorauth'])
{
$db = $this->getDbo();
$query = $db->getQuery(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive');

$twofactormethods = AuthenticationHelper::getTwoFactorMethods();

?>

<div class="alert warning">
Expand Down Expand Up @@ -63,21 +61,6 @@
</div>
</div>
</div>
<?php if (count($twofactormethods) > 1) : ?>
<div class="control-group">
<div class="controls">
<div class="input-group">
<input name="secretkey" autocomplete="one-time-code" id="mod-login-secretkey" type="text" class="form-control" placeholder="<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>" size="15">
<span class="input-group-text" title="<?php echo Text::_('JGLOBAL_SECRETKEY_HELP'); ?>">
<span class="icon-star" aria-hidden="true"></span>
<label for="mod-login-secretkey" class="visually-hidden">
<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>
</label>
</span>
</div>
</div>
</div>
<?php endif; ?>
<div class="control-group">
<div class="controls">
<div class="btn-group">
Expand Down
17 changes: 0 additions & 17 deletions administrator/components/com_joomlaupdate/tmpl/upload/captive.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

$twofactormethods = AuthenticationHelper::getTwoFactorMethods();

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('core')
Expand Down Expand Up @@ -67,21 +65,6 @@
</div>
</div>
</div>
<?php if (count($twofactormethods) > 1) : ?>
<div class="control-group">
<div class="controls">
<div class="input-group">
<input name="secretkey" autocomplete="one-time-code" id="mod-login-secretkey" type="text" class="form-control" placeholder="<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>" size="15">
<span class="input-group-text" title="<?php echo Text::_('JGLOBAL_SECRETKEY_HELP'); ?>">
<span class="icon-star" aria-hidden="true"></span>
<label for="mod-login-secretkey" class="visually-hidden">
<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>
</label>
</span>
</div>
</div>
</div>
<?php endif; ?>
<div class="control-group">
<div class="controls">
<a class="btn btn-danger" href="index.php?option=com_joomlaupdate">
Expand Down
149 changes: 122 additions & 27 deletions administrator/components/com_users/config.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<help key="Users:_Options"/>
<inlinehelp button="show"/>
<fieldset
name="user_options"
label="COM_USERS_CONFIG_USER_OPTIONS" >
Expand Down Expand Up @@ -109,33 +110,6 @@
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="enforce_2fa_options"
type="list"
label="COM_USERS_CONFIG_FIELD_ENFORCE_2FA_FIELD_LABEL"
description="COM_USERS_CONFIG_FIELD_ENFORCE_2FA_FIELD_DESC"
default="0"
filter="integer"
validate="options"
>
<option value="0">JNO</option>
<option value="1">COM_USERS_CONFIG_FIELD_ENFORCE_2FA_FIELD_SITE</option>
<option value="2">COM_USERS_CONFIG_FIELD_ENFORCE_2FA_FIELD_ADMIN</option>
<option value="3">COM_USERS_CONFIG_FIELD_ENFORCE_2FA_FIELD_BOTH</option>
</field>

<field
name="enforce_2fa_usergroups"
type="usergrouplist"
label="COM_USERS_CONFIG_FIELD_ENFORCE_2FA_GROUPS_LABEL"
layout="joomla.form.field.list-fancy-select"
multiple="true"
filter="int_array"
size="10"
showon="enforce_2fa_options!:0"
/>

</fieldset>

<fieldset
Expand Down Expand Up @@ -238,6 +212,127 @@
/>
</fieldset>

<fieldset
name="multifactorauth"
label="COM_USERS_CONFIG_MULTIFACTORAUTH_SETTINGS_LABEL"
description="COM_USERS_CONFIG_MULTIFACTORAUTH_SETTINGS_DESC"
addfieldprefix="Joomla\Component\Users\Administrator\Field"
>
<field
name="allowed_positions_frontend"
type="modulesposition"
label="COM_USERS_CONFIG_ALLOWED_POSITIONS_FRONTEND_LABEL"
description="COM_USERS_CONFIG_ALLOWED_POSITIONS_FRONTEND_DESC"
default=""
layout="joomla.form.field.list-fancy-select"
size="7"
client="site"
multiple="1"
/>

<field
name="frontend_show_title"
type="radio"
label="COM_USERS_CONFIG_FRONTEND_SHOW_TITLE_LABEL"
description="COM_USERS_CONFIG_FRONTEND_SHOW_TITLE_DESC"
layout="joomla.form.field.radio.switcher"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="allowed_positions_backend"
type="modulesposition"
label="COM_USERS_CONFIG_ALLOWED_POSITIONS_BACKEND_LABEL"
description="COM_USERS_CONFIG_ALLOWED_POSITIONS_BACKEND_DESC"
default=""
size="7"
layout="joomla.form.field.list-fancy-select"
client="administrator"
multiple="1"
/>

<field
name="neverMFAUserGroups"
type="UserGroupList"
label="COM_USERS_CONFIG_NEVERMFAUSERGROUPS_LABEL"
description="COM_USERS_CONFIG_NEVERMFAUSERGROUPS_DESC"
layout="joomla.form.field.list-fancy-select"
checksuperusergroup="1"
default=""
multiple="1"
>
<option value="0">COM_USERS_CONFIG_LBL_NOGROUP</option>
</field>

<field
name="forceMFAUserGroups"
type="UserGroupList"
label="COM_USERS_CONFIG_FORCEMFAUSERGROUPS_LABEL"
description="COM_USERS_CONFIG_FORCEMFAUSERGROUPS_DESC"
layout="joomla.form.field.list-fancy-select"
checksuperusergroup="1"
default=""
multiple="1"
>
<option value="0">COM_USERS_CONFIG_LBL_NOGROUP</option>
</field>

<field
name="captive_template"
type="templatestyle"
label="COM_USERS_CONFIG_FRONTEND_CAPTIVE_TEMPLATE_LABEL"
description="COM_USERS_CONFIG_FRONTEND_CAPTIVE_TEMPLATE_DESC"
client="site"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
</field>

<field
name="mfaonsilent"
type="radio"
label="COM_USERS_CONFIG_MFAONSILENT_LABEL"
description="COM_USERS_CONFIG_MFAONSILENT_DESC"
layout="joomla.form.field.radio.switcher"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="silentresponses"
type="text"
label="COM_USERS_CONFIG_SILENTRESPONSES_LABEL"
description="COM_USERS_CONFIG_SILENTRESPONSES_DESC"
default="cookie, passwordless"
showon="mfaonsilent:0"
/>

<field
name="mfaredirectonlogin"
type="radio"
label="COM_USERS_CONFIG_REDIRECTONLOGIN_LABEL"
description="COM_USERS_CONFIG_REDIRECTONLOGIN_DESC"
layout="joomla.form.field.radio.switcher"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="mfaredirecturl"
type="text"
label="COM_USERS_CONFIG_REDIRECTURL_LABEL"
description="COM_USERS_CONFIG_REDIRECTURL_DESC"
default=""
showon="redirectonlogin:1"
/>
</fieldset>

<fieldset
name="user_notes_history"
label="COM_USERS_CONFIG_FIELD_NOTES_HISTORY" >
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_users/forms/user.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@

</fieldset>
<field name="groups" type="hidden" />
<field name="twofactor" type="hidden" />

<fields name="params">

Expand Down
Loading