Sensible defaults for Styx backend TLS settings.
The problem
Enabling TLS for backend services doesn't work out of the box. Styx insist that trust store is specified (tlsSetings.trustStorePath), even if it would not be used. This is quite burdensome as an empty trust store must be created just for the sake of establishing a TLS connection to backends.
Detailed description
Styx should be more in line with default Java behaviour as described in JSSE Reference Guide:
-
When
trustStorePathis absent, Styx should use a trust store specified byjavax.net.ssl.trustStoresystem property. -
When
trustStorePathis absent, andjavax.net.ssl.trustStoreis not set, then use the default system truststore. This would be, for JDK provider,$JAVA_HOME/lib/security/jssecacerts, or$JAVA_HOME/lib/security/cacerts.
Acceptance criteria
- Styx will start up with the following
tlsSettingsconfiguration, and either use the truststore configured viajavax.net.ssl.trustStoresystem property, or alternatively revert to default keystore.
- id: "tls11"
path: "/v11"
tlsSettings:
trustAllCerts: true
sslProvider: OPENSSL # Also supports JDK
origins:
- { id: "app1", host: "mybackend:443" }