Add dovecott to SSLauth
This commit is contained in:
parent
c1c450c334
commit
6de040cebd
|
@ -35,10 +35,41 @@ ssl_client_certificate /etc/ssl/certs/CA.pem;
|
||||||
ssl_verify_client require;
|
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
|
## Coté client
|
||||||
|
|
||||||
### Curl
|
### Curl
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
curl --cert ./client.crt --key ./client.key -u "user:pass" "https://example.com"
|
curl --cert ./client.crt --key ./client.key -u "user:pass" "https://example.com"
|
||||||
~~~
|
~~~
|
Loading…
Reference in a new issue