双层反向代理如何通过无效的SSL证书?

How does a double layer of reverse proxy pass through invalid SSL cert?

我有以下服务器设置:

                 +----------+        +-----------+
                 |          |        |           |
internet ----->  |   Kong   | -----> |  HAProxy  | -----> backend servers
                 |          |        |           |
                 +----------+        +-----------+

现在我发现HAProxy中安装的SSL证书过期了。但是,它在互联网上不可见,因为它们通过 Kong 访问并且 Kong 具有有效的 SSL 证书。直接访问 HAProxy 会出现 SSL certificate problem: certificate has expired 错误。对此有何解释?第一层反向代理的SSL证书如何抑制第二层错误?

How does the first layer of reverse proxy's SSL cert suppress the error on the second layer?

客户端创建到 Kong 的 SSL 连接,并且只会检查来自 Kong 的证书。 Kong 创建一个独立的 SSL 连接到 HAProxy,并且应该检查来自 HAProxy 的证书。然后只有应用程序负载通过 Kong 和 HAProxy 在客户端和服务器之间传递,而不是任何 SSL 相关信息。

How does the first layer of reverse proxy's SSL cert suppress the error on the second layer?

它不压制任何东西。 没有在应用程序级别传递 SSL 错误的机制。 Kong 对来自 HAProxy 的证书的正确验证应该会导致连接关闭,即不会在客户端和服务器之间转发任何应用程序数据。但是如果证书没有被 Kong 正确验证,那么证书错误将不会被注意到并且应用程序数据将在客户端和服务器之间转发。 客户端不会注意到任何东西,因为它只看到 Kong 的证书。