Describe the bug Cannot access a vault backend through http or https proxy, the config-server try to connect directely to vault ignoring the proxy configuration.
spring-boot-starter-parent version : 2.6.0-RC1 spring-cloud.version : 2021.0.0-RC1
Sample Application.properties:
spring.profiles.active: vault spring.cloud.config.server.vault.app-role.role-id: [ROLE_ID] spring.cloud.config.server.vault.app-role.secret-id: SECRET-ID spring.cloud.config.server.vault.host: VAULT_HOST spring.cloud.config.server.vault.scheme: https spring.cloud.config.server.vault.port: 443 spring.cloud.config.server.vault.backend: secret/prod spring.cloud.config.server.vault.authentication: APPROLE spring.cloud.config.server.vault.proxy.https.host: localhost spring.cloud.config.server.vault.proxy.https.port: 3128
Logs : org.springframework.vault.authentication.VaultLoginException: Cannot login using org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://VAULT_HOST:443/v1/auth/approle/login": Connect to VAULT_HOST:443 [VAULT_HOST/VAULT_IP] failed: connect timed out; nested exception is org.apache.http.conn.ConnectTimeoutException: Connect to VAULT_HOST:443 [VAULT_HOST/VAULT_IP] failed: connect timed out
Comment From: enicolas31
Using a similar configuration, I do not see any request in the logs of my proxy.
Going through in command line : curl -x 127.0.0.1:3128 VAULT_HOST
I go through the proxy
Comment From: skortobi
The issue concerned the spring-cloud-vault dependency used for the app role authentication and not directely related to spring cloud config.