Architecture: - Les domaines (siteconseil.fr, esy-web.dev) sont definis en constante dans la commande uniquement, pas dans les services - 3 services independants reutilisables: src/Service/DnsCheckService.php (nouveau): - Methodes publiques checkSpf(), checkDmarc(), checkDkim(), checkMx(), checkBounce() qui prennent le domaine en parametre - Verification SPF: presence des includes amazonses.com et mail.esy-web.dev - Verification DMARC: politique, presence de rua - Verification DKIM: test de 10 selecteurs en CNAME et TXT - Verification MX: le MX attendu est passe en parametre par la commande - Verification Bounce: MX/CNAME/TXT sur bounce.* src/Service/AwsSesService.php (nouveau): - Authentification AWS Signature V4 via HTTP direct (pas de SDK) - isDomainVerified(): verification du statut du domaine dans SES - getDkimStatus(): statut DKIM (enabled, verified, tokens) - getNotificationStatus(): bounce_topic, complaint_topic, forwarding - listVerifiedIdentities(): liste des domaines verifies - isAvailable(): test de connectivite API src/Service/CloudflareService.php (nouveau): - Authentification Bearer token via HTTP direct (pas de SDK) - getZoneId(): recupere le zone ID dynamiquement par nom de domaine (plus besoin de CLOUDFLARE_ZONE_ID en dur) - getDnsRecords(): tous les enregistrements d'une zone - getDnsRecordsByType(): filtrage par type (TXT, MX, CNAME...) - getZone(): informations d'une zone - isAvailable(): verification du token API src/Command/CheckDnsCommand.php (reecrit): - Utilise les 3 services pour orchestrer les verifications - Affichage console colore avec icones OK/ERREUR/ATTENTION - Envoie un rapport email via le template Twig dns_report.html.twig templates/emails/dns_report.html.twig (nouveau): - Template email compatible tous clients (table-based, CSS inline, margin/padding longhand, mso-line-height-rule, pas de rgba/border-radius) - Bandeau colore vert/jaune/rouge selon le statut global - Section succes avec checkmarks verts dans un tableau alterne - Section erreurs en rouge avec croix dans un tableau fond #fef2f2 - Section avertissements en jaune avec triangles fond #fffbeb - Detail par domaine avec tableau type/verification/statut - Utilise le template email/base.html.twig (header gold, footer dark) Variables d'environnement ajoutees: - .env: AWS_PK, AWS_SECRET, AWS_REGION (eu-west-3), CLOUDFLARE_KEY (vides) - .env.local: valeurs reelles des cles AWS et Cloudflare - ansible/vault.yml: aws_pk, aws_secret, cloudflare_key - ansible/env.local.j2: AWS_PK, AWS_SECRET, AWS_REGION, CLOUDFLARE_KEY avec references au vault - CLOUDFLARE_ZONE_ID supprime (recupere dynamiquement via l'API) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
106 lines
3.0 KiB
Bash
106 lines
3.0 KiB
Bash
# In all environments, the following files are loaded if they exist,
|
|
# the latter taking precedence over the former:
|
|
#
|
|
# * .env contains default values for the environment variables needed by the app
|
|
# * .env.local uncommitted file with local overrides
|
|
# * .env.$APP_ENV committed environment-specific defaults
|
|
# * .env.$APP_ENV.local uncommitted environment-specific overrides
|
|
#
|
|
# Real environment variables win over .env files.
|
|
#
|
|
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
|
|
# https://symfony.com/doc/current/configuration/secrets.html
|
|
#
|
|
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
|
|
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
|
|
|
###> symfony/framework-bundle ###
|
|
APP_ENV=dev
|
|
APP_SECRET=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
|
|
APP_SHARE_DIR=var/share
|
|
###< symfony/framework-bundle ###
|
|
|
|
###> symfony/routing ###
|
|
DEFAULT_URI=https://esyweb.local
|
|
###< symfony/routing ###
|
|
|
|
###> doctrine/doctrine-bundle ###
|
|
DATABASE_URL="postgresql://app:secret@pgbouncer:6432/e_ticket?serverVersion=16&charset=utf8"
|
|
###< doctrine/doctrine-bundle ###
|
|
|
|
###> symfony/messenger ###
|
|
MESSENGER_TRANSPORT_DSN=redis://redis:6379/messages
|
|
###< symfony/messenger ###
|
|
|
|
###> session ###
|
|
SESSION_HANDLER_DSN=redis://redis:6379/1
|
|
###< session ###
|
|
|
|
###> cache ###
|
|
REDIS_CACHE_DSN=redis://redis:6379/2
|
|
###< cache ###
|
|
|
|
###> symfony/mailer ###
|
|
MAILER_DSN=smtp://mailpit:1025
|
|
###< symfony/mailer ###
|
|
|
|
###> vite ###
|
|
# 0 = dev (HMR via localhost:5173), 1 = prod (manifest build)
|
|
VITE_LOAD=0
|
|
REAL_MAIL=0
|
|
###< vite ###
|
|
STRIPE_PK=
|
|
STRIPE_SK=
|
|
STRIPE_WEBHOOK_SECRET=
|
|
STRIPE_WEBHOOK_SECRET_CONNECT=
|
|
STRIPE_MODE=test
|
|
STRIPE_FEE_RATE=0.015
|
|
STRIPE_FEE_FIXED=25
|
|
ADMIN_EMAIL=contact@siteconseil.fr
|
|
|
|
###> SonarQube ###
|
|
SONARQUBE_URL=https://sn.esy-web.dev
|
|
SONARQUBE_BADGE_TOKEN=sqb_bf06d32640147db064c99d2e893ca63a072630d7
|
|
SONARQUBE_PROJECT_KEY=crm_siteconseil
|
|
###< SonarQube ###
|
|
|
|
###> SSO SITECONSEIL (Keycloak OIDC) ###
|
|
OAUTH_KEYCLOAK_CLIENT_ID=crm_siteconseil
|
|
OAUTH_KEYCLOAK_CLIENT_SECRET=kh1WBbnEzcEZVriXmU7IaxizChReHmIx
|
|
OAUTH_KEYCLOAK_URL=https://auth.esy-web.dev
|
|
OAUTH_KEYCLOAK_REALM=master
|
|
###< SSO SITECONSEIL (Keycloak OIDC) ###
|
|
|
|
###> Keycloak Admin Service Account ###
|
|
KEYCLOAK_ADMIN_CLIENT_ID=crm_siteconseil_admin
|
|
KEYCLOAK_ADMIN_CLIENT_SECRET=5pIluXMGWgOhx8nI9EiLB43QCuShHLyw
|
|
###< Keycloak Admin Service Account ###
|
|
|
|
###> symfony/amazon-mailer ###
|
|
# MAILER_DSN=ses://ACCESS_KEY:SECRET_KEY@default?region=eu-west-1
|
|
# MAILER_DSN=ses+smtp://ACCESS_KEY:SECRET_KEY@default?region=eu-west-1
|
|
###< symfony/amazon-mailer ###
|
|
|
|
###> stripe/stripe-php ###
|
|
STRIPE_SECRET_KEY=sk_test_***
|
|
###< stripe/stripe-php ###
|
|
SMIME_PASSPHRASE=EVz5zNV8h4ndSLOCWO9JeaQnIertQm7k
|
|
SECRET_ANALYTICS=
|
|
|
|
###> aws ###
|
|
AWS_PK=
|
|
AWS_SECRET=
|
|
AWS_REGION=eu-west-3
|
|
###< aws ###
|
|
|
|
###> cloudflare ###
|
|
CLOUDFLARE_KEY=
|
|
###< cloudflare ###
|
|
|
|
###> docuseal ###
|
|
DOCUSEAL_URL=https://signature.esy-web.dev
|
|
DOCUSEAL_API=
|
|
DOCUSEAL_WEBHOOKS_SECRET_HEADER=X-Sign
|
|
DOCUSEAL_WEBHOOKS_SECRET=
|
|
###< docuseal ###
|