spring-cloud / spring-cloud/spring-cloud-consul

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

Open
#830 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
822
Forks
539
Avg merge
9h 31m
Merged PRs (30d)
7

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the spring.cloud.consul.tls.key-store-password and certificate-password properties reach the Consul Client object, comparing encrypted and plain-password configurations. Reproduce the HTTPS connection failure and verify that encrypted passwords are handled before client creation, with regression coverage for both TLS password properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.