Commit 78ea468
* Add OIDC/SSO authentication support
Implements OpenID Connect (OIDC) Single Sign-On authentication
to address issue #512.
Features:
- OIDC authentication via ASP.NET Core middleware
- Support for multiple IdPs (Entra ID, Okta, Auth0, etc.)
- Automatic user provisioning with configurable group mappings
- HttpOnly cookie-based session management
- Rate limiting for provisioning attempts
- Comprehensive environment variable configuration
- Docker secrets support for sensitive values
- Security headers (CSP, HSTS, X-Frame-Options, etc.)
- Backward compatible with existing local authentication
Security:
- JWT signature validation via OIDC discovery
- Cryptographically secure cookie secrets (32-byte)
- SameSite=Lax cookie protection
- No secrets in frontend bundles
- Proper error handling without information leakage
Documentation:
- Added SSO configuration to DockerEnvironmentVariables.md
- Includes examples for major IdP providers
- Environment variable reference with _FILE variants
Closes #512
* Fix HttpOnly cookie logout and token handling
* Add OIDC/SSO authentication with full backward compatibility
Addresses feedback from PR review:
- Restored MapGetAndPost for all endpoints to support existing GET integrations
- Login API now returns tokens by default, preserving compatibility for generic clients
- Added cookie_auth opt-in parameter for Web GUI to use secure HttpOnly cookies
- Added #region SSO markers to isolate SSO-related code
- Enhanced OIDC claim extraction with fallbacks for Azure AD/Entra ID
- SSO users blocked from standard login form (must use OIDC flow)
- Reduced HSTS lifetime from 1 year to 24 hours (homelab-friendly)
- Added security warnings for client secret storage (code, docs, UI)
- Added environment vars to configure rate limiting for SSO
This commit ensures the SSO implementation adds new functionality
without modifying existing API behavior.
---------
Co-authored-by: Xadmin <xadmin@dontfail.us>
1 parent 7f7ce26 commit 78ea468
File tree
10 files changed
+1454
-48
lines changed- DnsServerCore
- Auth
- www
- js
10 files changed
+1454
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
843 | 846 | | |
844 | 847 | | |
845 | 848 | | |
| |||
869 | 872 | | |
870 | 873 | | |
871 | 874 | | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
872 | 890 | | |
873 | 891 | | |
874 | 892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
| |||
259 | 267 | | |
260 | 268 | | |
261 | 269 | | |
262 | | - | |
| 270 | + | |
263 | 271 | | |
264 | 272 | | |
265 | 273 | | |
| |||
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
| 285 | + | |
277 | 286 | | |
278 | 287 | | |
279 | 288 | | |
| |||
417 | 426 | | |
418 | 427 | | |
419 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
420 | 435 | | |
421 | 436 | | |
422 | 437 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
0 commit comments