diff --git a/HowtoSSLauth.md b/HowtoSSLauth.md index 231af94b..de14e16d 100644 --- a/HowtoSSLauth.md +++ b/HowtoSSLauth.md @@ -35,10 +35,41 @@ ssl_client_certificate /etc/ssl/certs/CA.pem; ssl_verify_client require; ~~~ +### Dovecot + +/etc/dovecot/conf.d/10-ssl.conf + +~~~ +ssl = yes +ssl_ca = /etc/ssl/certs/CA.pem +ssl_cert_username_field = commonName +~~~ + +/etc/dovecot/conf.d/10-auth.conf + +~~~ +auth_ssl_require_client_cert = yes +auth_ssl_username_from_cert = yes +passdb { + driver = passwd-file + args = /etc/dovecot/passwd-file + + deny = no + master = no + pass = no +} +~~~ + +/etc/dovecot/passwd-file + +~~~ +jdoe:{plain}::::::nopassword +~~~ + ## Coté client ### Curl ~~~ curl --cert ./client.crt --key ./client.key -u "user:pass" "https://example.com" -~~~ +~~~ \ No newline at end of file