From 07bde80ff55528b3f226c6904e98429ac9e6c8de Mon Sep 17 00:00:00 2001
From: buildmaster
$ AQAjPgt3eFZQXwt8tsHAVv/QHiY5sI2dRcR+...
The key argument is mandatory (despite having a -- prefix).
The Config Server can use a symmetric (shared) key or an asymmetric one (RSA key pair). The asymmetric choice is superior in terms of security, but it is often more convenient to use a symmetric key since -it is just a single property value to configure.
To configure a symmetric key you just need to set encrypt.key to a
+it is just a single property value to configure in the bootstrap.properties.
To configure a symmetric key you just need to set encrypt.key to a
secret String (or use an enviroment variable ENCRYPT_KEY to keep it
out of plain text configuration files).
To configure an asymmetric key you can either set the key as a
PEM-encoded text value (in encrypt.key), or via a keystore (e.g. as
@@ -539,7 +539,7 @@ if your config server really is relatively insecure and only a
handful of clients need the encrypted properties.
To create a keystore for testing you can do something like this:
$ 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
-your application.yml for the Config Server:
encrypt: +yourbootstrap.ymlfor the Config Server:encrypt: keyStore: location: classpath:/server.jks password: letmein diff --git a/single/spring-cloud-config.html b/single/spring-cloud-config.html index cb12d6ba..4e27f485 100644 --- a/single/spring-cloud-config.html +++ b/single/spring-cloud-config.html @@ -624,7 +624,7 @@ the key value with "@" and provide the file path, e.g.$ AQAjPgt3eFZQXwt8tsHAVv/QHiY5sI2dRcR+...The key argument is mandatory (despite having a
--prefix).
The Config Server can use a symmetric (shared) key or an asymmetric one (RSA key pair). The asymmetric choice is superior in terms of security, but it is often more convenient to use a symmetric key since -it is just a single property value to configure.
To configure a symmetric key you just need to set encrypt.key to a
+it is just a single property value to configure in the bootstrap.properties.
To configure a symmetric key you just need to set encrypt.key to a
secret String (or use an enviroment variable ENCRYPT_KEY to keep it
out of plain text configuration files).
To configure an asymmetric key you can either set the key as a
PEM-encoded text value (in encrypt.key), or via a keystore (e.g. as
@@ -641,7 +641,7 @@ if your config server really is relatively insecure and only a
handful of clients need the encrypted properties.
To create a keystore for testing you can do something like this:
$ 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
-your application.yml for the Config Server:
encrypt: +yourbootstrap.ymlfor the Config Server:encrypt: keyStore: location: classpath:/server.jks password: letmein diff --git a/spring-cloud-config.xml b/spring-cloud-config.xml index e22f2139..3cf6f670 100644 --- a/spring-cloud-config.xml +++ b/spring-cloud-config.xml @@ -1016,7 +1016,7 @@ AQAjPgt3eFZQXwt8tsHAVv/QHiY5sI2dRcR+...The Config Server can use a symmetric (shared) key or an asymmetric one (RSA key pair). The asymmetric choice is superior in terms of security, but it is often more convenient to use a symmetric key since -it is just a single property value to configure. +it is just a single property value to configure in thebootstrap.properties .To configure a symmetric key you just need to set @@ -1053,7 +1053,7 @@ handful of clients need the encrypted properties. -dname "CN=Web Server,OU=Unit,O=Organization,L=City,S=State,C=US" \ -keypass changeme -keystore server.jks -storepass letmeinencrypt.key to a secret String (or use an enviroment variableENCRYPT_KEY to keep it out of plain text configuration files).Put the +yourserver.jks file in the classpath (for instance) and then in -yourapplication.yml for the Config Server:bootstrap.yml for the Config Server:encrypt: keyStore: location: classpath:/server.jks