Skip to main content
Sign in
Snippets Groups Projects
Verified Commit 3f49118a authored by Jonas Leder's avatar Jonas Leder
Browse files

enable login rate limiting

parent 041208c9
No related branches found
No related tags found
No related merge requests found
...@@ -31,3 +31,9 @@ DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&ch ...@@ -31,3 +31,9 @@ DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&ch
WEB_RESETTER_IP=10.0.0.1 WEB_RESETTER_IP=10.0.0.1
WEB_RESETTER_PORT=1000 WEB_RESETTER_PORT=1000
WEB_RESETTER_PASSWORD=password WEB_RESETTER_PASSWORD=password
###> symfony/lock ###
# Choose one of the stores below
# postgresql+advisory://db_user:db_password@localhost/db_name
LOCK_DSN=flock
###< symfony/lock ###
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "90312621b119ec26917d89d87dfbbf28", "content-hash": "dc01e869df0e37c9e7132c30e1e9ef35",
"packages": [ "packages": [
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
...@@ -3249,6 +3249,150 @@ ...@@ -3249,6 +3249,150 @@
], ],
"time": "2022-10-28T18:06:36+00:00" "time": "2022-10-28T18:06:36+00:00"
}, },
{
"name": "symfony/lock",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/lock.git",
"reference": "98d6c4b6608d15e403a228c15afb4f3e71b22a57"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/lock/zipball/98d6c4b6608d15e403a228c15afb4f3e71b22a57",
"reference": "98d6c4b6608d15e403a228c15afb4f3e71b22a57",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/log": "^1|^2|^3"
},
"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"
],
"support": {
"source": "https://github.com/symfony/lock/tree/v6.1.7"
},
"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-10-28T16:23:08+00:00"
},
{
"name": "symfony/options-resolver",
"version": "v6.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "a3016f5442e28386ded73c43a32a5b68586dd1c4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/a3016f5442e28386ded73c43a32a5b68586dd1c4",
"reference": "a3016f5442e28386ded73c43a32a5b68586dd1c4",
"shasum": ""
},
"require": {
"php": ">=8.1",
"symfony/deprecation-contracts": "^2.1|^3"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\OptionsResolver\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides an improved replacement for the array_replace PHP function",
"homepage": "https://symfony.com",
"keywords": [
"config",
"configuration",
"options"
],
"support": {
"source": "https://github.com/symfony/options-resolver/tree/v6.1.0"
},
"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-02-25T11:15:52+00:00"
},
{ {
"name": "symfony/password-hasher", "name": "symfony/password-hasher",
"version": "v6.1.3", "version": "v6.1.3",
...@@ -3803,6 +3947,76 @@ ...@@ -3803,6 +3947,76 @@
], ],
"time": "2022-03-02T13:21:45+00:00" "time": "2022-03-02T13:21:45+00:00"
}, },
{
"name": "symfony/rate-limiter",
"version": "v6.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/rate-limiter.git",
"reference": "9e75706446f7c3686773c408f422ffb5ec4ba32b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/rate-limiter/zipball/9e75706446f7c3686773c408f422ffb5ec4ba32b",
"reference": "9e75706446f7c3686773c408f422ffb5ec4ba32b",
"shasum": ""
},
"require": {
"php": ">=8.1",
"symfony/lock": "^5.4|^6.0",
"symfony/options-resolver": "^5.4|^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"
],
"support": {
"source": "https://github.com/symfony/rate-limiter/tree/v6.1.3"
},
"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-07-20T13:46:29+00:00"
},
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v6.1.7", "version": "v6.1.7",
... ...
......
framework:
lock: '%env(LOCK_DSN)%'
...@@ -26,6 +26,7 @@ security: ...@@ -26,6 +26,7 @@ security:
- password - password
- enabled - enabled
user_checker: App\Security\UserEnabledChecker user_checker: App\Security\UserEnabledChecker
login_throttling: true
# activate different ways to authenticate # activate different ways to authenticate
# https://symfony.com/doc/current/security.html#the-firewall # https://symfony.com/doc/current/security.html#the-firewall
... ...
......
...@@ -78,6 +78,18 @@ ...@@ -78,6 +78,18 @@
"src/Kernel.php" "src/Kernel.php"
] ]
}, },
"symfony/lock": {
"version": "6.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "5.2",
"ref": "8e937ff2b4735d110af1770f242c1107fdab4c8e"
},
"files": [
"config/packages/lock.yaml"
]
},
"symfony/maker-bundle": { "symfony/maker-bundle": {
"version": "1.48", "version": "1.48",
"recipe": { "recipe": {
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment