From 92a833ec50a68931dc494b02c46b266e3bac7a48 Mon Sep 17 00:00:00 2001
From: hkoeck
Date: Sat, 7 Mar 2026 19:21:13 +0100
Subject: [PATCH] Refine workshop UI navigation and hardening guidance
---
Makefile | 5 ++-
README.md | 3 ++
challenges/README.md | 51 ++++++++++++++++++++++++++++--
proxy/html/challenges.html | 42 +++++++++++++++++++++----
proxy/html/hints.html | 30 ++++++++++++++++--
proxy/html/index.html | 11 ++++---
proxy/html/solutions.html | 60 ++++++++++++++++++++++++++++++++----
proxy/nginx.tls.example.conf | 6 +++-
scripts/reset-lab.sh | 22 ++++++++++---
scripts/workshop.ps1 | 3 +-
10 files changed, 205 insertions(+), 28 deletions(-)
diff --git a/Makefile b/Makefile
index 1fbe5bc..69ee4e9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: bootstrap up down logs redeploy proxy-reload reset reset-hard
+.PHONY: bootstrap up down logs redeploy proxy-reload reset reset-hard reset-origin
bootstrap:
./scripts/bootstrap.sh
@@ -24,3 +24,6 @@ reset:
reset-hard:
./scripts/reset-lab.sh --hard
+
+reset-origin:
+ ./scripts/reset-lab.sh --hard-origin
diff --git a/README.md b/README.md
index ac2f5c3..c2f3a91 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,7 @@ Weitere Aktionen in PowerShell:
./scripts/workshop.ps1 -Action proxy-reload
./scripts/workshop.ps1 -Action reset
./scripts/workshop.ps1 -Action reset-hard
+./scripts/workshop.ps1 -Action reset-origin
```
Wenn mehrere Distros installiert sind:
@@ -104,12 +105,14 @@ make redeploy
make proxy-reload
make reset
make reset-hard
+make reset-origin
```
- `redeploy`: build + restart aller Services
- `proxy-reload`: nur Reverse Proxy restart
- `reset`: Container/Netzwerk/Volumes aufraeumen
- `reset-hard`: wie `reset`, plus lokale Git-Aenderungen verwerfen (falls Git-Repo)
+- `reset-origin`: wie `reset-hard`, aber bevorzugt Ruecksetzen auf `origin/main`
Hinweis: `make redeploy` startet zusaetzlich den Reverse Proxy neu, damit Nginx-Config-Aenderungen sicher aktiv sind.
diff --git a/challenges/README.md b/challenges/README.md
index dda1d91..13e2011 100644
--- a/challenges/README.md
+++ b/challenges/README.md
@@ -29,6 +29,9 @@ Diese Aufgaben sind bewusst auf **manuelle Proxy-Konfiguration** ausgelegt.
- Dann erst Requests ausfuehren.
- In eigenen Worten erklaeren, warum die Antworten unterschiedlich sind.
+**Warum wichtig**
+- Das ist die Kernkompetenz bei Reverse Proxys: Request-Fluss lesen und korrekt begruenden.
+
**Done-Check**
```bash
curl http://localhost:8080/service/a
@@ -50,6 +53,9 @@ curl http://localhost:8080/service/b
- Upstream + Route `/service/c` in Nginx anlegen.
- A/B muessen weiterhin funktionieren.
+**Warum wichtig**
+- In realen Umgebungen kommen neue Services laufend dazu. Saubere Erweiterung ohne Regression ist entscheidend.
+
**Done-Check**
```bash
curl http://localhost:8080/service/c
@@ -69,6 +75,9 @@ curl http://localhost:8080/service/b
- Route `/demo/a` anbieten, die auf Backend A fuehrt.
- Entweder per rewrite oder per eigener proxy-Route loesen.
+**Warum wichtig**
+- Der Proxy entkoppelt externe API-Pfade von internen Service-Pfaden und ermoeglicht saubere Migrationen.
+
**Done-Check**
```bash
curl http://localhost:8080/demo/a
@@ -90,7 +99,14 @@ curl http://localhost:8080/demo/a
- Mindestens setzen:
- `X-Content-Type-Options: nosniff`
- `X-Frame-Options: DENY`
- - `Referrer-Policy: no-referrer`
+ - `Referrer-Policy: strict-origin-when-cross-origin`
+ - `Permissions-Policy: camera=(), microphone=(), geolocation=()`
+ - `Cross-Origin-Opener-Policy: same-origin`
+ - `Cross-Origin-Resource-Policy: same-origin`
+- Optional (Bonus): `Content-Security-Policy` fuer statische Seiten (mit Inline-Styles bewusst beruecksichtigen)
+
+**Warum wichtig**
+- Diese Header reduzieren typische Browser-Angriffsvektoren und gehoeren zu Security-Baselines.
**Done-Check**
```bash
@@ -109,6 +125,9 @@ curl -I http://localhost:8080/
- Route `/internal/status` bauen.
- Nur `127.0.0.1` erlauben, alle anderen verbieten.
+**Warum wichtig**
+- Nicht jeder Endpoint soll oeffentlich sein; Zugriffskontrolle direkt am Proxy ist oft die erste Schutzschicht.
+
**Wichtiger Hinweis**
- Host-Request ueber `localhost:8080` kommt aus Docker-Sicht oft **nicht** von `127.0.0.1`.
@@ -133,6 +152,9 @@ curl -i http://localhost:8080/internal/status
- Eigenes `log_format` mit Upstream-Infos anlegen.
- Access-Log auf das neue Format umstellen.
+**Warum wichtig**
+- Gute Logs verkuerzen Incident- und Debug-Zeit drastisch und sind zentral fuer Betrieb/Security.
+
**Done-Check**
```bash
curl http://localhost:8080/service/a
@@ -153,6 +175,9 @@ curl http://localhost:8080/service/a
- `upstream backend_a` auf beide Instanzen erweitern.
- Mehrfach-Requests zeigen, dass beide Instanzen antworten.
+**Warum wichtig**
+- Lastverteilung ist eine der wichtigsten Funktionen eines Reverse Proxys fuer Skalierung und Verfuegbarkeit.
+
**Done-Check (Beispiel)**
```bash
for i in $(seq 1 8); do
@@ -160,7 +185,7 @@ for i in $(seq 1 8); do
done
```
-### 6b) Header Stripping (Response)
+### 6b) Response Header Minimization
**Ziel**
- Unnoetige Header aus Upstream-Responses entfernen.
@@ -173,6 +198,13 @@ done
(z. B. `ETag`, `Last-Modified`).
- Kurz erklaeren, warum weniger Fingerprinting-Infos hilfreich sind.
+**Abgrenzung zu Challenge 4**
+- Challenge 4 setzt aktive Schutz-Header.
+- Challenge 6b entfernt unnoetige Header aus Upstream-Responses.
+
+**Warum wichtig**
+- Weniger Response-Metadaten bedeuten weniger Angriffsoberflaeche fuer Fingerprinting und Reconnaissance.
+
**Done-Check**
```bash
curl -I http://localhost:8080/service/a
@@ -191,6 +223,9 @@ curl -I http://localhost:8080/service/a
- Mindestens 2-3 Fehler finden und fixen.
- Symptome und Diagnoseweg erklaeren.
+**Warum wichtig**
+- Debugging unter Druck ist Praxisalltag; diese Aufgabe trainiert systematisches Vorgehen mit Logs und Config-Tests.
+
**Done-Check**
```bash
curl http://localhost:8080/service/a
@@ -216,6 +251,9 @@ curl http://localhost:8080/service/b
- Proxy auf `443` erweitern (z. B. `8443:443`).
- Root-CA importieren und ohne `-k` testen.
+**Warum wichtig**
+- TLS korrekt einzurichten ist Basis fuer Vertraulichkeit, Integritaet und Vertrauensaufbau im Netzwerk.
+
**Done-Check**
```bash
curl https://localhost:8443/service/a
@@ -237,6 +275,9 @@ curl https://localhost:8443/service/a
- HTTP Requests auf HTTPS redirecten.
- `/healthz` darf optional auf HTTP bleiben.
+**Warum wichtig**
+- Redirect erzwingt verschluesselten Zugriff und verhindert versehentliche Nutzung unsicherer HTTP-Endpunkte.
+
**Done-Check**
```bash
curl -I http://localhost:8080/service/a
@@ -259,6 +300,9 @@ curl -I http://localhost:8080/service/a
- HSTS setzen (`Strict-Transport-Security`).
- Zertifikatskette pruefen und kurz erklaeren.
+**Warum wichtig**
+- Reines "HTTPS an" reicht nicht: erst Haertung + HSTS reduzieren Downgrade- und Fehlkonfigurationsrisiken.
+
**Hinweis**
- Im HTTP-Basissetup ist HSTS absichtlich **noch nicht** aktiv. Das ist Teil der Aufgabe.
@@ -283,6 +327,9 @@ openssl s_client -connect localhost:8443 -servername localhost
- `ClientHello`, `ServerHello`, `Certificate` markieren.
- Technisch erklaeren, warum HTTP lesbar ist und HTTPS ohne Keys nicht.
+**Warum wichtig**
+- Wer den Unterschied auf Paketebene gesehen hat, versteht TLS nicht nur theoretisch, sondern praktisch.
+
**Vorgehen (empfohlen)**
1. Capture auf passendem Interface starten (lokal meist `lo`).
2. HTTP Request senden und lesbaren Stream zeigen.
diff --git a/proxy/html/challenges.html b/proxy/html/challenges.html
index 54d58b7..0b5c3c7 100644
--- a/proxy/html/challenges.html
+++ b/proxy/html/challenges.html
@@ -65,6 +65,8 @@
}
code {
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", "Liberation Mono", monospace;
+ font-size: 0.92em;
background: #0d1f31;
border: 1px solid #2d4f6e;
border-radius: 6px;
@@ -75,8 +77,20 @@
background: #0b2133;
border: 1px solid #2b5578;
border-radius: 10px;
- padding: 0.7rem;
- overflow: auto;
+ padding: 0.75rem 0.85rem;
+ overflow-x: auto;
+ margin: 0.65rem 0;
+ }
+
+ pre code {
+ display: block;
+ background: transparent;
+ border: 0;
+ border-radius: 0;
+ padding: 0;
+ font-size: 0.92rem;
+ line-height: 1.45;
+ white-space: pre;
}
.top-links {
@@ -153,6 +167,7 @@
Manuelle Proxy-Konfiguration, Security-Entscheidungen und TLS von Grund auf.
Startseite
+
Challenges
Hints
Solutions
Backend A
@@ -172,9 +187,10 @@
Easy
-
+
Easy 1) Routing verstehen (aktiv)
Muss: zuerst in proxy/nginx.conf nachsehen, dann testen.
+ Warum wichtig: Routing ist die Grundfunktion jedes Reverse Proxys - ohne sauberes Matching ist alles andere instabil.
- Welche
location matched /service/a?
- Welcher
upstream wird verwendet?
@@ -187,6 +203,7 @@ curl http://localhost:8080/service/b
Easy 2) backend-c hinzufuegen
Muss: Compose-Service + Upstream + Route /service/c.
Zusatz: backends/c/index.html ist vorhanden und darf angepasst werden.
+ Warum wichtig: Neue Services kommen laufend dazu; Erweiterungen ohne Seiteneffekte sind Praxisalltag.
curl http://localhost:8080/service/c
curl http://localhost:8080/service/a
curl http://localhost:8080/service/b
@@ -195,6 +212,7 @@ curl http://localhost:8080/service/b
Easy 3) Eigene Route /demo/a
Muss: Alias-Route bauen, die auf Backend A fuehrt.
+ Warum wichtig: Der Proxy entkoppelt externe Pfade von internen Backend-Implementierungen.
curl http://localhost:8080/demo/a
@@ -204,7 +222,9 @@ curl http://localhost:8080/service/b
Medium 4) Security Headers
- Setze mindestens nosniff, DENY, no-referrer.
+ Setze mindestens nosniff, DENY, strict-origin-when-cross-origin, Permissions-Policy, COOP, CORP.
+ Optional: CSP fuer statische Seiten.
+ Warum wichtig: Diese Header reduzieren konkrete Browser-Angriffsvektoren und gehoeren zur Security-Baseline.
curl -I http://localhost:8080/
@@ -212,6 +232,7 @@ curl http://localhost:8080/service/b
Medium 5) Interne Route absichern
Muss: /internal/status nur fuer 127.0.0.1.
Wichtig: Host-Request zeigt typischerweise 403 (Docker-Netzwerk).
+
Warum wichtig: Nicht jeder Endpoint darf oeffentlich erreichbar sein; Netzsegmentierung beginnt oft am Proxy.
curl -i http://localhost:8080/internal/status
./scripts/compose.sh exec -T reverse-proxy sh -lc "wget -qO- http://127.0.0.1/internal/status"
@@ -219,6 +240,7 @@ curl http://localhost:8080/service/b
Medium 6) Logging verbessern
Eigenes log_format mit Upstream-Infos einbauen.
+ Warum wichtig: Ohne brauchbare Logs dauert Fehleranalyse deutlich laenger und Incident-Response wird unzuverlaessig.
curl http://localhost:8080/service/a
./scripts/compose.sh logs reverse-proxy
@@ -226,20 +248,24 @@ curl http://localhost:8080/service/b
Medium 6a) Load Balancing
Zweite Instanz von Backend A (backend-a2) einbauen und Round-Robin zeigen.
+ Warum wichtig: Lastverteilung ist Kernnutzen eines Reverse Proxys fuer Skalierung und Verfuegbarkeit.
for i in $(seq 1 8); do
curl -s http://localhost:8080/service/a | grep -o "Target A2\|Target A"
done
- Medium 6b) Header Stripping
+ Medium 6b) Response Header Minimization
Mindestens einen Backend-Response-Header per proxy_hide_header ausblenden.
+ Abgrenzung zu #4: #4 setzt Schutz-Header, #6b entfernt unnoetige Header aus Upstream-Responses.
+ Warum wichtig: Weniger preisgegebene Metadaten erschweren Fingerprinting und zielgerichtete Angriffe.
curl -I http://localhost:8080/service/a
Medium 6c) Debugging Challenge
Mit proxy/nginx.broken.conf arbeiten, Fehler finden und reparieren.
+ Warum wichtig: In der Praxis geht es oft um Diagnose unter Zeitdruck, nicht nur um Greenfield-Konfiguration.
curl http://localhost:8080/service/a
curl http://localhost:8080/service/b
./scripts/compose.sh logs reverse-proxy
@@ -252,18 +278,21 @@ curl http://localhost:8080/service/b
Hard 7) HTTPS von 0 (Easy-RSA)
Zertifikat fuer localhost, Port 8443:443, Root-CA importiert.
+ Warum wichtig: TLS-Grundaufbau ist Voraussetzung fuer vertrauliche und manipulationssichere Kommunikation.
curl https://localhost:8443/service/a
Hard 8) HTTP -> HTTPS Redirect
Voraussetzung: Challenge 7 abgeschlossen. Bestehende Config weiterverwenden.
+ Warum wichtig: Redirect verhindert unabsichtliche Klartext-Nutzung und erzwingt den sicheren Transport.
curl -I http://localhost:8080/service/a
Hard 9) TLS Haertung + Chain + HSTS
Voraussetzung: Challenge 7 und 8 abgeschlossen. Gleiche Config weiter erweitern.
+ Warum wichtig: Erst Haertung + HSTS reduzieren Downgrade-Risiken und sorgen fuer dauerhaft sichere Clients.
curl -I https://localhost:8443/service/a
openssl s_client -connect localhost:8443 -servername localhost
@@ -272,8 +301,9 @@ openssl s_client -connect localhost:8443 -servername localhost
Bonus Expert
-
+
Expert 10) Wireshark: HTTP vs HTTPS sauber ausarbeiten
+ Warum wichtig: Sichtbarkeit auf Paketebene macht den Sicherheitsgewinn von TLS fuer alle nachvollziehbar.
- HTTP auf
8080 mitschneiden und Klartext zeigen.
- HTTPS auf
8443 mitschneiden.
diff --git a/proxy/html/hints.html b/proxy/html/hints.html
index a075258..273adaa 100644
--- a/proxy/html/hints.html
+++ b/proxy/html/hints.html
@@ -74,6 +74,8 @@
}
code {
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", "Liberation Mono", monospace;
+ font-size: 0.92em;
background: #0d1f31;
border: 1px solid #2d4f6e;
border-radius: 6px;
@@ -84,8 +86,20 @@
background: #0b2133;
border: 1px solid #2b5578;
border-radius: 10px;
- padding: 0.7rem;
- overflow: auto;
+ padding: 0.75rem 0.85rem;
+ overflow-x: auto;
+ margin: 0.65rem 0;
+ }
+
+ pre code {
+ display: block;
+ background: transparent;
+ border: 0;
+ border-radius: 0;
+ padding: 0;
+ font-size: 0.92rem;
+ line-height: 1.45;
+ white-space: pre;
}
.top-links {
@@ -116,7 +130,10 @@
@@ -171,6 +188,15 @@ openssl s_client -connect localhost:8443 -servername localhost
Bei TLS-Haertung auf Strict-Transport-Security im Header achten.
Komplettes TLS-Beispiel: proxy/nginx.tls.example.conf
+
+ Security Header Baseline
+ add_header X-Content-Type-Options "nosniff" always;
+add_header X-Frame-Options "DENY" always;
+add_header Referrer-Policy "strict-origin-when-cross-origin" always;
+add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
+add_header Cross-Origin-Opener-Policy "same-origin" always;
+add_header Cross-Origin-Resource-Policy "same-origin" always;
+
diff --git a/proxy/html/index.html b/proxy/html/index.html
index 9d63438..e1b88f9 100644
--- a/proxy/html/index.html
+++ b/proxy/html/index.html
@@ -58,6 +58,8 @@
}
code {
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", "Liberation Mono", monospace;
+ font-size: 0.92em;
background: #0d1f31;
border: 1px solid #2d4f6e;
border-radius: 6px;
@@ -68,7 +70,7 @@
color: var(--accent);
}
- .links {
+ .top-links {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
@@ -105,12 +107,13 @@
Basis läuft mit HTTP. Ziel im Workshop: Reverse Proxy verstehen und HTTPS/TLS manuell
aufbauen.
-
-
Backend A
-
Backend B
+
diff --git a/proxy/html/solutions.html b/proxy/html/solutions.html
index 7e84af9..ff57923 100644
--- a/proxy/html/solutions.html
+++ b/proxy/html/solutions.html
@@ -65,6 +65,8 @@
}
code {
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", "Liberation Mono", monospace;
+ font-size: 0.92em;
background: #0d1f31;
border: 1px solid #2d4f6e;
border-radius: 6px;
@@ -75,8 +77,20 @@
background: #0b2133;
border: 1px solid #2b5578;
border-radius: 10px;
- padding: 0.7rem;
- overflow: auto;
+ padding: 0.75rem 0.85rem;
+ overflow-x: auto;
+ margin: 0.65rem 0;
+ }
+
+ pre code {
+ display: block;
+ background: transparent;
+ border: 0;
+ border-radius: 0;
+ padding: 0;
+ font-size: 0.92rem;
+ line-height: 1.45;
+ white-space: pre;
}
.top-links {
@@ -151,10 +165,12 @@
Solutions Board (detailliert)
Hier stehen absichtlich konkrete Musterloesungen mit Snippets, Checks und typischen Stolperfallen.
+ Workflow: Nach jeder Konfig-Aenderung mindestens make proxy-reload, bei Compose-Aenderungen make redeploy.
@@ -163,8 +179,10 @@
Easy - Musterloesungen
-
+
Easy 1) Routing verstehen
+ Dateien: nur lesen: proxy/nginx.conf
+ Commands noetig: ja
curl http://localhost:8080/service/a
curl http://localhost:8080/service/b
Erwartete Erklaerung: Nginx matched den Pfad in location und leitet auf den passenden upstream weiter.
@@ -172,6 +190,8 @@ curl http://localhost:8080/service/b
Easy 2) backend-c hinzufuegen
+ Dateien: docker-compose.yml, proxy/nginx.conf, backends/c/index.html
+ Commands noetig: ja
Compose (Beispiel):
backend-c:
image: nginx:1.27-alpine
@@ -195,6 +215,8 @@ location /service/c {
Easy 3) Rewrite Route
+ Dateien: proxy/nginx.conf
+ Commands noetig: ja
location = /demo/a {
proxy_pass http://backend_a/;
}
@@ -207,14 +229,23 @@ location /service/c {
Medium 4) Security Headers
+ Dateien: proxy/nginx.conf
+ Commands noetig: ja
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
-add_header Referrer-Policy "no-referrer" always;
+add_header Referrer-Policy "strict-origin-when-cross-origin" always;
+add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
+add_header Cross-Origin-Opener-Policy "same-origin" always;
+add_header Cross-Origin-Resource-Policy "same-origin" always;
+ Optional CSP (statisch, inline styles erlaubt):
+ add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; object-src 'none'; base-uri 'none'; frame-ancestors 'none'" always;
Check: curl -I http://localhost:8080/
Medium 5) Interne Route absichern
+ Dateien: proxy/nginx.conf
+ Commands noetig: ja
location /internal/status {
allow 127.0.0.1;
deny all;
@@ -228,6 +259,8 @@ add_header Referrer-Policy "no-referrer" always;
Medium 6) Logging verbessern
+ Dateien: proxy/nginx.conf
+ Commands noetig: ja
log_format workshop '$remote_addr - $request '
'status=$status upstream=$upstream_addr '
'rt=$request_time urt=$upstream_response_time';
@@ -240,6 +273,8 @@ access_log /var/log/nginx/access.log workshop;
Medium 6a) Load Balancing
+ Dateien: docker-compose.yml, proxy/nginx.conf, backends/a2/index.html
+ Commands noetig: ja
Compose (backend-a2):
backend-a2:
image: nginx:1.27-alpine
@@ -258,7 +293,10 @@ done
- Medium 6b) Header Stripping
+ Medium 6b) Response Header Minimization
+ Dateien: proxy/nginx.conf
+ Commands noetig: ja
+ Abgrenzung zu #4: #4 fuegt Schutz-Header hinzu, #6b entfernt unnoetige Upstream-Metadaten.
location /service/a {
proxy_pass http://backend_a/;
proxy_hide_header ETag;
@@ -269,6 +307,8 @@ done
Medium 6c) Debugging Challenge
+ Dateien: proxy/nginx.broken.conf, proxy/nginx.conf
+ Commands noetig: ja
Kopiere testweise proxy/nginx.broken.conf auf proxy/nginx.conf, behebe die Fehler und stelle danach die funktionierende Konfiguration wieder her.
cp proxy/nginx.broken.conf proxy/nginx.conf
make proxy-reload
@@ -282,6 +322,8 @@ make proxy-reload
Hard 7) HTTPS mit Easy-RSA
+ Dateien: docker-compose.yml, proxy/nginx.conf, certs/easyrsa/*
+ Commands noetig: ja
mkdir -p certs/easyrsa
cp -r /usr/share/easy-rsa/* certs/easyrsa/
cd certs/easyrsa
@@ -302,6 +344,8 @@ cd certs/easyrsa
Hard 8) HTTP -> HTTPS Redirect
Voraussetzung: Challenge 7 abgeschlossen (gleiches Config-File weiterverwenden).
+ Dateien: proxy/nginx.conf
+ Commands noetig: ja
server {
listen 80;
server_name _;
@@ -321,6 +365,8 @@ cd certs/easyrsa
Hard 9) TLS Haertung + HSTS
Voraussetzung: Challenge 7 und 8 abgeschlossen.
+ Dateien: proxy/nginx.conf
+ Commands noetig: ja
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
@@ -334,8 +380,10 @@ openssl s_client -connect localhost:8443 -servername localhost
Bonus Expert - Wireshark (ausformulierte Referenzloesung)
-
+
Expert 10) HTTP vs HTTPS sauber analysieren
+ Dateien: keine Pflicht-Datei; optional Wireshark Settings und Keylog-Datei
+ Commands noetig: ja
Schritt 1 - HTTP Capture:
- Interface waehlen: lokal meist
lo.
diff --git a/proxy/nginx.tls.example.conf b/proxy/nginx.tls.example.conf
index 400775d..0ab140a 100644
--- a/proxy/nginx.tls.example.conf
+++ b/proxy/nginx.tls.example.conf
@@ -42,7 +42,11 @@ http {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
- add_header Referrer-Policy "no-referrer" always;
+ add_header Referrer-Policy "strict-origin-when-cross-origin" always;
+ add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
+ add_header Cross-Origin-Opener-Policy "same-origin" always;
+ add_header Cross-Origin-Resource-Policy "same-origin" always;
+ add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; object-src 'none'; base-uri 'none'; frame-ancestors 'none'" always;
location / {
root /usr/share/nginx/html;
diff --git a/scripts/reset-lab.sh b/scripts/reset-lab.sh
index 4a0799e..c892ada 100755
--- a/scripts/reset-lab.sh
+++ b/scripts/reset-lab.sh
@@ -14,17 +14,29 @@ echo "[info] Stoppe und entferne Container, Netzwerke, Volumes"
echo "[info] Entferne ungenutzte lokale Images"
docker image prune -f >/dev/null 2>&1 || true
-if [[ "$HARD_RESET" == "--hard" ]]; then
+if [[ "$HARD_RESET" == "--hard" || "$HARD_RESET" == "--hard-origin" ]]; then
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
- if git rev-parse --verify HEAD >/dev/null 2>&1; then
- echo "[info] Git Hard Reset: stelle Dateien auf HEAD zurueck"
- git restore --source=HEAD --staged --worktree .
+ TARGET_REF="HEAD"
+
+ if [[ "$HARD_RESET" == "--hard-origin" ]]; then
+ echo "[info] Versuche auf origin/main zurueckzusetzen"
+ git fetch origin main --quiet >/dev/null 2>&1 || true
+ if git rev-parse --verify origin/main >/dev/null 2>&1; then
+ TARGET_REF="origin/main"
+ else
+ echo "[warn] origin/main nicht verfuegbar, fallback auf HEAD"
+ fi
+ fi
+
+ if git rev-parse --verify "$TARGET_REF" >/dev/null 2>&1; then
+ echo "[info] Git Hard Reset: stelle Dateien auf $TARGET_REF zurueck"
+ git restore --source="$TARGET_REF" --staged --worktree .
else
echo "[warn] Git-Repo ohne Commit-Historie, Datei-Restore wird uebersprungen"
fi
git clean -fd
else
- echo "[warn] Kein Git-Repo erkannt, --hard wird uebersprungen"
+ echo "[warn] Kein Git-Repo erkannt, Git-Reset wird uebersprungen"
fi
fi
diff --git a/scripts/workshop.ps1 b/scripts/workshop.ps1
index b36e2aa..330df41 100644
--- a/scripts/workshop.ps1
+++ b/scripts/workshop.ps1
@@ -1,5 +1,5 @@
param(
- [ValidateSet("bootstrap", "up", "redeploy", "proxy-reload", "down", "logs", "reset", "reset-hard")]
+ [ValidateSet("bootstrap", "up", "redeploy", "proxy-reload", "down", "logs", "reset", "reset-hard", "reset-origin")]
[string]$Action = "bootstrap",
[string]$Distro = ""
)
@@ -26,6 +26,7 @@ switch ($Action) {
"logs" { $linuxCommand = "./scripts/compose.sh logs -f" }
"reset" { $linuxCommand = "./scripts/reset-lab.sh" }
"reset-hard" { $linuxCommand = "./scripts/reset-lab.sh --hard" }
+ "reset-origin" { $linuxCommand = "./scripts/reset-lab.sh --hard-origin" }
}
$wslArgs = @()