thank you — in GLPI you can fully configure authentication directly via the CLI, since all auth settings are stored in the database.
The idea is simply to inject the configuration at install time, during the app initialization phase, instead of doing anything in the GUI.
In a Cloudron context, that means:
• Enable the ldap addon in CloudronManifest.json
• Let Cloudron inject the LDAP environment variables
• Use the GLPI CLI (bin/console) to create and enable the LDAP directory
• Do all of this inside the init script, once the database is ready
Example of what I’m planning to wire into init-glpi.sh:
php bin/console glpi:ldap:create
--default
--active
--name="Cloudron LDAP"
--host="${CLOUDRON_LDAP_URL#ldap://}"
--port=389
--basedn="ou=users,${CLOUDRON_LDAP_BASE_DN}"
--rootdn="${CLOUDRON_LDAP_BIND_DN}"
--rootdn-pass="${CLOUDRON_LDAP_BIND_PASSWORD}"
--login-field="username"
--email-field="mail"
--firstname-field="givenName"
--realname-field="sn"
--use-tls=0
This config is written directly to the GLPI database, so no UI interaction is required.
I haven’t tested this end-to-end yet — I’m a bit short on time this week — but from GLPI’s CLI and schema, this should be the correct approach. I’ll validate and clean it up when I have more bandwidth.