spring-cloud / spring-cloud/spring-cloud-consul
Registering a spring boot application over https in consul
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
I have a spring boot application and using ConsulDiscovery to register with consul. The "http" communication is working as expected but "https" is failing. CA cert I am using is valid and I can see On the consul logs, it is giving "tls bad certificate" error. I have added ca cert in "ca-bundle.crt" on the consul nodes to trust the certificate.
I enabled debug for ssl logs, It seems when the client is trying to authenticate itself, the server requests a certificate from the client but the logs displays that "certificate chain" is coming null. Any views will be appreciated. I have tried configuring ca_path, ca_file and cert_file options in consul configs but nothing works.
Help will be appreciated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Spring Boot ConsulDiscovery HTTPS registration path and reviewing the SSL debug logs mentioned in the report. Check how ca_path, ca_file, cert_file, and ca-bundle.crt are handled, then verify whether the client certificate chain is supplied during authentication; done means HTTPS registration succeeds without the Consul "tls bad certificate" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, distributed-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100