seize-infra-doc/configs/intranet/nginx-rbac.conf.template
Hedi Kalboussi 1e90a85359 Documentation initiale infra Seize — passation J7
- 6 docs racine (README, HANDOVER, ARCHITECTURE, DECISIONS, INSTALL, OPERATIONS)
- 9 docs thématiques dans docs/
- 10 templates docker-compose dans configs/
- 7 scripts Python/Shell d'import Furious vers Zitadel
- 2 matrices RBAC

Etat infra au 5 juin 2026 :
- 88 users Furious importes dans Zitadel
- 8 roles RBAC crees et attribues
- Intranet filtre les cartes selon role (Approche A)
- 7 outils SSO operationnels
2026-06-05 17:49:43 +00:00

49 lines
1.7 KiB
Plaintext

# ============================================================================
# nginx-rbac.conf.template — Config nginx pour l'intranet avec RBAC
# ============================================================================
# Substitue __USER_EMAIL__ dans le HTML par la valeur du header X-Forwarded-Email
# (envoyé par OAuth2-Proxy après authentification Zitadel).
# ============================================================================
events {}
http {
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Cache désactivé pour l'HTML (sinon le sub_filter peut servir un email obsolète)
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate";
# ⭐ Substitue __USER_EMAIL__ par la valeur du header HTTP
sub_filter '__USER_EMAIL__' '$http_x_forwarded_email';
sub_filter_once off;
sub_filter_types text/html;
}
# Pareil pour la racine /
location = / {
add_header Cache-Control "no-store, no-cache, must-revalidate";
sub_filter '__USER_EMAIL__' '$http_x_forwarded_email';
sub_filter_once off;
sub_filter_types text/html;
try_files /index.html =404;
}
# Le mapping JSON doit être accessible mais pas mis en cache
location = /roles-mapping.json {
add_header Cache-Control "no-store";
add_header Content-Type application/json;
}
# Logo et autres fichiers statiques
location / {
try_files $uri $uri/ =404;
}
}
}