diff --git a/2.0.x/multi/multi__spring_cloud_config_server.html b/2.0.x/multi/multi__spring_cloud_config_server.html index 8b244504..d264133b 100644 --- a/2.0.x/multi/multi__spring_cloud_config_server.html +++ b/2.0.x/multi/multi__spring_cloud_config_server.html @@ -82,9 +82,10 @@ git branch or tag name contains a slash ("/") then the label in the HTTP URL should be specified with the special string "(_)" instead (to avoid ambiguity with other URL paths). For example, if the label is foo/bar, replacing the slash would result in a label that looks like -foo(_)bar. Be careful with the brackets in -the URL if you are using a command line client like curl (e.g. escape -them from the shell with quotes '').

Placeholders in Git URI

Spring Cloud Config Server supports a git repository URL with +foo(_)bar. The inclusion of the special string "(\_)" can also be +applied to the {application} parameter. Be careful with the brackets +in the URL if you are using a command line client like curl (e.g. +escape them from the shell with quotes '').

Placeholders in Git URI

Spring Cloud Config Server supports a git repository URL with placeholders for the {application} and {profile} (and {label} if you need it, but remember that the label is applied as a git label anyway). So you can easily support a "one repo per application" policy @@ -94,7 +95,15 @@ using (for example):

      server:
         git:
           uri: https://github.com/myorg/{application}

or a "one repo per profile" policy using a similar pattern but with -{profile}.

Pattern Matching and Multiple Repositories

There is also support for more complex requirements with pattern +{profile}.

Additionally, using the special string "(\_)" within your +{application} parameters can enable support for multiple +organizations (for example):

spring:
+  cloud:
+    config:
+      server:
+        git:
+          uri: https://github.com/{application}

where {application} is provided at request time in the format +"organization(\_)application".

Pattern Matching and Multiple Repositories

