Hello team,

Just wanted to reach out with a small issue. SSLBundle is a very cool feature of Spring, if not anything else from this ticket, thanks for that. I think there might be a typo in the doc, especially using the ssl bundle configuration in application properties files.

We can see in the documentation here https://docs.spring.io/spring-boot/reference/features/ssl.html#features.ssl.pem , the certificate is written:

spring.ssl.bundle.pem.mybundle.truststore.certificate=-----BEGIN CERTIFICATE-----
MIID1zCCAr+gAwIBAgIUNM5QQv8IzVQsgSmmdPQNaqyzWs4wDQYJKoZIhvcNAQEL
BQAwezELMAkGA1UEBhMCWFgxEjAQBgNVBAgMCVN0YXRlTmFtZTERMA8GA1UEBwwI
...
V0IJjcmYjEZbTvpjFKznvaFiOUv+8L7jHQ1/Yf+9c3C8gSjdUfv88m17pqYXd+Ds
HEmfmNNjht130UyjNCITmLVXyy5p35vWmdf95U3uEbJSnNVtXH8qRmN9oK9mUpDb
ngX6JBJI7fw7tXoqWSLHNiBODM88fUlQSho8
-----END CERTIFICATE-----

Please see screenshot.

Image

However, this might not be working.

On the other hand, it seems this construct is working.

spring.ssl.bundle.pem.mybundle.truststore.certificate=\
-----BEGIN CERTIFICATE-----\n\
MIID1zCCAr+gAwIBAgIUNM5QQv8IzVQsgSmmdPQNaqyzWs4wDQYJKoZIhvcNAQEL\n\
BQAwezELMAkGA1UEBhMCWFgxEjAQBgNVBAgMCVN0YXRlTmFtZTERMA8GA1UEBwwI\n\
...\n\
V0IJjcmYjEZbTvpjFKznvaFiOUv+8L7jHQ1/Yf+9c3C8gSjdUfv88m17pqYXd+Ds\n\
HEmfmNNjht130UyjNCITmLVXyy5p35vWmdf95U3uEbJSnNVtXH8qRmN9oK9mUpDb\n\
ngX6JBJI7fw7tXoqWSLHNiBODM88fUlQSho8\n\
-----END CERTIFICATE-----\n

I am referring to adding \n, backslash + letter N + backslash to the lines.

Actually, I think someone from the Spring team is recommending to use it this way (with backslash)

https://github.com/spring-projects/spring-boot/issues/40398#issuecomment-2063301189

Would it be possible there is a typo in the doc, and we should add the backslash n in the doc for application properties files?

Thank you

Comment From: wilkinsona

This is due to the switch to Antora as https://github.com/spring-io/spring-asciidoctor-extensions/issues/94 is missing from the JavaScript version of the extensions. I've opened https://github.com/spring-io/asciidoctor-extensions/pull/27. The fix here will be to upgrade to a new version of the extensions.

Comment From: patpatpat123

Thank you both for looking into this