spring-cloud / spring-cloud/spring-cloud-gateway

Property use-insecure-trust-manager not working on spring cloud gateway MVC

Open
#3,423 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement in: server-webmvc status: pending-design-work
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

The bug
Adding the property spring.cloud.gateway.httpclient.ssl.use-insecure-trust-manager and set the value to true still generates the error:
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Sample
routes.yaml

spring: cloud: gateway: httpclient: ssl: use-insecure-trust-manager: true mvc: routes: - id: certificate uri: https://untrusted-root.badssl.com predicates: - Path= /http/** filters: - RewritePath= /http/?(?<segment>/.*), /$\{segment}

application.properties

`
spring.application.name=demo
spring.config.import=./routes.yaml
spring.cloud.gateway.httpclient.ssl.use-insecure-trust-manager=true

`

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 running the sample with routes.yaml and application.properties against https://untrusted-root.badssl.com, confirming that the configured trust-manager property still produces the reported SSLHandshakeException. Trace the Spring Cloud Gateway MVC HTTPS route and compare the configured property with the client path it uses; done means the sample route succeeds with the property enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend, networking, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.