Route Auth vs. Basic Auth
🔒 Sicherheit
·
Updated vor 1 Monat
Vergleichstabelle
| Eigenschaft | Keine Auth | Basic Auth | Route Auth |
|---|---|---|---|
| Sicherheitsstufe | Keine | Mittel | Hoch |
| Login-UI | Keine | Browser-Dialog | Eigene Login-Seite |
| Passwort-Speicherung | — | bcrypt | bcrypt |
| 2FA möglich | Nein | Nein | Ja |
| Session/Logout | — | Nein/Nein | Ja/Ja |
| API-kompatibel | Ja | Ja (curl -u) |
Nein (Cookie-basiert) |
| Custom Branding | — | Nein | Ja |
| Accounts pro Route | — | 1 | 1 |
| Email nötig | Nein | Nein | Ja (für Email-Methoden) |
| SMTP nötig | Nein | Nein | Nur für Email Code |
| Funktioniert mit L4 | — | Nein | Nein |
Einrichtung
Basic Auth über die UI
- Route erstellen oder bearbeiten
- Auth Type: Basic Auth auswählen
- Username und Passwort eingeben
- Speichern
Route Auth über die UI
- Route erstellen oder bearbeiten
- Auth Type: Route Auth auswählen
- Methode wählen (Email & Password, Email & Code, TOTP)
- Optional: 2FA aktivieren und zweiten Faktor wählen
- Email und ggf. Passwort eingeben
- Speichern
- Für TOTP: Route erneut öffnen und QR-Code scannen
Über die API
# Basic Auth aktivieren
curl -X PUT https://gatecontrol.example.com/api/v1/routes/1 \
-H "Authorization: Bearer gc_..." \
-H "Content-Type: application/json" \
-d '{
"basic_auth_enabled": true,
"basic_auth_user": "admin",
"basic_auth_password": "my-secure-password"
}'
# Route Auth aktivieren (Email & Password)
curl -X PUT https://gatecontrol.example.com/api/v1/routes/1 \
-H "Authorization: Bearer gc_..." \
-H "Content-Type: application/json" \
-d '{
"auth_type": "route",
"route_auth_method": "email_password",
"route_auth_email": "admin@example.com",
"route_auth_password": "my-secure-password"
}'