Last active
November 21, 2023 18:22
-
-
Save marcelog/ad12a165d9ec6a695dd524c2c28ac644 to your computer and use it in GitHub Desktop.
Sample haproxy configuration snippet that will pass the SSL client certificate information to your application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mode http | |
http-request set-header X-SSL %[ssl_fc] | |
http-request set-header X-SSL-Client-Cert %[ssl_fc_has_crt] | |
http-request set-header X-SSL-Client-Verify %[ssl_c_verify] | |
http-request set-header X-SSL-Client-SHA1 %{+Q}[ssl_c_sha1,hex] | |
http-request set-header X-SSL-Client-DN %{+Q}[ssl_c_s_dn] | |
http-request set-header X-SSL-Client-CN %{+Q}[ssl_c_s_dn(cn)] | |
http-request set-header X-SSL-Issuer %{+Q}[ssl_c_i_dn] | |
http-request set-header X-SSL-Client-Not-Before %{+Q}[ssl_c_notbefore] | |
http-request set-header X-SSL-Client-Not-After %{+Q}[ssl_c_notafter] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment