<div dir="ltr">Patch: Attached patch adds support for two way SSL authentication using client certificate and key for upstream in http proxy (ngx_http_proxy_module.c)<div><br></div><div>Use Case: </div><div> At my company, we are using two way SSL authentication for communication among all application servers. This is security (NPI/PCI) requirement due to being a financial firm.</div>
<div><br></div><div>Currently we are using Oracle Service Bus (OSB) as a reverse proxy, client authentication and upstream routing which I am planning to replace using nginx. </div><div><br></div><div>In my prototype, I found that nginx doesn't support two way SSL authentication for upstream proxy for which I have provided fix.</div>
<div><br></div><div>Patch details:</div><div><br clear="all"><div><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:14px;line-height:22px">
The logic is as below.</p><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:16px;padding:16px;line-height:1.45;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)">
if proxy_ssl_trusted_certificate is configured and (proxy_ssl_client_certificate or proxy_ssl_client_certificate_key) configured
it logs warning for proxy_ssl_client_certificate or proxy_ssl_client_certificate_key will be ignored.
if proxy_ssl_trusted_certificate is configured then
it use ssl_trusted_certificate for authentication
else if proxy_ssl_client_certificate and proxy_ssl_client_certificate_key configured,
it uses both to do two way authentication
else
logs error as either proxy_ssl_trusted_certificate or (proxy_ssl_client_certificate and proxy_ssl_client_certificate_key) required.
</pre><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:14px;line-height:22px">Added following two new config parameters:</p>
<pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;margin-top:0px;padding:16px;line-height:1.45;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);margin-bottom:0px!important">
proxy_ssl_client_certificate cert.pem;
proxy_ssl_client_certificate_key cert.key;</pre></div><div><br></div><div>Please let me know if you have any questions</div><div><br></div><div>Thanks,</div><div>Rohit Joshi</div>-- <br><font style="color:rgb(128,192,255)" size="1"><span style="font-style:italic">This
e-mail and any attachment is for authorized use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be
copied, disclosed to, retained or used by, any other party. If you are
not an intended recipient then please promptly delete this e-mail and
any attachment and all copies and inform the
sender. Thank you.</span></font>
</div></div>