How to prevent LDAP Settings overwrite?
-
Hi,
I currently have the problem that Cloudron overwrites the LDAP entries that I have entered in the admin interface. Is there a way to prevent this behaviour?
Thanks,
Simon
-
@simong at the moment the Snipe-IT package only comes with Cloudron usermanagement integration, so it will always ensure the LDAP settings are bound to the LDAP server on your Cloudron.
If we want to support other external user-management systems, then we have to change the package to support non-Cloudron user management as well.
-
-
Could this not be overwritten with env var?
Or maybe the config should be moved to env for end user config? -
Currently, we configure it like this:
$settings = Setting::first(); $settings->custom_forgot_pass_url = env('CLOUDRON_API_ORIGIN') . '/login.html?passwordReset'; $settings->ldap_enabled = 1; $settings->ldap_server = env('CLOUDRON_LDAP_URL'); $settings->ldap_uname = env('CLOUDRON_LDAP_BIND_DN'); $settings->ldap_pword = $encrypter->encrypt(env('CLOUDRON_LDAP_BIND_PASSWORD')); $settings->ldap_basedn = env('CLOUDRON_LDAP_USERS_BASE_DN'); $settings->ldap_filter = '&(objectclass=user)'; $settings->ldap_username_field = 'username'; $settings->ldap_lname_field = 'sn'; $settings->ldap_fname_field = 'givenname'; $settings->ldap_auth_filter_query = 'username='; $settings->ldap_email = 'mail'; $settings->ldap_pw_sync = 0; $settings->save();
-
@girish I want to use this filter:
&(objectCategory=person)(objectClass=user)(department=*)(title=*)
I use the Azure ADDS Server directly to use this filter.It would be really great to have these settings in the env file.
-
i think they want $settings->ldap_filter = env('CLOUDRON_LDAP_FILTER');
-
-
@simong I have published a new package where you can install with user management disabled. Importing your existing setup might be a bit complicated though because we don't support LDAP support being turned on/off dynamically. Maybe you can try this:
- Update your existing installation to new package
- Install a fresh installation (in another subdomain) with no user management
- Import the latest backup of old installation into the fresh installation - https://docs.cloudron.io/backups/#import-app-backup
- Configure LDAP in new installation
- If everything works ok, you can switch things over.
-
@girish I did a fresh installation and added some ldap credentials there. But after a reboot, they are overwritten with empty values and some predefined filters:
This is without any import of a backup or other changes.
-
-
6/16