Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Cloud Consul not decrypting the tls key-store-password & certificate-password #830

Open
mahesh4mahi opened this issue Sep 14, 2023 · 0 comments

Comments

@mahesh4mahi
Copy link

Describe the bug
We are running consul with https and when spring boot service trying to connect to consul with SSL using tls encrypted key-store-password & certificate-password it is giving error, same is working when we give plain password

spring.cloud.consul.host=localhost
spring.cloud.consul.port=8500
spring.cloud.consul.discovery.hostname=localhost
spring.cloud.consul.scheme=https
spring.cloud.consul.discovery.prefer-ip-address=false
spring.cloud.consul.discovery.scheme=https
spring.cloud.consul.tls.key-store-instance-type=PKCS12
spring.cloud.consul.tls.key-store-password=bdksjfsjfsksbfsabfksbb
spring.cloud.consul.tls.key-store-path=keystore.p12
spring.cloud.consul.tls.certificate-path=truststore.p12
spring.cloud.consul.tls.certificate-password=bdksjfsjfsksbfsabfksbb
spring.cloud.consul.discovery.heartbeat.reregister-service-on-failure=true

Same is working if we provide plain password like below

spring.cloud.consul.tls.key-store-password=Admin@123
spring.cloud.consul.tls.certificate-password=Admin@123

due to security reasons we are not suppose to add plain password in application.properties, kindly provide solution to how we can decrypt this password before Consul Client object is created, thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants