From 4e14315114408bd3559b0833e43b792c69574fa4 Mon Sep 17 00:00:00 2001 From: pineray Date: Mon, 25 Jul 2022 05:44:09 +0900 Subject: [PATCH 1/4] Add a login throttling to firewalls. --- .env.dist | 6 + app/config/eccube/packages/security.yaml | 13 +- composer.json | 1 + composer.lock | 147 +++++++++++++++++- phpunit.xml.dist | 6 + .../EventListener/LoginHistoryListener.php | 13 +- src/Eccube/Resource/locale/validators.ja.yaml | 3 + symfony.lock | 15 ++ 8 files changed, 194 insertions(+), 10 deletions(-) diff --git a/.env.dist b/.env.dist index 9df4d03ed30..02b1984f1a6 100644 --- a/.env.dist +++ b/.env.dist @@ -56,3 +56,9 @@ MAILER_DSN=null://null #ECCUBE_RESTRICT_FILE_UPLOAD=0 ###< APPLICATION CONFIG ### + +###> symfony/lock ### +# Choose one of the stores below +# postgresql+advisory://db_user:db_password@localhost/db_name +LOCK_DSN=semaphore +###< symfony/lock ### diff --git a/app/config/eccube/packages/security.yaml b/app/config/eccube/packages/security.yaml index 9fa9e42ea7e..3facaa912bb 100644 --- a/app/config/eccube/packages/security.yaml +++ b/app/config/eccube/packages/security.yaml @@ -1,4 +1,5 @@ security: + enable_authenticator_manager: true encoders: # Our user class and the algorithm we'll use to encode passwords # https://symfony.com/doc/current/security.html#c-encoding-the-user-s-password @@ -22,24 +23,25 @@ security: security: false admin: pattern: '^/%eccube_admin_route%/' - anonymous: true provider: member_provider form_login: + enable_csrf: true check_path: admin_login login_path: admin_login - csrf_token_generator: security.csrf.token_manager default_target_path: admin_homepage username_parameter: 'login_id' password_parameter: 'password' use_forward: false success_handler: eccube.security.success_handler failure_handler: eccube.security.failure_handler + login_throttling: + max_attempts: 5 + interval: '30 minutes' logout: path: admin_logout success_handler: eccube.security.logout.success_handler customer: pattern: ^/ - anonymous: true provider: customer_provider remember_me: secret: '%kernel.secret%' @@ -47,15 +49,18 @@ security: name: eccube_remember_me remember_me_parameter: 'login_memory' form_login: + enable_csrf: true check_path: mypage_login login_path: mypage_login - csrf_token_generator: security.csrf.token_manager default_target_path: homepage username_parameter: 'login_email' password_parameter: 'login_pass' use_forward: false success_handler: eccube.security.success_handler failure_handler: eccube.security.failure_handler + login_throttling: + max_attempts: 5 + interval: '30 minutes' logout: path: logout target: homepage diff --git a/composer.json b/composer.json index 0471325f240..f7abfe8133f 100644 --- a/composer.json +++ b/composer.json @@ -79,6 +79,7 @@ "symfony/process": "^5.4", "symfony/property-access": "^5.4", "symfony/proxy-manager-bridge": "^5.4", + "symfony/rate-limiter": "^5.4", "symfony/routing": "^5.4", "symfony/security-bundle": "^5.4", "symfony/serializer": "^5.4", diff --git a/composer.lock b/composer.lock index 88da53c5a31..239a4454ae0 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": "00ba2149f4afb427ed9129a766b56cfe", + "content-hash": "fc0376b4e13336e65d38262bb5453599", "packages": [ { "name": "composer/ca-bundle", @@ -6663,6 +6663,82 @@ ], "time": "2022-02-25T13:55:17+00:00" }, + { + "name": "symfony/lock", + "version": "v5.4.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/lock.git", + "reference": "41a308008d92d30cae5615d903c4d46d95932eea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/lock/zipball/41a308008d92d30cae5615d903c4d46d95932eea", + "reference": "41a308008d92d30cae5615d903c4d46d95932eea", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "doctrine/dbal": "<2.13" + }, + "require-dev": { + "doctrine/dbal": "^2.13|^3.0", + "predis/predis": "~1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Lock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jérémy Derussé", + "email": "jeremy@derusse.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Creates and manages locks, a mechanism to provide exclusive access to a shared resource", + "homepage": "https://symfony.com", + "keywords": [ + "cas", + "flock", + "locking", + "mutex", + "redlock", + "semaphore" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-09T13:29:56+00:00" + }, { "name": "symfony/mailer", "version": "v5.4.8", @@ -8339,6 +8415,73 @@ ], "time": "2022-03-02T12:42:23+00:00" }, + { + "name": "symfony/rate-limiter", + "version": "v5.4.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/rate-limiter.git", + "reference": "77bbe1e96118e117b8b1fe6bed57dc1b5dfebe45" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/rate-limiter/zipball/77bbe1e96118e117b8b1fe6bed57dc1b5dfebe45", + "reference": "77bbe1e96118e117b8b1fe6bed57dc1b5dfebe45", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/lock": "^5.2|^6.0", + "symfony/options-resolver": "^5.1|^6.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\RateLimiter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Wouter de Jong", + "email": "wouter@wouterj.nl" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a Token Bucket implementation to rate limit input and output in your application", + "homepage": "https://symfony.com", + "keywords": [ + "limiter", + "rate-limiter" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-14T11:02:49+00:00" + }, { "name": "symfony/routing", "version": "v5.4.3", @@ -13888,5 +14031,5 @@ "platform-overrides": { "php": "7.4.0" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 70fdfa5ee71..9cf5067dbdd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -17,6 +17,12 @@ + + + + + + diff --git a/src/Eccube/EventListener/LoginHistoryListener.php b/src/Eccube/EventListener/LoginHistoryListener.php index e46ff27203f..b25d31f1557 100644 --- a/src/Eccube/EventListener/LoginHistoryListener.php +++ b/src/Eccube/EventListener/LoginHistoryListener.php @@ -24,7 +24,9 @@ use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Security\Core\AuthenticationEvents; use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent; +use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; +use Symfony\Component\Security\Http\Event\LoginFailureEvent; use Symfony\Component\Security\Http\SecurityEvents; class LoginHistoryListener implements EventSubscriberInterface @@ -74,7 +76,7 @@ public static function getSubscribedEvents() { return [ SecurityEvents::INTERACTIVE_LOGIN => 'onInteractiveLogin', - AuthenticationEvents::AUTHENTICATION_FAILURE => 'onAuthenticationFailure', + LoginFailureEvent::class => 'onAuthenticationFailure', ]; } @@ -103,7 +105,7 @@ public function onInteractiveLogin(InteractiveLoginEvent $event) } } - public function onAuthenticationFailure(AuthenticationFailureEvent $event) + public function onAuthenticationFailure(LoginFailureEvent $event) { $request = $this->requestStack->getCurrentRequest(); @@ -116,9 +118,12 @@ public function onAuthenticationFailure(AuthenticationFailureEvent $event) return; } - $userName = $event->getAuthenticationToken()->getUsername(); $Member = null; - if ($userName) { + $userName = null; + $passport = $event->getPassport(); + if ($passport->hasBadge(UserBadge::class)) { + $userName = $passport->getBadge(UserBadge::class) + ->getUserIdentifier(); $Member = $this->memberRepository->findOneBy(['login_id' => $userName]); } diff --git a/src/Eccube/Resource/locale/validators.ja.yaml b/src/Eccube/Resource/locale/validators.ja.yaml index defc2b2894d..5b28a06919a 100644 --- a/src/Eccube/Resource/locale/validators.ja.yaml +++ b/src/Eccube/Resource/locale/validators.ja.yaml @@ -22,6 +22,9 @@ Invalid credentials.: | Invalid CSRF token.: | ログインできませんでした。 入力内容に誤りがないかご確認ください。 +Too many failed login attempts, please try again later.: ログイン試行回数を超えました。しばらくして再度お試しください。 +Too many failed login attempts, please try again in %minutes% minute.: ログイン試行回数が多すぎます。%minutes%分後に再度お試しください。 +Too many failed login attempts, please try again in %minutes% minutes.: ログイン試行回数が多すぎます。%minutes%分後に再度お試しください。 #------------------------------------------------------------------------------------ # EC-CUBE error message diff --git a/symfony.lock b/symfony.lock index ce4d6d40df7..ac247a3e91c 100644 --- a/symfony.lock +++ b/symfony.lock @@ -491,6 +491,18 @@ "symfony/intl": { "version": "v3.4.1" }, + "symfony/lock": { + "version": "5.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "5.2", + "ref": "a1c8800e40ae735206bb14586fdd6c4630a51b8d" + }, + "files": [ + "app/config/eccube/packages/lock.yaml" + ] + }, "symfony/mailer": { "version": "5.4", "recipe": { @@ -587,6 +599,9 @@ "symfony/proxy-manager-bridge": { "version": "v3.4.4" }, + "symfony/rate-limiter": { + "version": "v5.4.9" + }, "symfony/routing": { "version": "3.3", "recipe": { From 5cae9730e0248561e0b6894c1c42ee43acb1bcd5 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Tue, 26 Jul 2022 17:27:15 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Bundle=20=E3=83=97=E3=83=A9=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit services.yaml の設定を以下に変更 ``` security: enable_authenticator_manager: true ``` --- codeception/_data/plugins/Bundle-1.0.0.tgz | Bin 2092 -> 2087 bytes codeception/_data/plugins/Bundle-1.0.1.tgz | Bin 2073 -> 2078 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/codeception/_data/plugins/Bundle-1.0.0.tgz b/codeception/_data/plugins/Bundle-1.0.0.tgz index 210cec1b7c5daaa6c142f4a59620ae0d1733db38..b565cc186a49cf95a5744b7a54ac3ffb73bbb7e9 100644 GIT binary patch delta 2082 zcmV+-2;KLr5T_7-ABzY80000000Zq>ZFAx{63%D;3T<|#fUUt`1927EnY)BxYEqk> zP(b!-Z^*e6TYzSa?3L{h?kfNNT9VCMAS5}Gt-I6n0fW`*ZmV1BM>3}=^8->jcu7T8|3;&6bbzXR^15P*=3Z zs7qqPZ-{SyW*x^#5;ZH8>2zumuk5AQ#PmY*TU5!~KZP76V}gb$=e%5M#=?OR06C`7tpec@#PveBs>og%gn$lzpE%0=4 zm~xMRA)g2jD~7@Fgv1eso1GvXQ8rMsA-fzKMjEewH+>`#VLoBr?2LUQo^Wi?3MUcR z=b23YvxDRKSgPpFCc}`;q+rMhOSY(C38swj)0752;oJIthGG4Ma7KcA{(1q}M9VW9 zk=q0;|E7UH@MLo8q6( z!hI#eqvBt;8&1usRc(;7jvUSZUI!1x|Nf%;&`JAXD`S-)kTyUdm~IGHXIvP{r8AP@JIjP!A^|cPH@NBf^^~;VChq zypqRFSw{%FDYjdJ1iBX|m;KMSD?Tr}XMaEGpIv-$d+qLT?XKJDp8a;xZ@a&=e=jvr z;q7;MVr2r!5R}ICDSunRQB+aP>myEZ|=BVta-hk{`Qvf#T?o$X30%+-+b5XLy- zKn`x3sC#ifSE&xmM2C>me@dFW(oxbhH4-j(CLZeq!QxBNer8a@H=6f^=2Zj6v>s#*|S6UO6cX*WU~Pw z=Zfa1C>Q$x>d|Dg%Di>MSn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C UlMo0748~gg2jp%;bO2BQ04SmyMF0Q* diff --git a/codeception/_data/plugins/Bundle-1.0.1.tgz b/codeception/_data/plugins/Bundle-1.0.1.tgz index ae641aee1338a0245ae104c1206420a307c58559..6116d88bc8f5d81730ced2d189487eb12e650375 100644 GIT binary patch literal 2078 zcmV+(2;ui1iwFP!000001MOOEbK*D>&S(D$Ejv@d)?l!Ct0FsdmoQ9CYO@mxlD*m+ zaxTRdpcx~3Wjlns%74F>Wb+mXAxE-xcX~cxuv*=1bxV5G<}_iRPs&Fxi3*@uuZyeI ztXGz=8IG)Kvr@Bb^=idFs#tcd**rq^7xgMd62+J!bi^>j5s9L0a=Y69OL3~=uP*A- z49DR?ZHNFjYPD_g7tvmdzXkEH*XxZVR5_>@TkwA#|DXQ?(Kd|oPX_u4U5;slhSVnr zt|8_z3WliDF14>tJJ2pf+CezubTp0&ZZT^@?F;kW`Q=9wo%lZLiPi}9NJRK8@yxX2 zIF7?sxjdatP2!f^oW5Y z%DPr{Mpmwe-;~Z@8D!$pZ&jL$@Sl^)b#%U8rT&7Y!)6W5uOzPnq6;Jn^oIt zK>QocW>v@kHSlQsA1=zz;)c8Up9uC!{Ozisgqr`o0yO{I#s3~7c_}M=Dy2)A;qrt! zV=>`Fu=<~o!xgf(tRK+{jMM})MQEelEhI4HfeYEb4-I@1%5jU(`xUk~B5@aU7+f$| z$P-tFJ{2_y!#6(h@+s95phHynfieekj%S6udZhfjx%y&p$!6AJ+29yQAIXq1DjuYe zKPPyUWVCp2agxMiyDw6cr?)z{FgoXuB?P(;PJo>H6z+fyocM7ca*;$?bN+#K`Q#oM zK78sIbmDlU3#AV(ObUL9M?jueMedE&Z*xu!(^Srcm#hHo!T)NO1^2CLrEcl{|1~g= zKjiL^j$R}Up2+`z^x1Yr+_!2~Ti5?y1?%w_n>K8>kvYQ?|3Ef&@V{EESzn8PQ(QFv zdj&+qO*oBbE!Y;+X6#_toM7vrE{+54OyIdkgtt)46JmtfP9C-7K0?@Sq0<&5(78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7>RlTMP`gyV&aV!;qnCyOD1yVQq!wq<8O#Zgr Date: Mon, 1 Aug 2022 16:35:23 +0900 Subject: [PATCH 3/4] =?UTF-8?q?symfony/lock=E3=81=AE=E8=A8=98=E8=BF=B0?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dist | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.dist b/.env.dist index 02b1984f1a6..8913c138131 100644 --- a/.env.dist +++ b/.env.dist @@ -30,6 +30,12 @@ DATABASE_CHARSET=utf8 MAILER_DSN=null://null ###< symfony/mailer ### +###> symfony/lock ### +# Choose one of the stores below +# postgresql+advisory://db_user:db_password@localhost/db_name +LOCK_DSN=semaphore +###< symfony/lock ### + ###> APPLICATION CONFIG ### # EC-CUBE Configs. The default value is defined in app/config/packages/eccube.yaml. # Please remove commented out and enable it if you want to change. @@ -56,9 +62,3 @@ MAILER_DSN=null://null #ECCUBE_RESTRICT_FILE_UPLOAD=0 ###< APPLICATION CONFIG ### - -###> symfony/lock ### -# Choose one of the stores below -# postgresql+advisory://db_user:db_password@localhost/db_name -LOCK_DSN=semaphore -###< symfony/lock ### From 087d284310ac99bec5e6b9fc89da0eaf9179847a Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Mon, 1 Aug 2022 16:36:19 +0900 Subject: [PATCH 4/4] =?UTF-8?q?parameter=E3=81=A7=E5=AE=9A=E7=BE=A9?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/eccube/packages/eccube.yaml | 2 ++ app/config/eccube/packages/security.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/config/eccube/packages/eccube.yaml b/app/config/eccube/packages/eccube.yaml index b767acf138f..ecf2f758891 100644 --- a/app/config/eccube/packages/eccube.yaml +++ b/app/config/eccube/packages/eccube.yaml @@ -148,3 +148,5 @@ parameters: - admin_content_css - admin_content_js - admin_store_template_install + eccube_login_throttling_max_attempts: 5 + eccube_login_throttling_interval: '30 minutes' diff --git a/app/config/eccube/packages/security.yaml b/app/config/eccube/packages/security.yaml index 3facaa912bb..963d632ba4c 100644 --- a/app/config/eccube/packages/security.yaml +++ b/app/config/eccube/packages/security.yaml @@ -35,8 +35,8 @@ security: success_handler: eccube.security.success_handler failure_handler: eccube.security.failure_handler login_throttling: - max_attempts: 5 - interval: '30 minutes' + max_attempts: '%eccube_login_throttling_max_attempts%' + interval: '%eccube_login_throttling_interval%' logout: path: admin_logout success_handler: eccube.security.logout.success_handler @@ -59,8 +59,8 @@ security: success_handler: eccube.security.success_handler failure_handler: eccube.security.failure_handler login_throttling: - max_attempts: 5 - interval: '30 minutes' + max_attempts: '%eccube_login_throttling_max_attempts%' + interval: '%eccube_login_throttling_interval%' logout: path: logout target: homepage