spring-cloud/spring-cloud-gateway

Add support .jks truststore cert file format

Open

#1.756 geöffnet am 3. Juni 2020

Auf GitHub ansehen
 (10 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)Java (3.204 Forks)batch import
help wanted

Repository-Metriken

Stars
 (4.284 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 21h) (18 gemergte PRs in 30 T)

Beschreibung

I have one scenario where I have to use client-truststore.jks file format in our Spring cloud gateway to connect with HttpClient host. But somehow spring cloud gateway doesn't like this cert format and throwing error Could not load CertificateFactory X.509 on startup of application but on other hand when I am using .pem cert file format instead of .jks file it is working fine. So my question here is does Spring cloud gateway only support .pem cert format ? Or do we have some short of way where can we use jks cert format.

Doesn't supporting : client-truststore.jks

spring:
   cloud:
     gateway:
       httpclient:
         connect-timeout: 100000
         response-timeout: 15s
         ssl:
           trustedX509Certificates:
             - client-truststore.jks
           handshake-timeout: 1000000

Do Support : client-truststore.pem

spring:
   cloud:
     gateway:
       httpclient:
         connect-timeout: 100000
         response-timeout: 15s
         ssl:
           trustedX509Certificates:
             - client-truststore.pem
           handshake-timeout: 1000000

Contributor Guide