Skip to content

Commit ebdb40b

Browse files
committedMar 11, 2025
Document peer certificate fingerprinting
1 parent 2d1088b commit ebdb40b

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed
 

‎data/settings.js

+11
Original file line numberDiff line numberDiff line change
@@ -10272,6 +10272,17 @@ The most common choices are \`commonName\` and \`x500UniqueIdentifier\`.
1027210272
Note: [[setting,auth_ssl_username_from_cert]] MUST be enabled.`
1027310273
},
1027410274

10275+
ssl_peer_certificate_fingerprint_hash: {
10276+
default: '',
10277+
seealso: [ 'ssl', '[[link,ssl_configuration]]' ],
10278+
values: setting_types.STRING,
10279+
text: `
10280+
An OpenSSL digest algorithm name to use to hash peer certificate names.
10281+
Setting this value enables \`ssl_client_cert_fp\` and \`ssl_client_cert_pubkey_fp\`
10282+
availability in [[setting,login_log_format_elements]] and also in authentication
10283+
variables. Weak algorithms are explicitly blacklisted, such as MD5.`,
10284+
},
10285+
1027510286
ssl_cipher_list: {
1027610287
default: 'ALL:!kRSA:!SRP:!kDHd:!DSS:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH (for ssl_server, empty for ssl_client)',
1027710288
seealso: [ 'ssl', 'ssl_cipher_suites', 'ssl_min_protocol', '[[link,ssl_configuration]]' ],

‎docs/core/config/auth/passdb.md

+17
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,23 @@ a load spike of everybody getting logged in at exactly the same time.
442442

443443
Do not perform any authentication, just store extra fields if user is found.
444444

445+
##### `check_client_fp`
446+
447+
Match client certificate or public key fingerprint. See [[setting,ssl_peer_certificate_fingerprint_hash]].
448+
If there is no match, authentication fails.
449+
450+
##### `check_client_cert_fp`
451+
452+
Match client certificate fingerprint. See [[setting,ssl_peer_certificate_fingerprint_hash]].
453+
454+
Certificate fingerprint is calculated by taking hash value of DER encoded X509 client certificate.
455+
456+
##### `check_client_pubkey_fp`
457+
458+
Match client public key fingerprint. See [[setting,ssl_peer_certificate_fingerprint_hash]].
459+
460+
Public key fingerprint is calculated by taking hash value of DER encoded certificate public key.
461+
445462
#### `forward_<anything>`
446463

447464
In a proxy, pass the variable to the next hop (backend) as

‎docs/core/settings/variables.md

+4
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ See also:
287287
| `ssl_security` | TLS session security string. If HAProxy is configured and it terminated the TLS connection, contains "(proxied)". |
288288
| `ssl_ja3` | [[link,ssl_ja3]] composed from TLS Client Hello. |
289289
| `ssl_ja3_hash` | MD5 hash from [[link,ssl_ja3]] composed from TLS Client Hello. |
290+
| `ssl_client_cert_fp` | [[setting,ssl_peer_certificate_fingerprint_hash]] of client certificate. |
291+
| `ssl_client_cert_pubkey_fp` | [[setting,ssl_peer_certificate_fingerprint_hash]] of client certificate public key. |
290292
| `mail_pid` | PID for process that handles the mail session post-login. |
291293
| `original_user` | Same as `user`, except using the original username the client sent before any changes by auth process. With master user logins (also with [[setting,auth_master_user_separator]] based logins),this contains only the original master username. |
292294
| `listener` | Socket listener name as specified in config file, which accepted the client connection. |
@@ -322,6 +324,8 @@ See also:
322324
| `password` | Cleartext password from cleartext authentication mechanism. |
323325
| `secured` | "TLS" with established SSL/TLS connections, "secured" with secured connections (see: [[setting,ssl]]). Otherwise empty. |
324326
| `ssl_ja3_hash` | MD5 hash from JA3 string composed from TLS Client Hello. |
327+
| `ssl_client_cert_fp` | [[setting,ssl_peer_certificate_fingerprint_hash]] of client certificate. |
328+
| `ssl_client_cert_pubkey_fp` | [[setting,ssl_peer_certificate_fingerprint_hash]] of client certificate public key. |
325329
| `cert` | "valid" if client had sent a valid client certificate, otherwise empty. |
326330
| `login_user` | For master user logins: Logged in user@domain. |
327331
| `master_user` | For master user logins: The master username. |

0 commit comments

Comments
 (0)