-
-
Notifications
You must be signed in to change notification settings - Fork 852
Description
Hi,
I am trying to enable client authentication by editing docker/caddy/Caddyfile
.
I have followed the examples provided on the tls
documentation, but I have not been successful so far (I am not familiar with Caddy).
At first sight, I put the config as follows:
tls {
client_auth {
mode verify_if_given
trusted_ca_cert_file /etc/caddy/certs/user-mgmt.crt
trusted_ca_cert_file /etc/caddy/certs/root.crt
}
}
But when trying to run the server, the following exception is thrown:
{"level":"info","ts":1675060797.858568,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
Error: adapting config using caddyfile: /etc/caddy/Caddyfile:7: unrecognized directive: client_auth
{"level":"info","ts":1675060822.0985522,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
Error: adapting config using caddyfile: server listening on [:80] is HTTP, but attempts to configure TLS connection policies
❓ 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