Skip to content

feat: SSL client certificate validation #2592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 10, 2025

Conversation

SchoNie
Copy link
Contributor

@SchoNie SchoNie commented Feb 28, 2025

This PR adds support for the ssl_client_certificate, ssl_verify_client optional and ssl_crl directives. It was requested and discussed multiple times over the years and I wanted to experiment with mTLS in my setup so I continued and combined the existing PR's enabling verification of client side certificates (mutual TLS) based on if a CA file exists.

A Certificate Revocation List (CRL) can be used.

Optional ssl_verify_client can be activated by using the com.github.nginx-proxy.nginx-proxy.ssl_verify_client: "optional" label. This does not block access but instead stores the result in the $ssl_client_verify variable which gives user control which paths are controlled.

Tests for all kind of mTLS scenarios. (10 year expiry cert)

Resolves #137, Resolves #278, Resolves #1027, Resolves #1046, Resolves #1197, Resolves #1584, Resolves #1644,
Discussed in: #2568

If you think this is something interesting to be merged I will add docs and write a wiki page how to generate all the client certificates. Please let me know.

@SchoNie SchoNie force-pushed the mtls-client-certificate branch 2 times, most recently from e520300 to f3d1c9b Compare March 11, 2025 08:51
@SchoNie SchoNie force-pushed the mtls-client-certificate branch from f3d1c9b to 6443ee2 Compare March 24, 2025 10:58
@SchoNie SchoNie force-pushed the mtls-client-certificate branch from 6443ee2 to 94fe047 Compare April 25, 2025 08:17
@SchoNie SchoNie force-pushed the mtls-client-certificate branch from 94fe047 to 054a64e Compare May 8, 2025 12:00
@buchdag
Copy link
Member

buchdag commented May 8, 2025

If you think this is something interesting to be merged

@SchoNie I do 👍

@SchoNie SchoNie force-pushed the mtls-client-certificate branch from 054a64e to 5ade728 Compare May 8, 2025 12:19
@SchoNie SchoNie force-pushed the mtls-client-certificate branch from 5ade728 to 5e77e29 Compare June 4, 2025 13:29
@SchoNie
Copy link
Contributor Author

SchoNie commented Jun 4, 2025

If you think this is something interesting to be merged

@SchoNie I do 👍

Wiki page and added docs.

@SchoNie SchoNie marked this pull request as ready for review June 4, 2025 13:53
Copy link
Member

@buchdag buchdag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incredible work @SchoNie , thanks 👍

The only suggestion I have other than the style one would be to maybe make it a bit clearer in the docs that global CRL can only work with global CA, and same thing for per-VIRTUAL_HOST.

@buchdag buchdag added the type/feat PR for a new feature label Jun 10, 2025
@SchoNie SchoNie requested a review from buchdag June 10, 2025 08:54
@buchdag buchdag merged commit 2c83810 into nginx-proxy:main Jun 10, 2025
3 of 4 checks passed
@SchoNie SchoNie deleted the mtls-client-certificate branch June 10, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feat PR for a new feature
Projects
None yet
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy