Compare commits
1 Commits
b6955ae0ab
...
solution
| Author | SHA1 | Date | |
|---|---|---|---|
| 84b5d5bbf8 |
56
Readme.md
56
Readme.md
@@ -7,6 +7,7 @@ lancer un wireshark sur le poste client, avec comme filtre _port 389_
|
|||||||
faire une requète ldap authentifiée. Constater la présence du mot de passe et DN de connexion en clair
|
faire une requète ldap authentifiée. Constater la présence du mot de passe et DN de connexion en clair
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Création du certificat
|
## Création du certificat
|
||||||
|
|
||||||
### Certificat autosigné
|
### Certificat autosigné
|
||||||
@@ -38,33 +39,54 @@ chgrp -R ldap chgrp ldap /etc/letsencrypt/{archive,live}
|
|||||||
chmod -R g+rX /etc/letsencrypt/{archive,live}
|
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_
|
```ldif
|
||||||
|
dn: cn=config
|
||||||
|
changetype: modify
|
||||||
|
replace: olcTLSCipherSuite
|
||||||
|
olcTLSCipherSuite: ECDHE-RSA-AES256-SHA384:AES256-SHA256:!RC4:HIGH:!MD5:!EDH:!EXP:!SSLV2:!eNULL
|
||||||
|
-
|
||||||
|
replace: olcTLSProtocolMin
|
||||||
|
olcTLSProtocolMin: 3.4
|
||||||
|
-
|
||||||
|
replace: olcTLSCACertificateFile
|
||||||
|
olcTLSCACertificateFile: /etc/openldap/certs/ca.pem
|
||||||
|
#LETsEncrypt: olcTLSCACertificateFile: /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/fullchain.pem
|
||||||
|
-
|
||||||
|
replace: olcTLSCertificateFile
|
||||||
|
olcTLSCertificateFile: /etc/openldap/certs/cert.pem
|
||||||
|
#LETsEncrypt: olcTLSCertificateFile: /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/fullchain.pem
|
||||||
|
-
|
||||||
|
replace: olcTLSCertificateKeyFile
|
||||||
|
olcTLSCertificateKeyFile: /etc/openldap/certs/key.pem
|
||||||
|
#LETsEncrypt: olcTLSCertificateKeyFile: /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/privkey.pem
|
||||||
|
```
|
||||||
|
|
||||||
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)
|
Le cas échéant on ouvrira le parefeu:
|
||||||
|
|
||||||
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 |
|
|
||||||
---
|
|
||||||
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
|
|
||||||
---
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
firewall-cmd --add-service ldaps--permanent
|
||||||
|
firewall-cmd --add-service ldaps
|
||||||
|
```
|
||||||
|
|
||||||
## 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_
|
||||||
|
|
||||||
|
```bash
|
||||||
|
URI ldaps://CHANGEME.formation.opendoor.fr
|
||||||
|
TLS_REQCERT demand
|
||||||
|
TLC_CACERT /etc/openldap/certs/ca.pem
|
||||||
|
```
|
||||||
|
|
||||||
## Test
|
## Test
|
||||||
|
|
||||||
On doit pouvoir se connecter de manière sécurisé au serveur
|
On doit pouvoir se connecter de manière sécurisé au serveur
|
||||||
|
|
||||||
|
```bash
|
||||||
|
lds -Z
|
||||||
|
```
|
||||||
|
|
||||||
Wireshark ne doit voir passer que des paquets TLS 1.3 application_data
|
Wireshark ne doit voir passer que des paquets TLS 1.3 application_data
|
||||||
|
|
||||||
|
|||||||
15
ssl.ldif
Normal file
15
ssl.ldif
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Mise en œuvre SSL
|
||||||
|
dn: cn=config
|
||||||
|
changetype: modify
|
||||||
|
replace: olcTLSCertificateFile
|
||||||
|
olcTLSCertificateFile: CHANGEME
|
||||||
|
-
|
||||||
|
replace: olcTLSCertificateKeyfile
|
||||||
|
olcTLSCertificateKeyfile: CHANGEME
|
||||||
|
-
|
||||||
|
replace: olctlsverifyclient
|
||||||
|
olctlsverifyclient: never
|
||||||
|
-
|
||||||
|
replace: olctlscacertificatefile
|
||||||
|
olctlscacertificatefile: CHANGEME
|
||||||
|
|
||||||
16
ssl_le.ldif
Normal file
16
ssl_le.ldif
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
dn: cn=config
|
||||||
|
changetype: modify
|
||||||
|
replace: olcTLSCipherSuite
|
||||||
|
olcTLSCipherSuite: ECDHE-RSA-AES256-SHA384:AES256-SHA256:!RC4:HIGH:!MD5:!EDH:!EXP:!SSLV2:!eNULL
|
||||||
|
-
|
||||||
|
replace: olcTLSProtocolMin
|
||||||
|
olcTLSProtocolMin: 3.4
|
||||||
|
-
|
||||||
|
replace: olcTLSCACertificateFile
|
||||||
|
olcTLSCACertificateFile: /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/fullchain.pem
|
||||||
|
-
|
||||||
|
replace: olcTLSCertificateFile
|
||||||
|
olcTLSCertificateFile: /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/fullchain.pem
|
||||||
|
-
|
||||||
|
replace: olcTLSCertificateKeyFile
|
||||||
|
olcTLSCertificateKeyFile: /etc/letsencrypt/live/CHANGEME.formation.opendoor.fr/privkey.pem
|
||||||
Reference in New Issue
Block a user