From ea7d353be7830d4e80d0dbf5db03aecfb1a24e3b Mon Sep 17 00:00:00 2001 From: cmsassot Date: Thu, 14 Dec 2023 11:14:53 +0100 Subject: [PATCH 1/2] feat(redis): add env var HYDRA_SQL_REDIS_PREFIX/HYDRA_SQL_REDIS_TTL --- .env | 3 +++ config/packages/framework.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env b/.env index c4046f5..01bf543 100644 --- a/.env +++ b/.env @@ -41,3 +41,6 @@ LOCK_DSN=flock SENTRY_DSN= ###< sentry/sentry-symfony ### REDIS_DSN=redis://redis:6379 + +HYDRA_SQL_REDIS_PREFIX=mse +HYDRA_SQL_REDIS_TTL=3600 diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 68da994..f411575 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -12,7 +12,7 @@ framework: # Enables session support. Note that the session will ONLY be started if you read or write from it. # Remove or comment this section to explicitly disable session support. session: - handler_id: '%env(REDIS_DSN)%' + handler_id: '%env(REDIS_DSN)%?prefix=%env(string:HYDRA_SQL_REDIS_PREFIX)%&ttl=%env(int:HYDRA_SQL_REDIS_TTL)%' cookie_secure: auto cookie_samesite: lax storage_factory_id: session.storage.factory.native -- 2.17.1 From 11d49893167023df1f4acf851e5df607ab11dd43 Mon Sep 17 00:00:00 2001 From: cmsassot Date: Thu, 14 Dec 2023 15:22:08 +0100 Subject: [PATCH 2/2] feat(redis): fix session.handler_id: remove '?' --- config/packages/framework.yaml | 2 +- readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index f411575..5469275 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -12,7 +12,7 @@ framework: # Enables session support. Note that the session will ONLY be started if you read or write from it. # Remove or comment this section to explicitly disable session support. session: - handler_id: '%env(REDIS_DSN)%?prefix=%env(string:HYDRA_SQL_REDIS_PREFIX)%&ttl=%env(int:HYDRA_SQL_REDIS_TTL)%' + handler_id: '%env(REDIS_DSN)%&prefix=%env(string:HYDRA_SQL_REDIS_PREFIX)%&ttl=%env(HYDRA_SQL_REDIS_TTL)%' cookie_secure: auto cookie_samesite: lax storage_factory_id: session.storage.factory.native diff --git a/readme.md b/readme.md index a9404e1..3b89143 100644 --- a/readme.md +++ b/readme.md @@ -21,7 +21,7 @@ Elle permet de se connecter à une base de donnée et de vérifier un mot de pas |`HASH_ALGO_LEGACY`|ALgorythme de Hashage par défaut|sha256|| |`SECURITY_PATTERN`|Séquence à employer pour le hashage du mot de passe|password,salt,pepper|obligatoire| |`PEPPER`|Pepper utilisé pour le Hashage||| -|`REDIS_DSN`|DSN du serveur Redis|redis://redis:6379|obligatoire| +|`REDIS_DSN`|DSN du serveur Redis|redis://redis:6379?&redis_sentinel=mymaster|obligatoire| ### Algorithmes de hashage compatibles -- 2.17.1