There is also support for more complex requirements with pattern matching on the application and profile name. The pattern format is a comma-separated list of {application}/{profile} names with wildcards (where a pattern beginning with a wildcard may need to be @@ -251,7 +260,7 @@ Example:

69pcVH/4rmLbXdcmNYGm6iu+MlPQk4BUZknHSmVHIFdJ0EPupVaQ8RHT
-                         -----END RSA PRIVATE KEY-----

Table 2.1. SSH Configuration properties

Property NameRemarks

ignoreLocalSshSettings

If true, use property based SSH config instead of file based. Must be set at as spring.cloud.config.server.git.ignoreLocalSshSettings, not inside a repository definition.

privateKey

Valid SSH private key. Must be set if ignoreLocalSshSettings is true and Git URI is SSH format

hostKey

Valid SSH host key. Must be set if hostKeyAlgorithm is also set

hostKeyAlgorithm

One of ssh-dss, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 ,ecdsa-sha2-nistp521. Must be set if hostKey is also set

strictHostKeyChecking

true or false. If false, ignore errors with host key

knownHostsFile

Location of custom .known_hosts file

preferredAuthentications

Override server authentication method order. This should allow evade login prompts if server has keyboard-interactive authentication before publickey method.


Placeholders in Git Search Paths

Spring Cloud Config Server also supports a search path with + -----END RSA PRIVATE KEY-----

Table 2.1. SSH Configuration properties

Property NameRemarks

ignoreLocalSshSettings

If true, use property based SSH config instead of file based. Must be set at as spring.cloud.config.server.git.ignoreLocalSshSettings, not inside a repository definition.

privateKey

Valid SSH private key. Must be set if ignoreLocalSshSettings is true and Git URI is SSH format

hostKey

Valid SSH host key. Must be set if hostKeyAlgorithm is also set

hostKeyAlgorithm

One of ssh-dss, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 ,ecdsa-sha2-nistp521. Must be set if hostKey is also set

strictHostKeyChecking

true or false. If false, ignore errors with host key

knownHostsFile

Location of custom .known_hosts file

preferredAuthentications

Override server authentication method order. This should allow evade login prompts if server has keyboard-interactive authentication before publickey method.


Placeholders in Git Search Paths

Spring Cloud Config Server also supports a search path with placeholders for the {application} and {profile} (and {label} if you need it). Example:

spring:
   cloud:
@@ -522,7 +531,7 @@ the key value with "@" and provide the file path, e.g.

$
 AQAjPgt3eFZQXwt8tsHAVv/QHiY5sI2dRcR+...

The key argument is mandatory (despite having a -- prefix).

2.5 Key Management

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 +548,7 @@ if your config server really is relatively insecure and only a handful of clients need the encrypted properties.

2.6 Creating a Key Store for Testing

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:
+your bootstrap.yml for the Config Server:

encrypt:
   keyStore:
     location: classpath:/server.jks
     password: letmein
diff --git a/2.0.x/single/spring-cloud-config.html b/2.0.x/single/spring-cloud-config.html
index 7b4ec9d1..bc354468 100644
--- a/2.0.x/single/spring-cloud-config.html
+++ b/2.0.x/single/spring-cloud-config.html
@@ -184,9 +184,10 @@ git branch or tag name contains a slash ("/") then the label in the
 HTTP URL should be specified with the special string "(_)" instead (to
 avoid ambiguity with other URL paths).  For example, if the label is
 foo/bar, replacing the slash would result in a label that looks like
-foo(_)bar.  Be careful with the brackets in
-the URL if you are using a command line client like curl (e.g. escape
-them from the shell with quotes '').

Placeholders in Git URI

Spring Cloud Config Server supports a git repository URL with +foo(_)bar. The inclusion of the special string "(\_)" can also be +applied to the {application} parameter. Be careful with the brackets +in the URL if you are using a command line client like curl (e.g. +escape them from the shell with quotes '').

Placeholders in Git URI

Spring Cloud Config Server supports a git repository URL with placeholders for the {application} and {profile} (and {label} if you need it, but remember that the label is applied as a git label anyway). So you can easily support a "one repo per application" policy @@ -196,7 +197,15 @@ using (for example):

      server:
         git:
           uri: https://github.com/myorg/{application}

or a "one repo per profile" policy using a similar pattern but with -{profile}.

Pattern Matching and Multiple Repositories

There is also support for more complex requirements with pattern +{profile}.

Additionally, using the special string "(\_)" within your +{application} parameters can enable support for multiple +organizations (for example):

spring:
+  cloud:
+    config:
+      server:
+        git:
+          uri: https://github.com/{application}

where {application} is provided at request time in the format +"organization(\_)application".

Pattern Matching and Multiple Repositories

There is also support for more complex requirements with pattern matching on the application and profile name. The pattern format is a comma-separated list of {application}/{profile} names with wildcards (where a pattern beginning with a wildcard may need to be @@ -353,7 +362,7 @@ Example:

69pcVH/4rmLbXdcmNYGm6iu+MlPQk4BUZknHSmVHIFdJ0EPupVaQ8RHT
-                         -----END RSA PRIVATE KEY-----

Table 2.1. SSH Configuration properties

Property NameRemarks

ignoreLocalSshSettings

If true, use property based SSH config instead of file based. Must be set at as spring.cloud.config.server.git.ignoreLocalSshSettings, not inside a repository definition.

privateKey

Valid SSH private key. Must be set if ignoreLocalSshSettings is true and Git URI is SSH format

hostKey

Valid SSH host key. Must be set if hostKeyAlgorithm is also set

hostKeyAlgorithm

One of ssh-dss, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 ,ecdsa-sha2-nistp521. Must be set if hostKey is also set

strictHostKeyChecking

true or false. If false, ignore errors with host key

knownHostsFile

Location of custom .known_hosts file

preferredAuthentications

Override server authentication method order. This should allow evade login prompts if server has keyboard-interactive authentication before publickey method.


Placeholders in Git Search Paths

Spring Cloud Config Server also supports a search path with + -----END RSA PRIVATE KEY-----

Table 2.1. SSH Configuration properties

Property NameRemarks

ignoreLocalSshSettings

If true, use property based SSH config instead of file based. Must be set at as spring.cloud.config.server.git.ignoreLocalSshSettings, not inside a repository definition.

privateKey

Valid SSH private key. Must be set if ignoreLocalSshSettings is true and Git URI is SSH format

hostKey

Valid SSH host key. Must be set if hostKeyAlgorithm is also set

hostKeyAlgorithm

One of ssh-dss, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 ,ecdsa-sha2-nistp521. Must be set if hostKey is also set

strictHostKeyChecking

true or false. If false, ignore errors with host key

knownHostsFile

Location of custom .known_hosts file

preferredAuthentications

Override server authentication method order. This should allow evade login prompts if server has keyboard-interactive authentication before publickey method.


Placeholders in Git Search Paths

Spring Cloud Config Server also supports a search path with placeholders for the {application} and {profile} (and {label} if you need it). Example:

spring:
   cloud:
@@ -624,7 +633,7 @@ the key value with "@" and provide the file path, e.g.

$
 AQAjPgt3eFZQXwt8tsHAVv/QHiY5sI2dRcR+...

The key argument is mandatory (despite having a -- prefix).

2.5 Key Management

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 +650,7 @@ if your config server really is relatively insecure and only a handful of clients need the encrypted properties.

2.6 Creating a Key Store for Testing

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:
+your bootstrap.yml for the Config Server:

encrypt:
   keyStore:
     location: classpath:/server.jks
     password: letmein
diff --git a/2.0.x/spring-cloud-config.xml b/2.0.x/spring-cloud-config.xml
index 81ad9740..2bc14886 100644
--- a/2.0.x/spring-cloud-config.xml
+++ b/2.0.x/spring-cloud-config.xml
@@ -277,9 +277,10 @@ git branch or tag name contains a slash ("/") then the label in the
 HTTP URL should be specified with the special string "(_)" instead (to
 avoid ambiguity with other URL paths).  For example, if the label is
 foo/bar, replacing the slash would result in a label that looks like
-foo(_)bar.  Be careful with the brackets in
-the URL if you are using a command line client like curl (e.g. escape
-them from the shell with quotes '').
+foo(_)bar.  The inclusion of the special string "(\_)" can also be
+applied to the {application} parameter. Be careful with the brackets
+in the URL if you are using a command line client like curl (e.g.
+escape them from the shell with quotes '').
 
Placeholders in Git URI Spring Cloud Config Server supports a git repository URL with @@ -295,6 +296,17 @@ using (for example): uri: https://github.com/myorg/{application} or a "one repo per profile" policy using a similar pattern but with {profile}. +Additionally, using the special string "(\_)" within your +{application} parameters can enable support for multiple +organizations (for example): +spring: + cloud: + config: + server: + git: + uri: https://github.com/{application} +where {application} is provided at request time in the format +"organization(\_)application".
Pattern Matching and Multiple Repositories @@ -1016,7 +1028,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 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). @@ -1053,7 +1065,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 letmein Put the server.jks file in the classpath (for instance) and then in -your application.yml for the Config Server: +your bootstrap.yml for the Config Server: encrypt: keyStore: location: classpath:/server.jks