Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ To create a keystore for testing, you can use a command resembling the following
----
$ keytool -genkeypair -alias mytestkey -keyalg RSA \
-dname "CN=Web Server,OU=Unit,O=Organization,L=City,S=State,C=US" \
-keypass changeme -keystore server.jks -storepass letmein
-keypass changeme -keystore server.jks -storepass letmein -storetype JKS
----

NOTE: When using JDK 11 or above you may get the following warning when using the command above. In this case
you probably want to make sure the `keypass` and `storepass` values match.
NOTE: When using JDK 11 or above, you may get the following warning when using the command above. In this case
you probably want to ensure the `keypass` and `storepass` values match.
----
Warning: Different store and key passwords not supported for PKCS12 KeyStores. Ignoring user-specified -keypass value.
WARNING: Different store and key passwords are not supported for PKCS12 KeyStores. Ignoring user-specified -keypass value.
----

Put the `server.jks` file in the classpath (for instance) and then, in
your `bootstrap.yml`, for the Config Server, create the following settings:
Put the `server.jks` file in the classpath (for instance) and then, in your `application.properties` create the following settings:

[source,yaml]
----
Expand All @@ -28,3 +27,6 @@ encrypt:
secret: changeme
----

TIP: If you want to use `bootstrap.yml` instead of `application.properties`
you must first enable it through `spring.cloud.bootstrap.enabled=true` or include
the dependency (maven, gradle) as `groupId:org.springframework.cloud` and `artifactId:spring-cloud-starter-bootstrap`.