Compare commits
4 Commits
b6955ae0ab
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 91abb8d783 | |||
| 7391f39107 | |||
| 1cfde13b90 | |||
| ad84af3b69 |
43
Readme.md
43
Readme.md
@@ -1,5 +1,10 @@
|
|||||||
# SSL
|
# SSL
|
||||||
|
|
||||||
|
## Référence
|
||||||
|
|
||||||
|
📖 Support Ch 7 (p97)
|
||||||
|
|
||||||
|
|
||||||
## Démonstration préalable:
|
## Démonstration préalable:
|
||||||
|
|
||||||
lancer un wireshark sur le poste client, avec comme filtre _port 389_
|
lancer un wireshark sur le poste client, avec comme filtre _port 389_
|
||||||
@@ -18,49 +23,41 @@ Suivre la procédure slide 97.
|
|||||||
### Certificat letsencrypt
|
### Certificat letsencrypt
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl stop httpd
|
sudo systemctl stop httpd
|
||||||
dnf install certbot -y
|
sudo dnf install certbot -y
|
||||||
certbot certonly --standalone -d CHANGEME.formation.opendoor.fr -m formation@opendoor.fr --agree-tos --test-cert
|
sudo certbot certonly --standalone -d CHANGEME.formation.opendoor.fr -m formation@opendoor.fr --agree-tos --test-cert
|
||||||
# répondre N à la question
|
# répondre N à la question
|
||||||
systemctl start httpd
|
sudo systemctl start httpd
|
||||||
```
|
```
|
||||||
⚠️ Attention, pour que le certificat (de test) soit reconnu, il faudra que le client télécharge la clé publique de la CA:
|
⚠️ Attention, pour que le certificat (de test) soit reconnu, il faudra que le client télécharge la clé publique de la CA:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem -L >> /etc/openldap/certs/ca.pem
|
curl https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem -L | sudo tee -a /etc/openldap/certs/ca.pem
|
||||||
echo TLS_CACERT /etc/openldap/certs/ca.pem >> /etc/openldap/ldap.conf
|
echo TLS_CACERT /etc/openldap/certs/ca.pem | sudo tee -a /etc/openldap/ldap.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
Attention également aux permissions. L'utilisateur _ldap_ doit pouvoir lire les différents fichiers:
|
Attention également aux permissions. L'utilisateur _ldap_ doit pouvoir lire les différents fichiers:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chgrp -R ldap chgrp ldap /etc/letsencrypt/{archive,live}
|
sudo chgrp -R ldap /etc/letsencrypt/{archive,live}
|
||||||
chmod -R g+rX /etc/letsencrypt/{archive,live}
|
sudo chmod -R g+rX /etc/letsencrypt/{archive,live}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration du serveur
|
## Configurer le serveur
|
||||||
|
|
||||||
La configuration est globale au serveur (1 certificat par serveur). Elle se fait donc au niveau de la branche _cn=config_
|
La configuration est globale au serveur (1 certificat par serveur). Elle se fait donc au niveau de la branche _cn=config_
|
||||||
|
|
||||||
Mettez au point le fichier ldif permettant de remplacer les attributs suivants par la bonne valeur (qui dépend de la méthode utilisée pour créer les certificats)
|
Mettez au point le fichier ldif permettant de remplacer les attributs suivants par la bonne valeur (qui dépend de la méthode utilisée pour créer les certificats)
|
||||||
|
|
||||||
attribut | valeur procédure support | valeur procédure Let's Encrypt
|
- olcTLSCipherSuite : ECDHE-RSA-AES256-SHA384:AES256-SHA256:!RC4:HIGH:!MD5:!EDH:!EXP:!SSLV2:!eNULL | idem |
|
||||||
---
|
- olcTLSProtocolMin : 3.4 | idem |
|
||||||
olcTLSCipherSuite | ECDHE-RSA-AES256-SHA384:AES256-SHA256:!RC4:HIGH:!MD5:!EDH:!EXP:!SSLV2:!eNULL | idem |
|
- olcTLSCACertificateFile : /etc/openldap/certs/ca.pem | /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/fullchain.pem
|
||||||
---
|
- olcTLSCertificateFile : /etc/openldap/certs/cert.pem | /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/fullchain.pem
|
||||||
olcTLSProtocolMin | 3.4 | idem |
|
- olcTLSCertificateKeyFile : /etc/openldap/certs/key.pem | /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/privkey.pem
|
||||||
---
|
|
||||||
olcTLSCACertificateFile | /etc/openldap/certs/ca.pem | /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/fullchain.pem
|
|
||||||
---
|
|
||||||
olcTLSCertificateFile | /etc/openldap/certs/cert.pem | /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/fullchain.pem
|
|
||||||
---
|
|
||||||
olcTLSCertificateKeyFile | /etc/openldap/certs/key.pem | /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/privkey.pem
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
## Configurer le client
|
## Configurer le client
|
||||||
|
|
||||||
Dans le fichier /etc/openldap/ldap.conf modifier l'_URI_, _TLS_REQCERT_ et _TLS_CACERT_
|
Dans le fichier /etc/openldap/ldap.conf modifier l'_URI_, _TLS_REQCERT_ et _TLS_CACERT_ afin de forcer l'utilisation de ssl, avec vérification du certificat
|
||||||
|
|
||||||
## Test
|
## Test
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user