Browse Source

Add dovecott to SSLauth

master
vlaborie 3 years ago
parent
commit
6de040cebd
1 changed files with 32 additions and 1 deletions
  1. +32
    -1
      HowtoSSLauth.md

+ 32
- 1
HowtoSSLauth.md 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"
~~~
~~~

Loading…
Cancel
Save