From 4e75aecd6f2f0a15032a533d4967029ef1ce64d1 Mon Sep 17 00:00:00 2001
From: buildmaster
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
Put the server.jks file in the classpath (for instance) and then, in
+ -keypass changeme -keystore server.jks -storepass letmein
![]() | 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 |
Warning: Different store and key passwords 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:
encrypt: keyStore: location: classpath:/server.jks diff --git a/2.1.x/single/spring-cloud-config.html b/2.1.x/single/spring-cloud-config.html index dd50dd48..2c9f030f 100644 --- a/2.1.x/single/spring-cloud-config.html +++ b/2.1.x/single/spring-cloud-config.html @@ -552,7 +552,8 @@ In practice, you might not want to do decrypt locally, because it spreads the ke concentrating it in the server. On the other hand, it can be a useful option if your config server is relatively insecure and only a handful of clients need the encrypted properties.
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
Put the server.jks file in the classpath (for instance) and then, in
+ -keypass changeme -keystore server.jks -storepass letmein
![]() | 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 |
Warning: Different store and key passwords 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:
encrypt: keyStore: location: classpath:/server.jks diff --git a/2.1.x/spring-cloud-config.xml b/2.1.x/spring-cloud-config.xml index 6a259de4..3d6be02c 100644 --- a/2.1.x/spring-cloud-config.xml +++ b/2.1.x/spring-cloud-config.xml @@ -1140,6 +1140,11 @@ On the other hand, it can be a useful option if your config server is relatively$ 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 ++ +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 andstorepass values match.Warning: Different store and key passwords not supported for PKCS12 KeyStores. Ignoring user-specified -keypass value. Put the server.jks file in the classpath (for instance) and then, in yourbootstrap.yml , for the Config Server, create the following settings:encrypt: