简体   繁体   English

代理服务器上的 SSL 证书与原始服务器上的 SSL 证书

[英]SSL Cert on proxy vs SSL Cert on Origin Server

So I am setting up a reverse-proxy that will be visible from internet.所以我正在设置一个可以从互联网上看到的反向代理。 I will install an intermediate CA signed SSL Cert on the reverse-proxy.我将在反向代理上安装一个中间 CA 签名的 SSL 证书。 The reverse-proxy will terminate the original SSL connection but will do another SSL connection to the origin server over and forward the application traffic.反向代理将终止原始的 SSL 连接,但将通过另一个 SSL 连接到源服务器并转发应用程序流量。

If my domain is acme.com then the SSL Cert on my reverse-proxy will have a cn: acme.com .如果我的域是acme.com ,那么我的反向代理上的 SSL 证书将有一个cn: acme.com My origin server will have a self-signed SSL Cert.我的源服务器将有一个自签名的 SSL 证书。 My question is should I use the same cn: acme.com on the SSL cert installed on the origin server even though it is not directly accessible by end user?我的问题是我应该在源服务器上安装的 SSL 证书上使用相同的cn: acme.com ,即使最终用户无法直接访问它? What are the pros and cons of not using cn: acme.com on the self-signed origin server?在自签名源服务器上不使用cn: acme.com的优缺点是什么?

The subject of the certificate for the internal server does not matter if explicitly trust this specific certificate for example by fingerprint in your reverse proxy (ie not blindly trust everything).如果显式信任此特定证书,例如通过反向代理中的指纹(即不要盲目信任所有内容),则内部服务器证书的主题无关紧要。 But trusting a specific certificate means that you also need to change which certificate you trust if the internal setup changes (ie new certificate).但是信任特定证书意味着如果内部设置发生更改(即新证书),您还需要更改您信任的证书。 This can be especially a problem if you don't fully control the internal setups.如果您不完全控制内部设置,这可能是一个特别严重的问题。

It would scale better if you don't use self-signed certificates but instead certificates issued by an internal CA.如果您不使用自签名证书而是使用内部 CA 颁发的证书,它会更好地扩展。 In this case it is enough to trust the internal CA in your proxy as long as the subject of the certificate matches the domain.在这种情况下,只要证书的主题与域匹配,信任代理中的内部 CA 就足够了。 This makes it possible to change the internal certificate independently from the proxy setup as long the subject still matches the domain and the certificate is still issued by the trusted internal CA.这使得可以独立于代理设置更改内部证书,只要主题仍然与域匹配并且证书仍然由受信任的内部 CA 颁发。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM