The relationship between the Spring Cloud Config server and the client

Source: Internet
Author: User
Tags decrypt

1. There are two configurable items on the service side

Spring:  Cloud:    config:      server:        encrypt:          enabled:falseencrypt:  key:12312321

1.1 Spring.cloud.config.server.encrypt.enable This configuration represents whether the data is decrypted on the server side and is true by default.

1.2 If set to True and Encrypt.key is configured, the decryption operation can be performed on the server side, and if there is no Encrypt.key the error will be encountered.

1.2.1 also may not error, this depends on whether the server Qidong load the remote configuration file (Spring.cloud.config.server.clone-on-start), if it is loaded when the error.

1.2.2 also may not have configured the boot-loading mechanism, and will wait until the configuration is used to remotely configure the clone operation.

1.3 If it is false, the ciphertext is sent intact to the client, at this time Encrypt.key dispensable, because not on the server side to decrypt the configuration, so it can not be configured.

2, the client has a configuration item

# Configure server address
Spring
Application:
Name:thunisoft-microservice-foo
Cloud
Config
uri:http://localhost:8979/
Profile:dev
Label:master

# Decrypt secret key
Encrypt:  key:12312321

2.1 If the server side is configured with decryption function, when the remote configuration is loaded, the encrypted data is decrypted, the client can do no decryption configuration, can be used directly.

2.2 If the server does not perform the decryption operation, the original encrypted data is returned, then the secret key is configured to decrypt the operation.

The relationship between the Spring Cloud Config server and the client

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.