Title: starttls should set the ssl info (such as enabled, ssi, etc...) so that downstream filters can use it
Description:
I'm currently using the postgres proxy filter with ssl termination via starttls. This works really well for ssl connections, but I also want to disable cleartext connections. Since postgres connections start in cleartext and upgrade to tls, I can't just use a filter_chain_match for this. It would be really nice to be able to do something like this to confirm that a TLS handshake for "my-database-server" occurred before forwarding any traffic to the database cluster:
But this doesn't work because the starttls filter does not set the server name on the connection. As far as I can tell, it doesn't set any connection state or dynamic metadata based on the connections TLS properties.
Title: starttls should set the ssl info (such as enabled, ssi, etc...) so that downstream filters can use it
Description:
I'm currently using the postgres proxy filter with ssl termination via starttls. This works really well for ssl connections, but I also want to disable cleartext connections. Since postgres connections start in cleartext and upgrade to tls, I can't just use a filter_chain_match for this. It would be really nice to be able to do something like this to confirm that a TLS handshake for "my-database-server" occurred before forwarding any traffic to the database cluster:
But this doesn't work because the starttls filter does not set the server name on the connection. As far as I can tell, it doesn't set any connection state or dynamic metadata based on the connections TLS properties.