A setup for a private server with dynamic IP / reverse proxy, and SSO with Authentik or OpenID (OIDC)
An extensive conversation with ChatGPT results in the following setup:
- Reverse Proxy: Traefik (streamlined configuration in
traefik.yml
which can be referenced by eachdocker-compose.yml
) - SSL: Letsencrypt in Traefik
- Authentication:
- via traefik-forward-auth
- Synology SSO Server as OpenID Provider
Criterion | Vouch Proxy | oauth2-proxy |
---|---|---|
Complexity | Simpler, fewer options | More configuration options but more complex |
OpenID Support | Excellent, focused directly on OpenID Connect | Supports OIDC but has a broader focus |
Resource Consumption | Lower (minimalist approach) | - Higher (comprehensive feature set) - one oauth2-proxy container per OAuth2/OpenID Provider |
Flexibility | Good, but limited in very complex scenarios | Excellent, suitable for many scenarios |
Community and Support | Smaller community | Larger community, better documentation |
Both Vouch and oauth2-proxy require more or less extensive configuration in the Nginx proxy host advanced settings which can be prone to inconsistencies. | ||
Further alternatives considered: |
- Caddy
For setting up the SSO Server in Synology DSM, see Synology's KB - SSO Server or, as an example, How do I use Synology SSO Server to set up OIDC SSO for DSM?.
For setting up Synology as an OP in Authentik, refer to the Authentik Documentation or:
- Login and switch to the administration interface.
- Go to Directory > Federation & Social Login.
- Create a new authentication source of type OpenID OAuth with, e.g., the following parameters:
- Name:
DSM
- Slug:
dsm
- Enabled:
true
- User Matching Mode:
Link to a user with identical email address
orLink to a user with identical username
(slightly less secure because of missing e-mail verification option)
- Group Matching Mode:
Link to a group with identical name
or as required - User Path:
goauthentik.io/sources/%(slug)s
- Protocol Settings
- Consumer key/secret: The client ID/secret from Synology's SSO application
- Scopes: Leave empty unless required
- URL Settings: Filled automatically once saved
- Flow Settings: Leave as is
- Name:
See Federated and Social Sources.
Here's some more info: https://geekscircuit.com/set-up-authentik-sso-with-nginx-proxy-manager/#create-new-provider
For now, domain level forward authentication in Authentik doesn't seem to work as expected12.
- https://www.reddit.com/r/navidrome/comments/r8834t/reverse_proxy_authentication_with_authentik/
- https://www.reddit.com/r/navidrome/comments/oa8gkz/guide_how_to_use_a_sso_solution_in_front_of/
- https://github.com/vouch/vouch-proxy