-
Notifications
You must be signed in to change notification settings - Fork 41.7k
Description
Spring Boot: 3.5.7
When using Spring Boot's embedded Tomcat with SSL enabled, the SSL certificate keystore file path is logged during startup and hot reload. However, the logged keystore path does not reflect the actual file path configured by Spring Boot.
By default, embedded Tomcat initializes the SSL keystore file path to ${user.home}/.keystore, and although Spring Boot’s SslConnectorCustomizer correctly configures the SSLHostConfigCertificate from the SSLHostConfig, the method SslConnectorCustomizer#applySslBundle still does not configure certificateKeystoreFile property.
This leads to misleading log output like:
Connector [https-jsse-nio-8990], TLS virtual host [_default_], certificate type [UNDEFINED] configured from keystore [/home/app/.keystore] using alias [tomcat] with trust store [/home/app/cacerts]
even when the actual keystore is loaded from class path (e.g. classpath:server.jks) or file location (e.g. file:server.jks).
Expected Behavior
The logged keystore file path should reflect the actual resolved path (or resource location) used to load the certificate. If the keystore is loaded from the classpath or a configured absolute/relative path, that should be reflected accurately in the logs.
Impact
This issue does not affect functionality — SSL works correctly when configured. However, it causes confusion during troubleshooting and monitoring because the logged information is inaccurate.