File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1253,6 +1253,32 @@ and to expose the certificate's DN to the Symfony application:
1253
1253
# pass the DN to the application
1254
1254
SSLOptions +StdEnvVars
1255
1255
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 {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
+ # All placeholders can be found at https://caddyserver.com/docs/caddyfile/concepts#placeholders
1274
+ env SSL_CLIENT_S_FINGERPRINT {tls_client_fingerprint}
1275
+ env SSL_CLIENT_S_CERTIFICATE {tls_client_certificate_der_base64}
1276
+ env SSL_CLIENT_S_ISSUER {tls_client_issuer}
1277
+ env SSL_CLIENT_S_SERIAL {tls_client_serial}
1278
+ env SSL_CLIENT_S_VERSION {tls_version}
1279
+ }
1280
+ }
1281
+
1256
1282
Then, enable the X.509 authenticator using ``x509 `` on your firewall:
1257
1283
1258
1284
.. configuration-block ::
You can’t perform that action at this time.
0 commit comments