File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1253,6 +1253,30 @@ and to expose the certificate's DN to the Symfony application:
12531253 # pass the DN to the application
12541254 SSLOptions +StdEnvVars
12551255
1256+ .. code-block :: caddy
1257+
1258+ tls {
1259+ client_auth {
1260+ mode verify_if_given # Please refer to the Caddy documentation for more information
1261+ trusted_ca_cert_file /path/to/my-custom-CA.pem
1262+ }
1263+ }
1264+
1265+ route {
1266+ # Other configuration options go here
1267+
1268+ php_fastcgi unix//var/run/php/php-fpm.sock {
1269+ env SSL_CLIENT_S_DN {http.request.tls.client.subject}
1270+
1271+ # Environment variables for other certificate fields that you might need.
1272+ # They are not used by Symfony, but you can use them in your application.
1273+ env SSL_CLIENT_S_FINGERPRINT {http.request.tls.client.fingerprint}
1274+ env SSL_CLIENT_S_CERTIFICATE {http.request.tls.client.certificate_der_base64}
1275+ env SSL_CLIENT_S_ISSUER {http.request.tls.client.issuer}
1276+ env SSL_CLIENT_S_SERIAL {http.request.tls.client.serial}
1277+ }
1278+ }
1279+
12561280 Then, enable the X.509 authenticator using ``x509 `` on your firewall:
12571281
12581282.. configuration-block ::
You can’t perform that action at this time.
0 commit comments