plugins: NGINX 1.34 - Web Config incorrectly assumes client certificate authentication requires a CA certificate.
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I’m convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
The NGINX Web Configuration dialogs incorrectly assume that NGINX requires a Certificate Authority to use client certificate authentication/verification.
This is incorrect, NGINX does not care whether the client certificate is a self signed, only that it matches what cert is given in the config and to which depth the config says to verify to.
For example, on an NGINX config on a regular Debian server, I use a self signed certificate to identify myself for administrative access. The self signed certificate pem is on the web server and the config in the NGINX HTTP block is:
ssl_client_certificate /etc/nginx/client_certs/admin.crt;
ssl_verify_client on;
ssl_verify_depth 1;
This allows NGINX to verify my self signed certificate without any CA’s present.
The configuration for OPNsense NGINX requires a CA certificate in the OPNsense System->Trust->Authorities but does not allow to choose a certificate from System->Trust->Certificates. As I said above, NGINX is capable of using a self signed/leaf certificate instead of a CA for client authentication.
Expected behavior OPNsense NGINX web configuration for the HTTP server should allow choosing a certificate from System->Trust->Certificates and specify to which depth NGINX should verify client transmitted certs as the raw NGINX configuration is already set up for.
Environment OPNsense 24.7.1 (amd64). os-nginx 1.34
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
Very strange behavior. I was able to import Githubs CA without using a priv key just like you did no problem. I then generated a fresh cert with openssl using the same command I used with my admin cert:
openssl req -x509 -nodes -days 3365 -newkey rsa:4096 -keyout selfsigned.key -out selfsigned.crtAnd that cert imported fine just as well.
I have no idea what the difference is between this new fresh cert and my old cert. They seem almost identical minus the Subject info.
My whole point of this issue was that I originally thought the CA import wouldn’t work for just the cert. Turns out it does work, no need for the plugin to add extra functionality!