【发布时间】:2016-04-08 19:31:27
【问题描述】:
我正在尝试在代理路径的每一层建立 TLS。我看到的是 Nginx 允许上游拥有自签名证书。将流量传递到上游时,是否有任何方法可以锁定接受的权限?
end-user --1--> nginx01 --2--> nginx02 --N--> nginxN
nginx01 具有受信任的证书,最终用户可以毫无问题地连接。 nginx02 有一个自签名证书,当我 proxy_pass 到 https://nginx02 时,我在最终用户浏览器或 nginx01 日志中看不到任何投诉。我希望被拒绝。 如果我按预期从 nginx01 卷曲 nginx02,我会收到 ssl 拒绝。
有没有办法强制 nginx01 验证 nginx02 证书?
CentOS 7 运行 nginx 1.6.3-8。
/etc/hosts
10.21.10.99 upstream.example.com
curl https://upstream.example.com
# ssl rejection
curl https://upstream.example.com --cacert ./upstream.example.com.crt
# works fine (200)
# nginx configuration
server {
listen 443;
ssl on;
ssl_certificate /etc/nginx/security/full_chain.crt;
ssl_certificate_key /etc/nginx/security/ingress.example.com.key;
server_name ingress.example.com;
location / {
proxy_pass https://upstream.example.com;
}
}
【问题讨论】: