passe le portail en HTTPS sur syllabuslab.fr, avec en-têtes de sécurité et CSP
Certificat Let's Encrypt obtenu et renouvelé par certbot (authentificateur nginx), expiration surveillée par Prometheus. TLS selon Mozilla v6.0 intermediate, HSTS, CSP stricte avec nonce sur l'application et adaptée sur la vitrine, xterm.js servi par le portail. Page de statut prévue sur status.syllabuslab.fr, administration de Grafana et Kuma par tunnel seul. Corrige aussi une faille XSS dans la page de classe, la page /cours en erreur depuis l'étape 8, et NodeSource relancé à chaque déploiement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
aa004c0736
commit
618cd7efbe
30 changed files with 987 additions and 24 deletions
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Géré par Ansible (rôle portail). Publie la date d'expiration du certificat
|
||||
# HTTPS pour Prometheus (collecteur textfile de node_exporter) : alerte
|
||||
# CertificatExpireBientot si le renouvellement automatique échoue.
|
||||
set -eu
|
||||
CERT=/etc/letsencrypt/live/{{ portail_domaine }}/fullchain.pem
|
||||
DOSSIER=/var/lib/node_exporter/textfile
|
||||
FIN=$(date -d "$(openssl x509 -enddate -noout -in "$CERT" | cut -d= -f2)" +%s)
|
||||
cat > "$DOSSIER/certificat.prom.tmp" <<METRIQUE
|
||||
# HELP syllabus_certificat_expiration_timestamp Date d'expiration du certificat HTTPS (secondes Unix).
|
||||
# TYPE syllabus_certificat_expiration_timestamp gauge
|
||||
syllabus_certificat_expiration_timestamp{domaine="{{ portail_domaine }}"} $FIN
|
||||
METRIQUE
|
||||
mv "$DOSSIER/certificat.prom.tmp" "$DOSSIER/certificat.prom"
|
||||
Loading…
Add table
Add a link
Reference in a new issue