spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Provide information about the source of the trust material in SslBundle's toString()

Open tkrah opened this issue 2 years ago • 3 comments

Hi,

we are using different bundles and the one who does configure them and the one who does operate the app in question are not always the same person. We're logging the used bundle, however we only get this as toString():

[org.springframework.boot.autoconfigure.ssl.PropertiesSslBundle@166e52ca]

Tomcat e.g. does print something like this for the connector config:

Connector [https-openssl-nio-8443], TLS virtual host [_default_], certificate type [UNDEFINED] configured from keystore [/home/app/.keystore] using alias [tomcat] with trust store [null]

It would be nice if a better toString could be done which prints all important configured props of the bundle (without sensitive stuff like passwords etc.), but ciphers, options, aliases, key / trust store path etc. would be nice to have on the configured bundle.

tkrah avatar Jan 08 '24 14:01 tkrah

Hello, I have created a PR for this issue. Please let me know your suggestions for the same.

amparab avatar Jan 15 '24 16:01 amparab

fyi, I'll add my suggestions / questions to the PR.

tkrah avatar Jan 15 '24 17:01 tkrah

I've merged the PR so we now have a toString() with some useful information but without the location from which the material was loaded. We'll keep this issue open to address that in the future.

wilkinsona avatar Jan 17 '24 16:01 wilkinsona