diff --git a/composer.json b/composer.json index b4a867df02..c577cc0a6f 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "ext-json": "*", "composer/installers": "^1.9", "cpliakas/git-wrapper": "~1.7", - "cweagans/composer-patches": "^1.6", + "cweagans/composer-patches": "1.7.2", "dkarv/mdl-chip-input": "dev-master", "drupal/allowed_formats": "^1.2", "drupal/antibot": "^1.3", @@ -91,6 +91,7 @@ "jacklmoore/autosize": "dev-master", "masterminds/html5": "^2.7", "ml/json-ld": "^1.1", + "openeuropa/oe_authentication": "1.5.1", "openeuropa/oe_webtools": "1.7.0", "openeuropa/webtools-geocoding-provider": "~0.1", "pear/console_table": "~1.3", @@ -158,7 +159,7 @@ "config": { "sort-packages": true, "platform": { - "php": "7.1.9" + "php": "7.3.28" } }, "autoload": { @@ -349,6 +350,9 @@ "openeuropa/task-runner": { "Allow to pass array options to 'run' & 'exec' tasks @see https://github.com/openeuropa/task-runner/pull/137": "https://patch-diff.githubusercontent.com/raw/openeuropa/task-runner/pull/137.diff", "Tokens containing digits are not supported @see https://github.com/openeuropa/task-runner/pull/145": "https://patch-diff.githubusercontent.com/raw/openeuropa/task-runner/pull/145.diff" + }, + "openeuropa/oe_authentication": { + "Add 2FA to version 1.5": "resources/patch/oe_authentication_2fa_hf_for_1.5.patch" } } }, @@ -361,11 +365,11 @@ "type": "package", "package": { "name": "spdx/license-list-data", - "version": "main", + "version": "3.12", "source": { "url": "https://github.com/spdx/license-list-data.git", "type": "git", - "reference": "main" + "reference": "3.12" } } }, diff --git a/composer.lock b/composer.lock index 7cf2c8c43d..ce765baac2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5c0d38474d743995dd5ac1cdb62f4be3", + "content-hash": "ebbb84d413b683ec99fded74108c8db2", "packages": [ { "name": "SEMICeu/adms-ap_validator", @@ -1233,24 +1233,24 @@ }, { "name": "cweagans/composer-patches", - "version": "1.6.7", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/cweagans/composer-patches.git", - "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590" + "reference": "e9969cfc0796e6dea9b4e52f77f18e1065212871" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/2e6f72a2ad8d59cd7e2b729f218bf42adb14f590", - "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e9969cfc0796e6dea9b4e52f77f18e1065212871", + "reference": "e9969cfc0796e6dea9b4e52f77f18e1065212871", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0", + "composer-plugin-api": "^1.0 || ^2.0", "php": ">=5.3.0" }, "require-dev": { - "composer/composer": "~1.0", + "composer/composer": "~1.0 || ~2.0", "phpunit/phpunit": "~4.6" }, "type": "composer-plugin", @@ -1273,7 +1273,7 @@ } ], "description": "Provides a way to patch Composer packages.", - "time": "2019-08-29T20:11:49+00:00" + "time": "2022-01-25T19:21:20+00:00" }, { "name": "davedevelopment/stiphle", @@ -2278,6 +2278,9 @@ "services": { "drush.services.yml": "^9" } + }, + "patches_applied": { + "https://www.drupal.org/project/cas/issues/3221111": "https://www.drupal.org/files/issues/2021-11-22/3221111-allow-setting-reason-20.diff" } }, "notification-url": "https://packages.drupal.org/8/downloads", @@ -8840,6 +8843,81 @@ ], "time": "2020-08-09T10:23:20+00:00" }, + { + "name": "openeuropa/oe_authentication", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/openeuropa/oe_authentication.git", + "reference": "32948436d99ef43573f318856d96a78ddef7e881" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/openeuropa/oe_authentication/zipball/32948436d99ef43573f318856d96a78ddef7e881", + "reference": "32948436d99ef43573f318856d96a78ddef7e881", + "shasum": "" + }, + "require": { + "cweagans/composer-patches": "^1.7", + "drupal/cas": "^1.7", + "drupal/core": "^8.9 || ^9.1", + "php": ">=7.3" + }, + "require-dev": { + "composer/installers": "^1.11", + "drupal/cas_mock_server": "^1.1", + "drupal/config_devel": "^1.2", + "drupal/core-composer-scaffold": "^8.9 || ^9.1", + "drupal/drupal-extension": "^4.0", + "drush/drush": "^10.3", + "nikic/php-parser": "~3.0", + "openeuropa/behat-transformation-context": "^0.1", + "openeuropa/code-review": "^1.6", + "openeuropa/drupal-core-require-dev": "^8.9 || ^9.1", + "openeuropa/task-runner-drupal-project-symlink": "^1.0", + "phpspec/prophecy-phpunit": "^1 || ^2" + }, + "type": "drupal-module", + "extra": { + "composer-exit-on-patch-failure": true, + "enable-patching": true, + "installer-paths": { + "build/core": [ + "type:drupal-core" + ], + "build/profiles/contrib/{$name}": [ + "type:drupal-profile" + ], + "build/modules/contrib/{$name}": [ + "type:drupal-module" + ], + "build/themes/contrib/{$name}": [ + "type:drupal-theme" + ] + }, + "patches": { + "drupal/cas": { + "https://www.drupal.org/project/cas/issues/3221111": "https://www.drupal.org/files/issues/2021-11-22/3221111-allow-setting-reason-20.diff" + } + }, + "drupal-scaffold": { + "locations": { + "web-root": "./build" + } + } + }, + "autoload": { + "psr-4": { + "Drupal\\oe_authentication\\": "./src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "EUPL-1.2" + ], + "description": "Authentication against the OpenEuropa Authentication service.", + "time": "2021-12-06T16:26:43+00:00" + }, { "name": "openeuropa/oe_webtools", "version": "1.7.0", @@ -8906,7 +8984,7 @@ "patches_applied": { "Allow to pass an optional referer. @see https://github.com/openeuropa/oe_webtools/pull/96": "https://patch-diff.githubusercontent.com/raw/openeuropa/oe_webtools/pull/96.diff", "Place the webtools loader on the head. @see https://github.com/openeuropa/oe_webtools/pull/102": "https://patch-diff.githubusercontent.com/raw/openeuropa/oe_webtools/pull/102.diff", - "Add the possibility to display a marker on the map. @see https://github.com/openeuropa/oe_webtools/pull/111": "https://patch-diff.githubusercontent.com/raw/openeuropa/oe_webtools/pull/111.diff" + "Add the possibility to display a marker on the map. @see https://github.com/openeuropa/oe_webtools/pull/113": "https://patch-diff.githubusercontent.com/raw/openeuropa/oe_webtools/pull/113.diff" } }, "autoload": { @@ -10193,7 +10271,7 @@ "reference": "main" }, "type": "library", - "time": "2021-07-23T03:22:02+00:00" + "time": "2022-12-15T22:49:17+00:00" }, { "name": "stack/builder", @@ -10296,6 +10374,7 @@ "mail", "mailer" ], + "abandoned": "symfony/mailer", "time": "2018-07-31T09:26:32+00:00" }, { @@ -10540,6 +10619,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", + "abandoned": "symfony/error-handler", "time": "2020-07-23T08:31:43+00:00" }, { @@ -12357,6 +12437,7 @@ } ], "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "abandoned": "symfony/filesystem", "time": "2015-12-17T08:42:14+00:00" }, { @@ -18583,6 +18664,6 @@ "ext-libxml": "*" }, "platform-overrides": { - "php": "7.1.9" + "php": "7.3.28" } } diff --git a/config/sync/block.block.eulogin2fabannerinformationblock.yml b/config/sync/block.block.eulogin2fabannerinformationblock.yml new file mode 100644 index 0000000000..ce54dcc1a1 --- /dev/null +++ b/config/sync/block.block.eulogin2fabannerinformationblock.yml @@ -0,0 +1,20 @@ +uuid: 7cf24a72-4db1-4242-8380-1f6abdc7e638 +langcode: en +status: true +dependencies: + module: + - easme_helper + theme: + - joinup_theme +id: eulogin2fabannerinformationblock +theme: joinup_theme +region: header_profile_menu +weight: -31 +provider: null +plugin: eulogin_2fa_banner_block +settings: + id: eulogin_2fa_banner_block + label: 'EULogin 2FA banner information block' + provider: easme_helper + label_display: visible +visibility: { } diff --git a/config/sync/block.block.joinup_theme_account_menu.yml b/config/sync/block.block.joinup_theme_account_menu.yml index 77029745a3..01715bdb61 100644 --- a/config/sync/block.block.joinup_theme_account_menu.yml +++ b/config/sync/block.block.joinup_theme_account_menu.yml @@ -13,7 +13,7 @@ _core: id: joinup_theme_account_menu theme: joinup_theme region: header_profile_menu -weight: -9 +weight: -30 provider: null plugin: 'system_menu_block:account' settings: diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index a3cedb0b8f..75a8dfaff9 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -114,6 +114,7 @@ module: metatag_open_graph: 0 moderation: 0 node: 0 + oe_authentication: 0 oe_newsroom_newsletter: 0 oe_webtools: 0 oe_webtools_cookie_consent: 0 diff --git a/config/sync/oe_authentication.settings.yml b/config/sync/oe_authentication.settings.yml new file mode 100644 index 0000000000..68ff1e9a78 --- /dev/null +++ b/config/sync/oe_authentication.settings.yml @@ -0,0 +1,8 @@ +protocol: eulogin +register_path: eim/external/register.cgi +validation_path: TicketValidationService +assurance_level: TOP +ticket_types: 'SERVICE,PROXY' +_core: + default_config_hash: QqXrdnYD_oVmsY_aKMaDLRwxQfZ8eveMW5HTuTrXY7o +force_2fa: true diff --git a/resources/patch/oe_authentication_2fa_hf_for_1.5.patch b/resources/patch/oe_authentication_2fa_hf_for_1.5.patch new file mode 100644 index 0000000000..14c5374ec6 --- /dev/null +++ b/resources/patch/oe_authentication_2fa_hf_for_1.5.patch @@ -0,0 +1,44 @@ +diff --git a/src/Event/EuLoginEventSubscriber.php b/src/Event/EuLoginEventSubscriber.php +index f17b018..115139d 100644 +--- a/src/Event/EuLoginEventSubscriber.php ++++ b/src/Event/EuLoginEventSubscriber.php +@@ -5,6 +5,7 @@ declare(strict_types = 1); + namespace Drupal\oe_authentication\Event; + + use Drupal\cas\Event\CasPostValidateEvent; ++use Drupal\cas\Event\CasPreRedirectEvent; + use Drupal\cas\Event\CasPreRegisterEvent; + use Drupal\cas\Event\CasPreValidateEvent; + use Drupal\cas\Service\CasHelper; +@@ -71,11 +72,23 @@ class EuLoginEventSubscriber implements EventSubscriberInterface { + ['checkUserMailExists', 1000], + ['processUserProperties'], + ]; ++ $events[CasHelper::EVENT_PRE_REDIRECT] = 'forceTwoFactorAuthentication'; + $events[CasHelper::EVENT_POST_VALIDATE] = 'processCasAttributes'; + $events[CasHelper::EVENT_PRE_VALIDATE] = 'alterValidationPath'; + return $events; + } + ++ /** ++ * Ensures that 2-factor authentication is forced if it is configured. ++ * ++ * @param \Drupal\cas\Event\CasPreRedirectEvent $event ++ * The triggered event. ++ */ ++ public function forceTwoFactorAuthentication(CasPreRedirectEvent $event): void { ++ $data = $event->getCasRedirectData(); ++ $data->setParameter('acceptStrengths', 'PASSWORD_MOBILE_APP,PASSWORD_SOFTWARE_TOKEN,PASSWORD_SMS'); ++ } ++ + /** + * Checks user email exists previously. + * +@@ -141,6 +154,7 @@ class EuLoginEventSubscriber implements EventSubscriberInterface { + 'userDetails' => 'true', + 'groups' => '*', + ]; ++ $params['acceptStrengths'] = 'PASSWORD_MOBILE_APP,PASSWORD_SOFTWARE_TOKEN,PASSWORD_SMS'; + $event->addParameters($params); + } + diff --git a/web/modules/custom/easme_helper/src/Plugin/Block/Eulogin2FABannerBlock.php b/web/modules/custom/easme_helper/src/Plugin/Block/Eulogin2FABannerBlock.php new file mode 100644 index 0000000000..7267d5f26f --- /dev/null +++ b/web/modules/custom/easme_helper/src/Plugin/Block/Eulogin2FABannerBlock.php @@ -0,0 +1,58 @@ + + +
Important upcoming Change.
The EU login will require a 2 factor authentication to access this platform from the 20th of December onward. Get ready and activate now the multi-factor authentication for your EU login account. For more details on how to proceed go to the User Guide or the EU Login help page. Should you require additional assistance you can contact the EU login team directly via the contact form. (Click here to close this message)