From 89ffe1a1fd8d905f91839dc09edd2b07afa83474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Thu, 16 Jan 2025 09:49:55 +0100 Subject: [PATCH] Polish "Document 'base64:' prefix support" Resolution of base64 encoded data to arbitrary resources has been introduced in Spring Boot 3.4. This commit adapts the documentation to restrict this support to SSL only. This commit also polishes the phrasing a bit. See gh-43809 --- .../pages/features/external-config.adoc | 16 ---------------- .../modules/reference/pages/features/ssl.adoc | 10 +++++----- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc index a4f7bedbd54..6b68bd6a4dd 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc @@ -1188,22 +1188,6 @@ Doing so gives a transparent upgrade path while supporting a much richer format. -[[features.external-config.typesafe-configuration-properties.conversion.base64]] -==== Converting Base64 Data - -Spring Boot supports resolving binary data that have been Base64 encoded. -If you expose a `Resource` property, the base64 encoded text can be provided as the value with a `base64:` prefix, as shown in the following example: - -[configprops%novalidate,yaml] ----- -my: - property: base64:SGVsbG8gV29ybGQ= ----- - -NOTE: The `Resource` property can also be used to provide the path to the resource, making it more versatile. - - - [[features.external-config.typesafe-configuration-properties.validation]] === @ConfigurationProperties Validation diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/ssl.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/ssl.adoc index 3b48f470811..94552dfd4c2 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/ssl.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/ssl.adoc @@ -45,8 +45,8 @@ When used to secure a client-side connection, a `truststore` is typically config [TIP] ==== -Rather than the location to a file, the xref:features/external-config.adoc#features.external-config.typesafe-configuration-properties.conversion.base64[Base64 encoded content] of the file can be provided. -If you chose this options, the value should start with `base64:`. +Rather than the location to a file, its Base64 encoded content can be provided. +If you chose this option, the value of the property should start with `base64:`. ==== See javadoc:org.springframework.boot.autoconfigure.ssl.JksSslBundleProperties[] for the full set of supported properties. @@ -90,10 +90,10 @@ When used to secure a client-side connection, a `truststore` is typically config [TIP] ==== -Rather than the location to a file, the xref:features/external-config.adoc#features.external-config.typesafe-configuration-properties.conversion.base64[Base64 encoded content] of the file can be provided. -If you chose this options, the value should start with `base64:`. +Rather than the location to a file, its Base64 encoded content can be provided. +If you chose this option, the value of the property should start with `base64:`. -PEM content can be used directly for both the `certificate` and `private-key` properties. +PEM content can also be used directly for both the `certificate` and `private-key` properties. If the property values contain `BEGIN` and `END` markers then they will be treated as PEM content rather than a resource location. The following example shows how a truststore certificate can be defined: