feat(lab11): hardened nginx + WAF sidecar#1559
Open
Muratich wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Hardened Nginx reverse proxy in front of Juice Shop (TLS 1.3, security headers, rate limiting) and added a ModSecurity WAF sidecar with OWASP CRS to block SQL injection payloads that Nginx alone passes.
Changes
submissions/lab11.mdβ Task 1β2 proofs, cert rotation runbook, WAF tradeoff analysislabs/lab11/reverse-proxy/nginx.confβ TLS 1.3, security headers, rate/conn limits, timeouts, session/OCSP hardeninglabs/lab11/waf/docker-compose.override.ymlβ ModSecurity v3 + OWASP CRS sidecar on:8443labs/lab11/waf/logs/.gitkeepβ WAF audit log mount point:8080for WAF β nginx β juice routing (docker network only)Testing
docker compose up -d(nginx + juice-shop)docker compose -f docker-compose.yml -f waf/docker-compose.override.yml up -d(with WAF)curl -sI http://localhostβ HTTP β HTTPS redirectopenssl s_client -connect 127.0.0.1:443 -tls1_3 -briefβ TLS 1.3 negotiationcurl -skI https://localhostβ security headersPOST /rest/user/loginβ rate limit (54Γ429, 6Γ401):443β timeout (connection closed after ~10s)curl ... /rest/products/search?q=' OR 1=1--β no-waf vs with-wafhttps://localhost/TLS_AES_256_GCM_SHA384, curve X25519Artifacts & Screenshots
submissions/lab11.mdsubmissions/lab11.md(redirect, TLS, headers, rate limit, timeout, cipher, WAF audit log)Checklist
feat(lab11): hardened nginx + WAF sidecar)labs/lab11/results/not included; self-signed certs local only)submissions/lab11.mdexists