mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
proxy-auth: remove check_proxy / proxy_ip settings
The "Check Proxy" option inspected the forwarded client IP returned by Http::GetClientIp(true), which resolves to HTTP_X_FORWARDED_FOR first and only falls back to REMOTE_ADDR. In any typical reverse-proxy deployment that header carries the end-user's IP, not the proxy's, so the option never actually validated that the request came from the trusted proxy. It only constrained the set of end-user IPs allowed to use SSO, which is not a meaningful guarantee on its own. Drop the option, the paired proxy_ip subnet field, and the ip_in_range helper. Document that access must be gated at the network layer (firewall / docker network / bound interface) and that the upstream proxy must strip any client-supplied value of the configured remote-user header. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
68588287ef
commit
863f719da3
2 changed files with 16 additions and 85 deletions
|
|
@ -19,10 +19,12 @@ The following steps are require in SnappyMail:
|
|||
- Master User is dependent on Dovecot config (see below)
|
||||
- Master User Password is dependent on Dovecot config (see below)
|
||||
- Header Name is dependent on authentication solution. This is the header containing the name of currently logged in user. In case of Authelia, this is "Remote-User".
|
||||
- Check Proxy: Since this plugin partially bypasses authentication, it is important to only allow this access from well-defined hosts. It is highly recommended to activate this option!
|
||||
- When checking for reverse proxy, it is required to set the IP filter to either an IP address or a subnet.
|
||||
- Automatic Login: Automatically logs in the user of user header is present (see below)
|
||||
|
||||
> **Security note**
|
||||
>
|
||||
> This plugin trusts the configured request header as proof of identity. Anyone who can reach the SnappyMail container directly and set that header can log in as any user. You **must** ensure that SnappyMail is only reachable through your reverse proxy / SSO chain (e.g. via the docker network, a firewall, or by binding SnappyMail to a non-public interface) and that the upstream proxy strips any client-supplied value of the header before forwarding. The plugin itself does no source-IP validation — earlier versions had a `check_proxy` option, but it inspected the forwarded client IP (the end user's IP) and therefore did not actually verify that the request came from the proxy. It has been removed; gate access at the network layer instead.
|
||||
|
||||
This concludes the setup of SnappyMail.
|
||||
|
||||
### Dovecot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue