I am trying to configure a Spring Cloud Config server with the support of Secret Cloud Spring Vault management. I'm relatively new to Spring, but I tried the following instructions and examples: -
http://cloud.spring.io/spring-cloud-vault-config/
Everything works fine if you use standard settings such as http, localhost and 8200 for the storage endpoint and tls_disable = 1 to disable SSL. However, these are not practical settings for a real environment, and there are several examples that can help with this. Can anyone help with a working example?
I have successfully configured TLS-enabled storage. I have successfully configured a configuration server that connects using a self-signed certificate. I can even enter a secret value into the configuration server and open it through @Valueand @PostConstruct.
It all works. However, when I try to use Spring Conig endpoints to access the repository, I get the following: -
{
"timestamp": 1486413850574,
"status": 500,
"error": "Internal Server Error",
"exception": "org.springframework.web.client.ResourceAccessException",
"message": "I/O error on GET request for \"http://127.0.0.1:8200/v1/secret/myapp\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect",
"path": "/myapp/default"
}
The configuration server uses the default values, although I set the overrides to bootstrap.yml.: -
server:
port: 8888
spring:
profiles:
active: vault
spring.cloud.vault:
host: myhost.mydomain.com
port: 8200
scheme: https
authentication: TOKEN
token: 0f1887c3-d8a8-befd-a5a2-01e4e066c50
ssl:
trust-store: configTrustStore.jks
trust-store-password: changeit
As you can see, it should point to myhost.mydomain.com not 127.0.0.1, and it should use https, not http as the protocol scheme.
, , Spring Cloud Vault. Spring Dalsten.M1 Spring Cloud Vault 1.0.0.M1. , . . , .
.