Projet

Général

Profil

Bug #24187

La création automatique d'un certificat SAML foire si le nom de domaine fait plus de 64 caractères

Ajouté par Benjamin Dauvergne il y a presque 6 ans. Mis à jour il y a plus de 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
30 mai 2018
Echéance:
% réalisé:

100%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

root@publik-frontal  /var/lib/fargo/tenants $ tail /var/log/hobo-agent/stderr.log 
    R = retval = fun(*args, **kwargs) 
  File "/usr/lib/python2.7/dist-packages/celery/app/trace.py", line 437, in __protected_call__ 
    return self.run(*args, **kwargs) 
  File "/usr/lib/python2.7/dist-packages/hobo/agent/worker/celery.py", line 37, in deploy 
    services.deploy(environment) 
  File "/usr/lib/python2.7/dist-packages/hobo/agent/worker/services.py", line 234, in deploy 
    list(pool.imap_unordered(lambda x: x.execute(environment), services)) 
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 659, in next 
    raise value 
RuntimeError: command "sudo -u fargo /usr/bin/fargo-manage hobo_deploy https://porte-documents-vallee-des-baux-alpilles.test-demarches.sictiam.fr/ -" failed: '' 'Traceback (most recent call last):\n  File "/usr/lib/fargo/manage.py", line 10, in <module>\n    execute_from_command_line(sys.argv)\n  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line\n    utility.execute()\n  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute\n    self.fetch_command(subcommand).run_from_argv(self.argv)\n  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv\n    self.execute(*args, **cmd_options)\n  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute\n    output = self.handle(*args, **options)\n  File "/usr/lib/python2.7/dist-packages/hobo/agent/common/management/commands/hobo_deploy.py", line 65, in handle\n    self.deploy(base_url, hobo_environment, ignore_timestamp)\n  File "/usr/lib/python2.7/dist-packages/hobo/agent/common/management/commands/hobo_deploy.py", line 90, in deploy\n    self.deploy_specifics(hobo_environment, tenant)\n  File "/usr/lib/python2.7/dist-packages/hobo/agent/common/management/commands/hobo_deploy.py", line 98, in deploy_specifics\n    self.generate_saml_keys(tenant, prefix=\'sp-\')\n  File "/usr/lib/python2.7/dist-packages/hobo/agent/common/management/commands/hobo_deploy.py", line 118, in generate_saml_keys\n    \'-subj\', \'/CN=%s\' % tenant.domain_url, \'-days\', str(DAYS))\n  File "/usr/lib/python2.7/dist-packages/hobo/agent/common/management/commands/hobo_deploy.py", line 107, in openssl\n    subprocess.check_call([\'openssl\'] + list(args), stdout=dev_null, stderr=dev_null)\n  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call\n    raise CalledProcessError(retcode, cmd)\nsubprocess.CalledProcessError: Command \'[\'openssl\', \'req\', \'-x509\', \'-newkey\', \'rsa:1024\', \'-nodes\', \'-keyout\', u\'/var/lib/fargo/tenants/porte-documents-vallee-des-baux-alpilles.test-demarches.sictiam.fr/sp-saml.key\', \'-out\', u\'/var/lib/fargo/tenants/porte-documents-vallee-des-baux-alpilles.test-demarches.sictiam.fr/sp-saml.crt\', \'-batch\', \'-subj\', u\'/CN=porte-documents-vallee-des-baux-alpilles.test-demarches.sictiam.fr\', \'-days\', \'3652\']\' returned non-zero exit status 1\n' 

Il y a une limit de 64 caractères sur le commonName du DN d'un certificat, cette information étant totalement inutile pour SAML je propose de la supprimer ou de tronquer.

C'est bloquant au SICTIAM et leurs noms de domaine à rallonge.


Fichiers

Révisions associées

Révision 557685af (diff)
Ajouté par Benjamin Dauvergne il y a presque 6 ans

agent: truncate SAML certificate subject (fixes #24187)

The common name of a certificat cannot have more than 64 characters,
subject alternative name should be used when it is the case and the
common name left empty (here the CN is just useless).

Historique

#2

Mis à jour par Josué Kouka il y a presque 6 ans

Ack

#4

Mis à jour par Benjamin Dauvergne il y a presque 6 ans

  • Statut changé de Nouveau à Résolu (à déployer)
  • % réalisé changé de 0 à 100
#5

Mis à jour par Frédéric Péters il y a plus de 5 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF