cn:ccr:aai:howto:how_to:rockylinux8-certificati
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cn:ccr:aai:howto:how_to:rockylinux8-certificati [2022/04/22 07:44] – monducci@infn.it | cn:ccr:aai:howto:how_to:rockylinux8-certificati [2022/04/22 11:04] (current) – [Aggiornamento Certificato Macchina] monducci@infn.it | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Certificati | ||
+ | |||
+ | ===== Aggiornamento Certificato Macchina ===== | ||
+ | |||
+ | E' necessario determinare il nome dell' | ||
+ | |||
+ | Eseguire: | ||
+ | # ls -F / | ||
+ | |||
+ | Esempio | ||
+ | # ls -F / | ||
+ | slapd-ds2 | ||
+ | |||
+ | L' | ||
+ | slapd-ds2 | ||
+ | |||
+ | Verificare i certificati installati: | ||
+ | dsconf " | ||
+ | |||
+ | Esempio: | ||
+ | | ||
+ | dsconf slapd-ds2 security certificate list | ||
+ | | ||
+ | Certificate Name: Server-Cert | ||
+ | Subject DN: CN=ds2, | ||
+ | Issuer DN: CN=ssca.389ds.example.com, | ||
+ | Expires: 2024-03-16 15:30:09 | ||
+ | Trust Flags: u,u,u | ||
+ | | ||
+ | Certificate Name: server-cert-ansible-managed | ||
+ | Subject DN: CN=ds.infn.it, | ||
+ | Issuer DN: CN=GEANT OV RSA CA 4,O=GEANT Vereniging, | ||
+ | Expires: 2023-03-23 23:59:59 | ||
+ | Trust Flags: u,u,u | ||
+ | |||
+ | Prendersi nota del " | ||
+ | Il profilo ansibile DS389 per RockyLinux8 il Certificate Name è: " | ||
+ | |||
+ | |||
+ | Cancellare il certificato che si desidera aggiornare: | ||
+ | |||
+ | dsconf " | ||
+ | Esempio | ||
+ | dsconf slapd-ds2 security certificate del server-cert-ansible-managed | ||
+ | |||
+ | **Se avete un certificato con rinnovo automatico seguite questa procedura: | ||
+ | |||
+ | dsconf " | ||
+ | Esempio | ||
+ | dsconf -v slapd-ds2 security certificate add --name server-cert-ansible-managed --file ds2.infn.it-2.pem --primary-cert | ||
+ | |||
+ | **Se avete un certificato senza automatico seguite questa procedura: | ||
+ | __Attenzione questa procedura non è ancora stata testata__\\ | ||
+ | Convertire il certificato con chiave privata del server in formato pkcs12 in un file temporaneo. **Non impostare una password**. | ||
+ | |||
+ | openssl pkcs12 -export -inkey ds_server_key.pem -in ds_server_crt.pem -out / | ||
+ | |||
+ | Importare il certificato con chiave privata del server nel DB di 389-ds. | ||
+ | Verrà richiesto di inserire la password per l' | ||
+ | La prima password che viene chiesta è quella del DB di 389-ds, la seconda è invece quella eventualmente impostata nell’export (premere semplicemente invio, se non è stata impostata la password per il p12). | ||
+ | |||
+ | cd / | ||
+ | pk12util -i / | ||
+ | |||
+ | Infine, comunque fare il restart del servizio directory server | ||
+ | |||
+ | systemctl restart dirsrv@ds.service | ||
+ | |||
+ | |||
+ | Per avere un output verboso si può usare -v nei comandi: dsconf | ||
+ | dsconf -v .... | ||
+ | |||
+ | Ricordarsi di aggiornare anche i certificati per cockpit | ||
+ | |||
+ | [[https:// | ||
+ | ===== Verifica Certificato Server ===== | ||
+ | Eseguire: | ||
+ | openssl s_client -starttls ldap -connect " | ||
+ | |||
+ | Esempio: | ||
+ | openssl s_client -starttls ldap -connect ds1.infn.it: | ||
+ | ===== Verifica Certificati Master ===== | ||
+ | Tramite socket | ||
+ | ldapsearch -Q -LLL -o ldif-wrap=no | ||
+ | Esempio | ||
+ | ldapsearch -Q -LLL -o ldif-wrap=no | ||
+ | | ||
+ | dn: cn=dsm1.infn.it, | ||
+ | infnCertSubjectDN: | ||
+ | infnCertSubjectDN: | ||
+ | | ||
+ | dn: cn=dsm2.infn.it, | ||
+ | infnCertSubjectDN: | ||
+ | infnCertSubjectDN: | ||
+ | | ||
+ | dn: cn=dsm3.infn.it, | ||
+ | infnCertSubjectDN: | ||
+ | infnCertSubjectDN: | ||
+ | |||
+ | L' | ||
+ | |||
+ | **OU=SSNN, | ||