3 Commits

Author SHA1 Message Date
148f05ef79 Update compose to use
Some checks reported errors
Cadoles/hydra-sql/pipeline/head Something is wrong with the build of this commit
2025-09-18 10:39:18 +02:00
d79cf65bb4 Merge pull request 'chore(alpine): bump alpine version and php package' (#62) from alpine-upgrade into develop
Some checks failed
Cadoles/hydra-sql/pipeline/head There was a failure building this commit
Reviewed-on: #62
2025-09-02 11:53:19 +02:00
7448a9af4d chore(alpine): bump alpine version and php package
Some checks failed
Cadoles/hydra-sql/pipeline/head There was a failure building this commit
Cadoles/hydra-sql/pipeline/pr-develop There was a failure building this commit
2025-09-01 17:05:41 +02:00
6 changed files with 28 additions and 9 deletions

4
.env
View File

@@ -14,7 +14,7 @@
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
###> symfony/framework-bundle ### ###> symfony/framework-bundle ###
APP_ENV=prod APP_ENV=dev
APP_SECRET=406ccaa0c76a451fdcc2307ea146cbef APP_SECRET=406ccaa0c76a451fdcc2307ea146cbef
URL_LINK="http://localhost" URL_LINK="http://localhost"
@@ -44,3 +44,5 @@ ALTCHA_WORKERS=8
ALTCHA_DELAY=100 ALTCHA_DELAY=100
ALTCHA_MOCK_ERROR=false ALTCHA_MOCK_ERROR=false
ALTCHA_ENABLED=true ALTCHA_ENABLED=true
ENABLED_2FA=true

View File

@@ -59,7 +59,6 @@ services:
- HASH_ALGO_LEGACY="sha256" - HASH_ALGO_LEGACY="sha256"
- SECURITY_PATTERN=password,salt,pepper - SECURITY_PATTERN=password,salt,pepper
- CADDY_HTTP_PORT=8071 - CADDY_HTTP_PORT=8071
oidc-test: oidc-test:
image: bornholm/oidc-test:v0.0.0-1-g936a77e image: bornholm/oidc-test:v0.0.0-1-g936a77e
environment: environment:
@@ -158,6 +157,19 @@ services:
image: reg.cadoles.com/cadoles/altcha:2024.10.29-develop.1213.22e038b image: reg.cadoles.com/cadoles/altcha:2024.10.29-develop.1213.22e038b
environment: environment:
ALTCHA_HMAC_KEY: 'change_me' ALTCHA_HMAC_KEY: 'change_me'
hydra-2fa:
build:
context: ../hydra-2fa # Répertoire du sous-projet
dockerfile: Dockerfile
volumes:
- ../hydra-2fa:/app # Montage pour synchronisation en temps réel (ajuste si le WORKDIR change)
environment:
- APP_ENV=dev
- APP_DEBUG=1 # Pour mode debug en dev
ports:
- "8070:80" # Mappe le port 80 du conteneur sur 8081 de l'hôte
depends_on:
- mariadb # Si tu utilises la DB partagée
volumes: volumes:
postgres: postgres:
mariadb: mariadb:

View File

@@ -51,7 +51,9 @@ services:
App\Hydra\HydraService: App\Hydra\HydraService:
arguments: arguments:
$baseUrl: '%base_url%' $baseUrl: '%base_url%'
App\Controller\MainController:
arguments:
$enabled2fa: '%env(bool:ENABLED_2FA)%'
App\SQLLogin\SQLLoginRequest: App\SQLLogin\SQLLoginRequest:
arguments: arguments:
$config: [] $config: []

View File

@@ -1,5 +1,5 @@
ARG NODE_OPTIONS="--openssl-legacy-provider" \ ARG NODE_OPTIONS="--openssl-legacy-provider" \
PHP_PKG_VERSION="8.4.5-r0" \ PHP_PKG_VERSION="8.4.11-r0" \
ENCORE_MODE="production" \ ENCORE_MODE="production" \
APP_ENV="prod" \ APP_ENV="prod" \
BASE_PATH="" \ BASE_PATH="" \
@@ -20,4 +20,4 @@ ARG NODE_OPTIONS="--openssl-legacy-provider" \
BASE_PATH=${BASE_PATH} \ BASE_PATH=${BASE_PATH} \
APP_LOCALES=${APP_LOCALES}" APP_LOCALES=${APP_LOCALES}"
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.4-base-2025.6.12-stable.1038.48ea3b9 FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.4-base-2025.9.1-stable.1652.6889275

View File

@@ -1,5 +1,5 @@
ARG NODE_OPTIONS="--openssl-legacy-provider" \ ARG NODE_OPTIONS="--openssl-legacy-provider" \
PHP_PKG_VERSION="8.4.5-r0" \ PHP_PKG_VERSION="8.4.11-r0" \
ENCORE_MODE="production" \ ENCORE_MODE="production" \
APP_ENV="prod" \ APP_ENV="prod" \
BASE_PATH="" \ BASE_PATH="" \
@@ -20,5 +20,5 @@ ARG NODE_OPTIONS="--openssl-legacy-provider" \
BASE_PATH=${BASE_PATH} \ BASE_PATH=${BASE_PATH} \
APP_LOCALES=${APP_LOCALES}" APP_LOCALES=${APP_LOCALES}"
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.4-standalone-2025.6.12-stable.1038.48ea3b9 FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.4-standalone-2025.9.1-stable.1652.6889275
USER www-data USER www-data

View File

@@ -20,7 +20,8 @@ class MainController extends AbstractController
public function __construct( public function __construct(
private readonly RequestStack $requestStack, private readonly RequestStack $requestStack,
private readonly HydraService $hydra, private readonly HydraService $hydra,
private readonly Client $client private readonly Client $client,
private readonly bool $enabled2fa
) { ) {
} }
@@ -42,6 +43,8 @@ class MainController extends AbstractController
#[Route('/connect/login-accept', name: 'app_login_accept', methods: ['GET'])] #[Route('/connect/login-accept', name: 'app_login_accept', methods: ['GET'])]
public function loginAccept(SQLLoginRequest $sqlLoginRequest): RedirectResponse public function loginAccept(SQLLoginRequest $sqlLoginRequest): RedirectResponse
{ {
dd($this->enabled2fa);
$user = $this->getUser(); $user = $this->getUser();
if (!$user instanceof User) { if (!$user instanceof User) {