feat(security): durcissement edge funklab.online (vraie IP client + rate-limit + TLS/headers) (#95)

- Traefik externalTrafficPolicy: Local → IP client réelle (fin du SNAT kube-proxy)
- middleware ratelimit par IP (100/min, burst 200) sur les 6 routes publiques
- middleware security-headers (HSTS, nosniff, X-Frame SAMEORIGIN, Referrer-Policy)
- TLSOption globale : plancher TLS 1.2 + ciphers modernes
- Guacamole REMOTE_IP_VALVE → ban anti-bruteforce par IP (fin du piège n°5)
- nftables : fermeture des ports Internet legacy 9080/9081 (HTTP clair redondant)
- allowCrossNamespace pour mutualiser les middlewares depuis infra
- docs : section Durcissement (public-domain.md) + CAA OVH + pièges à jour

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ALI YESILKAYA 2026-07-07 22:58:24 +02:00 committed by GitHub
parent a13b5a70cd
commit fe0aa89ffa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 178 additions and 19 deletions

View file

@ -11,6 +11,11 @@ spec:
routes:
- match: Host(`auth.funklab.online`)
kind: Rule
middlewares:
- name: security-headers
namespace: infra
- name: ratelimit
namespace: infra
services:
- name: authentik
port: 9000

View file

@ -65,6 +65,14 @@ spec:
# system » (Alkatrazz). Dépannage sans Authentik : "*, openid" + re-sync.
- name: EXTENSION_PRIORITY
value: "openid, *"
# Derrière Traefik : lire l'IP client réelle dans X-Forwarded-For (Traefik
# la connaît grâce à externalTrafficPolicy: Local). Sans ça, l'anti-bruteforce
# voit l'IP du pod Traefik → un ban bloque TOUT LE MONDE (piège n°5). Ici le
# ban devient par IP. PROXY_ALLOWED_IPS = CIDR pods k8s (source = Traefik).
- name: REMOTE_IP_VALVE_ENABLED
value: "true"
- name: PROXY_ALLOWED_IPS
value: "10.42.0.0/16"
- name: TZ
value: "Europe/Paris"
resources:

View file

@ -11,6 +11,11 @@ spec:
routes:
- match: Host(`portail.funklab.online`)
kind: Rule
middlewares:
- name: security-headers
namespace: infra
- name: ratelimit
namespace: infra
services:
- name: guacamole
port: 8080

View file

@ -12,6 +12,11 @@ spec:
routes:
- match: Host(`n8n.funklab.online`)
kind: Rule
middlewares:
- name: security-headers
namespace: infra
- name: ratelimit
namespace: infra
services:
- name: n8n
port: 5678

View file

@ -11,6 +11,11 @@ spec:
routes:
- match: Host(`openwebui.funklab.online`)
kind: Rule
middlewares:
- name: security-headers
namespace: infra
- name: ratelimit
namespace: infra
services:
- name: open-webui
port: 8080