From d6ab90c810191f2ddc88e13afbbc297dea93d7c5 Mon Sep 17 00:00:00 2001 From: dahoud Date: Sun, 14 Dec 2025 17:10:18 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=20S=C3=89CURIT=C3=89=20-=20Audit?= =?UTF-8?q?=20UnionFlow:=20Corrections=20Critiques=20et=20Majeures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🔮 CRITIQUES 1. Suppression du secret hardcodĂ© du Dockerfile (KEYCLOAK_CLIENT_SECRET) Les secrets doivent maintenant ĂȘtre injectĂ©s via Kubernetes Secrets 2. Configuration TLS sĂ©curisĂ©e par dĂ©faut - quarkus.oidc.tls.verification=required (au lieu de 'none') - PrĂ©vient les attaques Man-in-the-Middle - 'none' reste disponible uniquement en dĂ©veloppement local ## 🟠 MAJEURES - Ajout de annotationProcessorPaths pour Lombok dans maven-compiler-plugin Assure la gĂ©nĂ©ration correcte des getters/setters/builders ## 📋 Contexte Suite Ă  l'audit de sĂ©curitĂ© AUDIT_INTEGRAL_COMPLET_2025.md Score avant: 5.6/10 - NE PAS DÉPLOYER EN PRODUCTION ProblĂšmes critiques identifiĂ©s et corrigĂ©s ## ⚠ ACTION REQUISE CrĂ©er le Kubernetes Secret avant dĂ©ploiement: kubectl create secret generic unionflow-client-secrets \ --namespace=applications \ --from-literal=keycloak-client-secret='...' Voir: kubernetes/secrets/README.md đŸ€– Generated with Claude Code --- Dockerfile | 3 ++- pom.xml | 8 ++++++++ src/main/resources/application.properties | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3c1882c..5df482e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,8 +16,9 @@ ENV QUARKUS_HTTP_HOST=0.0.0.0 ENV UNIONFLOW_BACKEND_URL=https://lions.dev/unionflow # Configuration Keycloak OIDC +# IMPORTANT: Les secrets doivent ĂȘtre injectĂ©s via Kubernetes Secrets au runtime ENV KEYCLOAK_AUTH_SERVER_URL=https://security.lions.dev/realms/unionflow -ENV KEYCLOAK_CLIENT_SECRET=unionflow-client-secret-2025 +# ENV KEYCLOAK_CLIENT_SECRET will be injected via Kubernetes Secret # CrĂ©er l'utilisateur appuser RUN addgroup -g 185 appuser && adduser -D -u 185 -G appuser appuser diff --git a/pom.xml b/pom.xml index 4f7b628..308b2a9 100644 --- a/pom.xml +++ b/pom.xml @@ -214,6 +214,14 @@ 17 UTF-8 true + + + + org.projectlombok + lombok + ${lombok.version} + + diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 11b4808..520a82a 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -74,7 +74,9 @@ quarkus.oidc.authentication.redirect-path=/auth/callback quarkus.oidc.authentication.restore-path-after-redirect=true quarkus.oidc.authentication.scopes=openid,profile,email,roles quarkus.oidc.token.issuer=https://security.lions.dev/realms/unionflow -quarkus.oidc.tls.verification=none +# SÉCURITÉ: TLS verification DOIT ĂȘtre 'required' par dĂ©faut +# Seulement 'none' en dĂ©veloppement local (voir application-dev.properties) +quarkus.oidc.tls.verification=required # quarkus.oidc.authentication.force-redirect-https=false # Not supported in this Quarkus version quarkus.oidc.authentication.cookie-same-site=lax quarkus.oidc.authentication.java-script-auto-redirect=false