diff --git a/subprojects/docs/src/docs/userguide/running-builds/configuration_cache.adoc b/subprojects/docs/src/docs/userguide/running-builds/configuration_cache.adoc index f9bb92d78b4b..b35686911cfd 100644 --- a/subprojects/docs/src/docs/userguide/running-builds/configuration_cache.adoc +++ b/subprojects/docs/src/docs/userguide/running-builds/configuration_cache.adoc @@ -956,21 +956,27 @@ include::sample[dir="snippets/valueProviders/fileContentsDo/kotlin",files="build In general, you should avoid reading files at configuration time, to avoid invalidating configuration cache entries when the file content changes. Instead, you can connect the `Provider` returned by link:{javadocPath}/org/gradle/api/provider/ProviderFactory.html#fileContents-org.gradle.api.file.RegularFile-[providers.fileContents()] to task properties. -[[config_cache:requirements:safe_credentials]] - -=== Safe credentials - -For security reasons, the configuration cache does not store credentials declared inline. - -To use credentials in build scripts with the configuration cache, declare credentials with Gradle Properties. To learn more about using credentials with Gradle Properties, check out the example in the -<>. - [[config_cache:not_yet_implemented]] == Not yet implemented Support for using configuration caching with certain Gradle features is not yet implemented. Support for these features will be added in later Gradle releases. +[[config_cache:not_yet_implemented:secrets]] +=== Handling of credentials and secrets + +The configuration cache has currently no option to hide secrets that are used as inputs. +It means that they end up in the serialized configuration cache entry. + +This means that you should: + +* Either secure access to configuration cache entries that may contain secrets +* Or leverage `<>/gradle.properties` for storing secrets. +The content of that file is not part of the configuration cache, only its fingerprint. +If you store secrets in that file, care must be taken to protect access to the file content. + +See link:{gradle-issues}22618[gradle/gradle#22618]. + [[config_cache:not_yet_implemented:sharing]] === Sharing the configuration cache