spring-cloud / spring-cloud/spring-cloud-consul
Spring Boot App - Consul Discovery - Secure=true not working
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
Hello,
We have migrated a spring boot app from
springBootVersion = '2.3.2.RELEASE' -> '2.5.2'
springCloudVersion = 'Hoxton.SR6' -> '2020.0.3' (spring-cloud-consul = 3.0.3)
Our consul discovery properties have not changed but the secure=true field is not showing up in Consul anymore. Our service is working over HTTPs but the discovery is not properly registering the service as HTTPs with secure=true. The only things that have changed are the apps spring boot and cloud version, reverting back makes it work again.
I also tried Spring boot version 2.4.6 and a variety of 2020.0.x versions, all producing same issue.
Consul server is version 1.3.0
build.gradle Spring dependencies
'org.springframework.boot:spring-boot-starter-webflux',
'org.springframework.boot:spring-boot-starter-tomcat',
'org.springframework.boot:spring-boot-starter-data-jpa',
"org.springframework.boot:spring-boot-starter-oauth2-client",
'org.springframework.boot:spring-boot-starter-mail',
'org.springframework.boot:spring-boot-starter-actuator',
'org.springframework.boot:spring-boot-starter-security',
'org.springframework.cloud:spring-cloud-starter-sleuth',
'org.springframework.cloud:spring-cloud-starter-bootstrap',
'org.springframework.cloud:spring-cloud-starter-consul-all',
bootstrap.yml (we are using old bootstrap support)
spring:
cloud:
consul:
discovery:
scheme: https
health-check-path: /actuator/health
health-check-tls-skip-verify: true
health-check-interval: 30s
fail-fast: true
queryPassing: true
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 reproducing the registration using the listed build.gradle dependencies and bootstrap.yml settings, comparing Spring Boot 2.3.2/Hoxton.SR6 with the newer versions. Check the Consul service registration and confirm that the HTTPS scheme results in secure=true being reported again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100