Closed Spomky closed 1 year ago
In the end, I managed to get Caddy working fine. I share the configuration here below for everyone who could be stucked on this.
The main point is to pass the result of the client authentication verification to PHP-FPM via env vars. The placeholders are the ones listed in the doc at https://caddyserver.com/docs/json/apps/http/#docs
To be noted that it does not work on Symfony < 6.2 because the email address is not part of the subject string.
With Symfony 6.3 and https://github.com/symfony/symfony/pull/48200, it works as expected using common name CN
instead of emailAddress
Hi,
I am trying to enable client authentication by editing
docker/caddy/Caddyfile
. I have followed the examples provided on thetls
documentation, but I have not been successful so far (I am not familiar with Caddy).At first sight, I put the config as follows:
But when trying to run the server, the following exception is thrown:
❓ Question: Do you have any idea on how to enable the client authentication feature?
root.crt
user-mgmt.crt
[EDIT]: by the way, when I will succeed in configuring the client authentication, I will take the opportunity to add the example for Caddy at https://symfony.com/doc/current/security.html#x-509-client-certificates