Project

General

Profile

Scénario #24151

Les certificats de Samba sont des certificats non géré

Added by Emmanuel GARETTE over 5 years ago. Updated almost 3 years ago.

Status:
Terminé (Sprint)
Priority:
Normal
Assigned To:
Category:
-
Start date:
10/20/2020
Due date:
11/06/2020
% Done:

100%

Story points:
4.0
Remaining (hours):
0.00 hour
Velocity based estimate:
Release:
Release relationship:
Auto

Description

Le certificat utilisé par Samba est aujourd'hui un certificat généré par Samba.

Il faudrait pouvoir configurer le certificat utilisé.

Solutions à mettre en œuvre

  • EOLE >= 2.8.0
  • S'assurer que nos certificats sont bien compatibles avec Samba
  • Adapter la configuration du Seth
  • Si nécessaire, on pourra utiliser la fonction InstallSSLFiles pour réaliser une copie adaptée des certificats du module
  • Proposer et implémenter une solution équivalente pour le conteneur addc de ScribeAD (Attention : le Scribe "membre" et le serveur ADDC sont deux "serveurs" différents)

Critères d'acceptation

  • Les contrôleurs de domaine samba utilisent les certificats du module
  • Les tests Jenkins Seth et Scribe 2.8.0 sont toujours passants

Subtasks

Tâche #30893: Étude des options de configuration de TLS pour SambaFerméBenjamin Bohard

Tâche #30905: Mettre en place la procédure identifiée lors de l’étudeFerméBenjamin Bohard

Tâche #30973: pb indentation + keytoolFerméBenjamin Bohard

Tâche #31137: Désactiver la copie de certificats pour Samba lorsque le serveur utilise Let's EncryptFerméEmmanuel GARETTE


Related issues

Related to Distribution EOLE - Tâche #30881: Valider le scénario Les certificats de Samba sont des certificats non géré (sprint 43-45) Fermé 10/19/2020
Related to Distribution EOLE - Tâche #30974: Intégrer les nouveautés identifiées en 2.8 dans les sections des modules intitulées : "Les différences entre les versions 2.7 et 2.8" Fermé 11/02/2020

History

#1 Updated by Gilles Grandgérard over 4 years ago

  • Tracker changed from Proposition Scénario to Scénario

#2 Updated by Gilles Grandgérard almost 3 years ago

  • Due date set to 11/06/2020
  • Target version set to Prestation Cadoles MEN 43-45
  • Start date set to 10/19/2020

#3 Updated by Joël Cuissinat almost 3 years ago

  • Description updated (diff)
  • Release set to EOLE 2.8.0
  • Story points set to 4.0

#4 Updated by Joël Cuissinat almost 3 years ago

  • Description updated (diff)

#5 Updated by Benjamin Bohard almost 3 years ago

  • Assigned To set to Benjamin Bohard

#6 Updated by Fabrice Barconnière almost 3 years ago

  • Related to Tâche #30881: Valider le scénario Les certificats de Samba sont des certificats non géré (sprint 43-45) added

#7 Updated by Daniel Dehennin almost 3 years ago

Ces modifications semblent introduire un problème lors de l’instance :

