fametec / glpi

GLPI Docker Container
https://hub.docker.com/r/fametec/glpi
GNU General Public License v3.0
66 stars 63 forks source link

Uncaught Exception RuntimeException: You must create a security key. #47

Open jeritiana opened 1 year ago

jeritiana commented 1 year ago

Hi all,

I migrated a host installation into Docker using this image. It works well, except for the fact that each time the container is restarted or redeployed (e.g.: add a new volume into Docker Compose), I have this error message:

[2022-12-01 12:07:11] glpiphplog.CRITICAL:   *** Uncaught Exception RuntimeException: You must create a security key, see glpi:security:change_key command. in /var/www/html/inc/glpikey.class.php at line 120
  Backtrace :
  inc/toolbox.class.php:347                          GLPIKey->get()
  inc/toolbox.class.php:286                          Toolbox::getGlpiSecKey()
  inc/authldap.class.php:1460                        Toolbox::sodiumDecrypt()
  front/authldap.form.php:78                         AuthLDAP::testLDAPConnection()

The fix is to:

  1. Run /var/www/html/bin/console glpi:security:change_key
  2. Then update the LDAP passwords on all directory configurations.

Is there a way to prevent this? For me, one of the main purposes of using Docker is to be able to quickly change the configuration, or stop-backup-restart, etc. Currently, each container modification implies heavy reconfiguration.

Thanks!