22
0
Fork 0

Add dovecott to SSLauth

This commit is contained in:
vlaborie 2017-05-13 22:21:42 +02:00
parent c1c450c334
commit 6de040cebd
1 changed files with 32 additions and 1 deletions

View File

@ -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"
~~~
~~~