oct. 30 09:51:51 addc systemd[1]: Starting Samba AD Daemon...
oct. 30 09:51:51 addc samba[2854]: [2020/10/30 09:51:51.178871,  0] ../../source4/smbd/server.c:622(binary_smbd_main)
oct. 30 09:51:51 addc samba[2854]:   samba version 4.11.6-Ubuntu started.
oct. 30 09:51:51 addc samba[2854]:   Copyright Andrew Tridgell and the Samba Team 1992-2019
oct. 30 09:51:51 addc samba[2854]: [2020/10/30 09:51:51.339067,  0] ../../source4/smbd/server.c:865(binary_smbd_main)
oct. 30 09:51:51 addc samba[2854]:   binary_smbd_main: samba: using 'prefork' process model
oct. 30 09:51:51 addc samba[2871]: [2020/10/30 09:51:51.371388,  0] ../../source4/lib/tls/tlscert.c:67(tls_cert_generate)
oct. 30 09:51:51 addc samba[2871]:   Attempting to autogenerate TLS self-signed keys for https for hostname 'ADDC.domscribe.ac-test.fr'
oct. 30 09:51:51 addc samba[2854]: [2020/10/30 09:51:51.455859,  0] ../../source4/smbd/process_prefork.c:511(prefork_child_pipe_handler)
oct. 30 09:51:51 addc samba[2854]:   prefork_child_pipe_handler: Parent 2854, Child 2863 exited with status 0
oct. 30 09:51:51 addc samba[2901]: [2020/10/30 09:51:51.462717,  0] ../../source4/smbd/service_stream.c:372(stream_setup_socket)
oct. 30 09:51:51 addc samba[2901]:   stream_setup_socket: Failed to listen on 0.0.0.0:53 - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED
oct. 30 09:51:51 addc samba[2901]: [2020/10/30 09:51:51.462841,  0] ../../source4/dns_server/dns_server.c:648(dns_add_socket)
oct. 30 09:51:51 addc samba[2901]:   Failed to bind to 0.0.0.0:53 TCP - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED
oct. 30 09:51:51 addc winbindd[2893]: [2020/10/30 09:51:51.633598,  0] ../../source3/winbindd/winbindd_cache.c:3164(initialize_winbindd_cache)
oct. 30 09:51:51 addc winbindd[2893]:   initialize_winbindd_cache: clearing cache and re-creating with version number 2
oct. 30 09:51:51 addc winbindd[2893]: [2020/10/30 09:51:51.637481,  0] ../../lib/util/become_daemon.c:135(daemon_ready)
oct. 30 09:51:51 addc winbindd[2893]:   daemon_ready: daemon 'winbindd' finished starting up and ready to serve connections
oct. 30 09:51:51 addc systemd[1]: Started Samba AD Daemon.
oct. 30 09:51:51 addc smbd[2861]: [2020/10/30 09:51:51.703582,  0] ../../lib/util/become_daemon.c:135(daemon_ready)
oct. 30 09:51:51 addc smbd[2861]:   daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
oct. 30 09:51:52 addc samba[2871]: [2020/10/30 09:51:52.860102,  0] ../../source4/lib/tls/tlscert.c:131(tls_cert_generate)
oct. 30 09:51:52 addc samba[2871]:   Unable to save certificate in /var/lib/samba/private/tls/certs/addc.crt parent dir exists ?
oct. 30 09:51:52 addc samba[2871]: [2020/10/30 09:51:52.860201,  0] ../../source4/lib/tls/tlscert.c:159(tls_cert_generate)
oct. 30 09:51:52 addc samba[2871]:   TLS certificate generation failed
oct. 30 09:51:52 addc samba[2871]: [2020/10/30 09:51:52.860308,  0] ../../source4/lib/tls/tls_tstream.c:1191(tstream_tls_params_server)
oct. 30 09:51:52 addc samba[2871]:   TLS failed to initialise certfile /var/lib/samba/private/tls/certs/addc.crt and keyfile /var/lib/samba/private/tls/private/addc.key - Error while reading file.
oct. 30 09:51:52 addc samba[2871]: [2020/10/30 09:51:52.860412,  0] ../../source4/ldap_server/ldap_server.c:1247(ldapsrv_task_init)
oct. 30 09:51:52 addc samba[2871]:   ldapsrv failed tstream_tls_params_server - NT_STATUS_CANT_ACCESS_DOMAIN_INFO
oct. 30 09:51:52 addc samba[2871]: [2020/10/30 09:51:52.860477,  0] ../../source4/smbd/service_task.c:36(task_server_terminate)
oct. 30 09:51:52 addc samba[2871]:   task_server_terminate: task_server_terminate: [Failed to startup ldap server task]
oct. 30 09:51:52 addc samba[2854]: [2020/10/30 09:51:52.862149,  0] ../../source4/smbd/server.c:370(samba_terminate)
oct. 30 09:51:52 addc samba[2854]:   samba_terminate: samba_terminate of samba 2854: Failed to startup ldap server task
oct. 30 09:51:52 addc systemd[1]: samba-ad-dc.service: Main process exited, code=exited, status=1/FAILURE
oct. 30 09:52:02 addc systemd[1]: samba-ad-dc.service: Failed with result 'exit-code'.

Le certificat n’existe pas à ce moment :

root@addc:~# ls -l /var/lib/samba/private/tls/private/addc.key
ls: impossible d'accéder à '/var/lib/samba/private/tls/private/addc.key': Aucun fichier ou dossier de ce type

#8 Updated by Benjamin Bohard almost 3 years ago

La copie des certificats avec InstallSSLFiles est effectivement demandée après la création de ceux-ci, en posttemplate (pour mémoire, les certificats sont créés juste avant les run_parts posttemplate).

Au moment de la mise en place du conteneur addc, en preservice, ces certificats ne sont donc pas disponibles si ils sont de type autosignés.

#9 Updated by Joël Cuissinat almost 3 years ago

  • Related to Tâche #30974: Intégrer les nouveautés identifiées en 2.8 dans les sections des modules intitulées : "Les différences entre les versions 2.7 et 2.8" added

#10 Updated by Daniel Dehennin almost 3 years ago

  • Status changed from Nouveau to Terminé (Sprint)

Also available in: Atom PDF