Behind a load balancer that sends PROXY v2, the server needs listeners that take the client's address from the header, and believe it only from the load balancer. In Kubernetes the chart can't add listeners to a store. The store-wide trusted networks don't fit either: they would make every listener expect a header from the pod network, HTTP included. Spike S6 showed that trusting the node or pod ranges lets anyone forge a client address.
INBUXA_MAIL_PROXY_LISTENERS=smtp=10025,imaps=10993 gives each named mail listener a copy on that port, with the same protocol and TLS. The copy trusts PROXY headers only from INBUXA_MAIL_PROXY_TRUSTED_NETWORKS. The copies aren't stored, and the listeners they copy are unchanged. These are refused: one variable without the other, an unknown listener, a port given twice, and a network wider than /8.
The load balancer has to listen on the standard ports. The server tells internet mail by local port 25, and with PROXY it reads that port from the header's destination. HAProxy on 2525 got the sender refused as an unauthenticated submission.
Tested with the release build on kind (inbuxa-k8s-lab mailin-test.sh):
Mail through an HAProxy that sends PROXY v2 and is the only trusted address shows the client's address in Received, not HAProxy's.
A forged header from an untrusted client isn't believed.
For the chart's mail-in modes (K-C6, inbuxa/inbuxa-charts#6).
Behind a load balancer that sends PROXY v2, the server needs listeners that take the client's address from the header, and believe it only from the load balancer. In Kubernetes the chart can't add listeners to a store. The store-wide trusted networks don't fit either: they would make every listener expect a header from the pod network, HTTP included. Spike S6 showed that trusting the node or pod ranges lets anyone forge a client address.
`INBUXA_MAIL_PROXY_LISTENERS=smtp=10025,imaps=10993` gives each named mail listener a copy on that port, with the same protocol and TLS. The copy trusts PROXY headers only from `INBUXA_MAIL_PROXY_TRUSTED_NETWORKS`. The copies aren't stored, and the listeners they copy are unchanged. These are refused: one variable without the other, an unknown listener, a port given twice, and a network wider than /8.
The load balancer has to listen on the standard ports. The server tells internet mail by local port 25, and with PROXY it reads that port from the header's destination. HAProxy on 2525 got the sender refused as an unauthenticated submission.
Tested with the release build on kind (inbuxa-k8s-lab `mailin-test.sh`):
- Mail through an HAProxy that sends PROXY v2 and is the only trusted address shows the client's address in Received, not HAProxy's.
- A forged header from an untrusted client isn't believed.
- Local mode still gives the client's own address.
Unit tests cover the parsing. Docs: inbuxa/inbuxa.org#174, held for rc.32.
Behind a load balancer that sends PROXY v2, the server needs listeners
that take the client's address from the header, believed from the load
balancer only. In Kubernetes the chart can't add listeners to a store, and
the store-wide trusted networks would make every listener, HTTP included,
expect a header from the pod network.
INBUXA_MAIL_PROXY_LISTENERS=smtp=10025,imaps=10993 gives each named mail
listener a copy on that port, with the same protocol and TLS, that trusts
PROXY headers from INBUXA_MAIL_PROXY_TRUSTED_NETWORKS only. The copies
aren't stored; the listeners they copy are unchanged. Each variable without
the other, an unknown listener, a port given twice and a network wider
than /8 are refused. K-C6.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
For the chart's mail-in modes (K-C6, inbuxa/inbuxa-charts#6).
Behind a load balancer that sends PROXY v2, the server needs listeners that take the client's address from the header, and believe it only from the load balancer. In Kubernetes the chart can't add listeners to a store. The store-wide trusted networks don't fit either: they would make every listener expect a header from the pod network, HTTP included. Spike S6 showed that trusting the node or pod ranges lets anyone forge a client address.
INBUXA_MAIL_PROXY_LISTENERS=smtp=10025,imaps=10993gives each named mail listener a copy on that port, with the same protocol and TLS. The copy trusts PROXY headers only fromINBUXA_MAIL_PROXY_TRUSTED_NETWORKS. The copies aren't stored, and the listeners they copy are unchanged. These are refused: one variable without the other, an unknown listener, a port given twice, and a network wider than /8.The load balancer has to listen on the standard ports. The server tells internet mail by local port 25, and with PROXY it reads that port from the header's destination. HAProxy on 2525 got the sender refused as an unauthenticated submission.
Tested with the release build on kind (inbuxa-k8s-lab
mailin-test.sh):Unit tests cover the parsing. Docs: inbuxa/inbuxa.org#174, held for rc.32.