diff --git a/multi/multi__embedding_the_config_server.html b/multi/multi__embedding_the_config_server.html
index df3e2f32..79f6f8b5 100644
--- a/multi/multi__embedding_the_config_server.html
+++ b/multi/multi__embedding_the_config_server.html
@@ -7,7 +7,7 @@ An optional property named spring.cloud.config.server.boot
It is a flag to indicate whether the server should configure itself from its own remote repository.
By default, the flag is off, because it can delay startup.
However, when embedded in another application, it makes sense to initialize the same way as any other application.
-When setting spring.cloud.config.server.bootstrap to true you must also use a composite environment repository configuration.
+When setting spring.cloud.config.server.bootstrap to true you must also use a composite environment repository configuration.
For example
spring: application: name: configserver diff --git a/multi/multi__spring_cloud_config_server.html b/multi/multi__spring_cloud_config_server.html index 28329983..33e77738 100644 --- a/multi/multi__spring_cloud_config_server.html +++ b/multi/multi__spring_cloud_config_server.html @@ -296,7 +296,7 @@ secret/myApp secret/application,dev secret/application
Properties written to secret/application are available to all applications using the Config Server.
An application with the name, myApp, would have any properties written to secret/myApp and secret/application available to it.
-When myApp has the dev profile enabled, properties written to all of the above paths would be available to it, with properties in the first path in the list taking priority over the others.
The configuration server can access a Git or Vault backend through an HTTP or HTTPS proxy. This behavior is controlled for either Git or Vault by settings under proxy.http and proxy.https. These settings are per repository, so if you are using a composite environment repository you must configure proxy settings for each backend in the composite individually. If using a network which requires separate proxy servers for HTTP and HTTPS URLs, you can configure both the HTTP and the HTTPS proxy settings for a single backend.
The following table describes the proxy configuration properties for both HTTP and HTTPS proxies. All of these properties must be prefixed by proxy.http or proxy.https.
Table 2.2. Proxy Configuration Properties
| Property Name | Remarks |
|---|---|
host | The host of the proxy. |
port | The port with which to access the proxy. |
nonProxyHosts | Any hosts which the configuration server should access outside the proxy. If values are provided for both |
username | The username with which to authenticate to the proxy. If values are provided for both |
password | The password with which to authenticate to the proxy. If values are provided for both |
The following configuration uses an HTTPS proxy to access a Git repository.
spring: +WhenmyApphas thedevprofile enabled, properties written to all of the above paths would be available to it, with properties in the first path in the list taking priority over the others.
The configuration server can access a Git or Vault backend through an HTTP or HTTPS proxy. This behavior is controlled for either Git or Vault by settings under proxy.http and proxy.https. These settings are per repository, so if you are using a composite environment repository you must configure proxy settings for each backend in the composite individually. If using a network which requires separate proxy servers for HTTP and HTTPS URLs, you can configure both the HTTP and the HTTPS proxy settings for a single backend.
The following table describes the proxy configuration properties for both HTTP and HTTPS proxies. All of these properties must be prefixed by proxy.http or proxy.https.
Table 2.2. Proxy Configuration Properties
| Property Name | Remarks |
|---|---|
host | The host of the proxy. |
port | The port with which to access the proxy. |
nonProxyHosts | Any hosts which the configuration server should access outside the proxy. If values are provided for both |
username | The username with which to authenticate to the proxy. If values are provided for both |
password | The password with which to authenticate to the proxy. If values are provided for both |
The following configuration uses an HTTPS proxy to access a Git repository.
spring: profiles: active: git cloud: @@ -318,7 +318,61 @@ For example, if you run the following Vault command, all applications using the You can enable this feature by addingspring-jdbcto the classpath and using thejdbcprofile or by adding a bean of typeJdbcEnvironmentRepository. If you include the right dependencies on the classpath (see the user guide for more details on that), Spring Boot configures a data source.The database needs to have a table called
PROPERTIESwith columns calledAPPLICATION,PROFILE, andLABEL(with the usualEnvironmentmeaning), plusKEYandVALUEfor the key and value pairs inPropertiesstyle. All fields are of type String in Java, so you can make themVARCHARof whatever length you need. -Property values behave in the same way as they would if they came from Spring Boot properties files named{application}-{profile}.properties, including all the encryption and decryption, which will be applied as post-processing steps (that is, not in the repository implementation directly).
In some scenarios, you may wish to pull configuration data from multiple environment repositories.
+Property values behave in the same way as they would if they came from Spring Boot properties files named {application}-{profile}.properties, including all the encryption and decryption, which will be applied as post-processing steps (that is, not in the repository implementation directly).
Spring Cloud Config Server supports CredHub as a backend for configuration properties. +You can enable this feature by adding a dependency to Spring CredHub.
pom.xml. +
<dependencies> + <dependency> + <groupId>org.springframework.credhub</groupId> + <artifactId>spring-credhub-starter</artifactId> + </dependency> +</dependencies>
+
The following configuration uses mutual TLS to access a CredHub:
spring: + profiles: + active: credhub + cloud: + config: + server: + credhub: + url: https://credhub:8844
The properties should be stored as JSON, such as:
credhub set --name "/demo-app/default/master/toggles" --type=json
+value: {"toggle.button": "blue", "toggle.link": "red"}credhub set --name "/demo-app/default/master/abs" --type=json
+value: {"marketing.enabled": true, "external.enabled": false}All client applications with the name spring.cloud.config.name=demo-app will have the following properties available to them:
{
+ toggle.button: "blue",
+ toggle.link: "red",
+ marketing.enabled: true,
+ external.enabled: false
+}![]() | Note |
|---|---|
When no profile is specified |
You can authenticate with OAuth 2.0 using UAA as a provider.
pom.xml. +
<dependencies> + <dependency> + <groupId>org.springframework.security</groupId> + <artifactId>spring-security-config</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.security</groupId> + <artifactId>spring-security-oauth2-client</artifactId> + </dependency> +</dependencies>
+
The following configuration uses OAuth 2.0 and UAA to access a CredHub:
spring: + profiles: + active: credhub + cloud: + config: + server: + credhub: + url: https://credhub:8844 + oauth2: + registration-id: credhub-client + security: + oauth2: + client: + registration: + credhub-client: + provider: uaa + client-id: credhub_config_server + client-secret: asecret + authorization-grant-type: client_credentials + provider: + uaa: + token-uri: https://uaa:8443/oauth/token
![]() | Note |
|---|---|
The used UAA client-id should have |
In some scenarios, you may wish to pull configuration data from multiple environment repositories.
To do so, you can enable the composite profile in your configuration server’s application properties or YAML file.
If, for example, you want to pull configuration data from a Subversion repository as well as two Git repositories, you can set the following properties for your configuration server:
spring: profiles: @@ -357,7 +411,7 @@ The priority order of a repository helps resolve any potential conflicts between If you have an environment similar to those in the preceding examples and you request configuration data with themasterlabel but the Subversion repository does not contain a branch calledmaster, the entire request fails.
In addition to using one of the environment repositories from Spring Cloud, you can also provide your own EnvironmentRepository bean to be included as part of a composite environment.
To do so, your bean must implement the EnvironmentRepository interface.
If you want to control the priority of your custom EnvironmentRepository within the composite environment, you should also implement the Ordered interface and override the getOrdered method.
-If you do not implement the Ordered interface, your EnvironmentRepository is given the lowest priority.
The Config Server has an “overrides” feature that lets the operator provide configuration properties to all applications.
+If you do not implement the Ordered interface, your EnvironmentRepository is given the lowest priority.
The Config Server has an “overrides” feature that lets the operator provide configuration properties to all applications.
The overridden properties cannot be accidentally changed by the application with the normal Spring Boot hooks.
To declare overrides, add a map of name-value pairs to spring.cloud.config.server.overrides, as shown in the following example:
spring: cloud: diff --git a/multi/multi_spring-cloud-config.html b/multi/multi_spring-cloud-config.html index 7cf033d5..07cdc681 100644 --- a/multi/multi_spring-cloud-config.html +++ b/multi/multi_spring-cloud-config.html @@ -1,3 +1,3 @@ -Spring Cloud Config \ No newline at end of file +Table of Contents
- 1. Quick Start
- 2. Spring Cloud Config Server
- 2.1. Environment Repository
- 2.1.1. Git Backend
- Skipping SSL Certificate Validation
- Setting HTTP Connection Timeout
- Placeholders in Git URI
- Pattern Matching and Multiple Repositories
- Authentication
- Authentication with AWS CodeCommit
- Git SSH configuration using properties
- Placeholders in Git Search Paths
- Force pull in Git Repositories
- Deleting untracked branches in Git Repositories
- Git Refresh Rate
- 2.1.2. Version Control Backend Filesystem Use
- 2.1.3. File System Backend
- 2.1.4. Vault Backend
- 2.1.5. Accessing Backends Through a Proxy
- 2.1.6. Sharing Configuration With All Applications
- 2.1.7. JDBC Backend
- 2.1.8. Composite Environment Repositories
- 2.1.9. Property Overrides
- 2.2. Health Indicator
- 2.3. Security
- 2.4. Encryption and Decryption
- 2.5. Key Management
- 2.6. Creating a Key Store for Testing
- 2.7. Using Multiple Keys and Key Rotation
- 2.8. Serving Encrypted Properties
- 3. Serving Alternative Formats
- 4. Serving Plain Text
- 5. Embedding the Config Server
- 6. Push Notifications and Spring Cloud Bus
- 7. Spring Cloud Config Client
Spring Cloud Config Table of Contents
- 1. Quick Start
- 2. Spring Cloud Config Server
- 2.1. Environment Repository
- 2.1.1. Git Backend
- Skipping SSL Certificate Validation
- Setting HTTP Connection Timeout
- Placeholders in Git URI
- Pattern Matching and Multiple Repositories
- Authentication
- Authentication with AWS CodeCommit
- Git SSH configuration using properties
- Placeholders in Git Search Paths
- Force pull in Git Repositories
- Deleting untracked branches in Git Repositories
- Git Refresh Rate
- 2.1.2. Version Control Backend Filesystem Use
- 2.1.3. File System Backend
- 2.1.4. Vault Backend
- 2.1.5. Accessing Backends Through a Proxy
- 2.1.6. Sharing Configuration With All Applications
- 2.1.7. JDBC Backend
- 2.1.8. CredHub Backend
- 2.1.9. Composite Environment Repositories
- 2.1.10. Property Overrides
- 2.2. Health Indicator
- 2.3. Security
- 2.4. Encryption and Decryption
- 2.5. Key Management
- 2.6. Creating a Key Store for Testing
- 2.7. Using Multiple Keys and Key Rotation
- 2.8. Serving Encrypted Properties
- 3. Serving Alternative Formats
- 4. Serving Plain Text
- 5. Embedding the Config Server
- 6. Push Notifications and Spring Cloud Bus
- 7. Spring Cloud Config Client