Skip to content

Commit 89e050d

Browse files
committed
Document security risks of DevTools' remote support more clearly
Previously, the security risks and our recommendations on how to mitigate them were not documented as clearly as they could have been. This commit makes some changes to try to address this: 1. The security risk is now noted at the beginning of the section 2. The recommendation to use SSL is now documented more prominently and an alternative recommendation to only use remote support on a trusted network has been added. 3. The example secret has been removed to prevent copy and paste 4. A recommendation to use a secret that is unique and strong has been added Closes gh-18825
1 parent c780105 commit 89e050d

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,11 @@ NOTE: Profiles activated in `.spring-boot-devtools.properties` will not affect t
912912
=== Remote Applications
913913
The Spring Boot developer tools are not limited to local development.
914914
You can also use several features when running applications remotely.
915-
Remote support is opt-in.
915+
Remote support is opt-in as enabling it can be a security risk.
916+
It should only be enabled when running on a trusted network or when secured with SSL.
917+
If neither of these options is available to you, you should not use DevTools' remote support.
918+
You should never enable support on a production deployment.
919+
916920
To enable it, you need to make sure that `devtools` is included in the repackaged archive, as shown in the following listing:
917921

918922
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
@@ -930,15 +934,8 @@ To enable it, you need to make sure that `devtools` is included in the repackage
930934
</build>
931935
----
932936

933-
Then you need to set a `spring.devtools.remote.secret` property, as shown in the following example:
934-
935-
[source,properties,indent=0]
936-
----
937-
spring.devtools.remote.secret=mysecret
938-
----
939-
940-
WARNING: Enabling `spring-boot-devtools` on a remote application is a security risk.
941-
You should never enable support on a production deployment.
937+
Then you need to set the `spring.devtools.remote.secret` property.
938+
Like any important password or secret, the value should be unique and strong such that it cannot be guessed or brute-forced.
942939

943940
Remote devtools support is provided in two parts: a server-side endpoint that accepts connections and a client application that you run in your IDE.
944941
The server component is automatically enabled when the `spring.devtools.remote.secret` property is set.

0 commit comments

Comments
 (0)