-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Hello.
Not sure if Spring-Cloud-Gateway MVC (SCG) fails or Spring's HttpClient, but after upgrading to SCG 4.3.0 and Spring 3.5.6 I faced this issue.
We have two Web applications (let's name them MyApp1 and MyApp2) configured on the same ApacheHttpServer: there are two virtual hosts configurations on the same IP and 443 port, but with their own certificates. I access one of these applications (MyApp2) via SCG route; certificate stored in truststore, that comes with SCG application. Before version 4.3.0 everything worked fine, but after upgrade of SCG application couldn't connect to MyApp2, because during handshake it receives certificate of application MyApp1 and refuses connection.
Strange thing is if in AppacheHttpServer I place configuration of MyApp2 before configuration of MyApp1, then it works and SCG application gets correct certificate.
I'm not sure, but it looks like in newer version certificate is received by IP:port and it takes a first in a row certificate. In earlier version of SCG (e.g. 4.1.4) it received correct certificate (maybe by domain name).
We solved this issue by re-configuring ApacheServer for MyApp2 on different port. After that SCG receives correct certificate, and handshake ends successfully.
I can't provide a sample, because Apache server and two other web applications are required with SSL configured, but I hope I describe the issue clearly. If not please ask.