1

I'm looking for an helping hand with my https nginx setup. I require my application to be exposed through an nginx frontend, offloading TLS. Easy !
The thing is, I need to have Certificate-based client authentication, and my application cannot be advertising a list of CAs it accepts as it will disclose information about my clients.

As a result I am building up a solution based on the optional_no_ca parameter of nginx.

Sadly, this workflow is not discussed on the TLS RFC, and I'm willing to confirm that the CertificateVerify is still part of the verifications done by Nginx/OpenSSL .

I'm willing to do my authentication in 2 phases :
1- ClientCertificate & TLS validation - On Nginx ( to avoid replay and certificate forgery )
2- Certificate validity, CAs and CN validation on Application.

This can only be secure if the CertificateVerify is done properly on Nginx side, as it will be impossible for my application to do it, since it's not terminating TLS itself ( and cannot ).

Would anyone have confirmations ? Or ideas on how to test this without falling down to scappy ?

2

... this workflow is not discussed on the TLS RFC

The details of the certificate validation are not part of the TLS standard. Part of TLS is only if a certificate gets requested or not.

Apart from that your use can can actually be implemented by nginx. According to the documentation if ssl_client_certificate is set it will be used to a) provide the client with a list of accepted CA and b) verify the client certificate against these CA's. If instead ssl_client_certificate is kept undefined (default) it will not send a list of CA certificates but use ssl_trusted_certificate to verify the client certificate. To cite:

Syntax: ssl_client_certificate file;
Default: —
Context: http, server

Specifies a file with trusted CA certificates in the PEM format used to verify client certificates and OCSP responses if ssl_stapling is enabled.

The list of certificates will be sent to clients. If this is not desired, the ssl_trusted_certificate directive can be used.

 

as it will be impossible for my application to do it, since it's not terminating TLS itself

nginx can actually provide the client certificate as HTTP header or similar so that the web application can get access to it and verify it or extract information from it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.