- Edited
Hello,
we use the ORG LDAP configuration and I'm trying to define a custom LDAP attribute mapping.
If I want to map "o" or "organizationName" to "companyname" the ORG settings in the admin interface isn't working anymore.
uwsgi throws this error:
Mar 17 14:59:47 groupware uwsgi[243367]: [ERROR] (grommunio Admin API) Traceback (most recent call last):
Mar 17 14:59:47 groupware uwsgi[243367]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1820, in full_dispatch_request
Mar 17 14:59:47 groupware uwsgi[243367]: rv = self.dispatch_request()
Mar 17 14:59:47 groupware uwsgi[243367]: ^^^^^^^^^^^^^^^^^^^^^^^
Mar 17 14:59:47 groupware uwsgi[243367]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1796, in dispatch_request
Mar 17 14:59:47 groupware uwsgi[243367]: return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
Mar 17 14:59:47 groupware uwsgi[243367]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 17 14:59:47 groupware uwsgi[243367]: File "/usr/share/grommunio-admin-api/api/core.py", line 204, in wrapper
Mar 17 14:59:47 groupware uwsgi[243367]: return call()
Mar 17 14:59:47 groupware uwsgi[243367]: ^^^^^^
Mar 17 14:59:47 groupware uwsgi[243367]: File "/usr/share/grommunio-admin-api/api/core.py", line 169, in call
Mar 17 14:59:47 groupware uwsgi[243367]: ret = func(*args, **kwargs)
Mar 17 14:59:47 groupware uwsgi[243367]: ^^^^^^^^^^^^^^^^^^^^^
Mar 17 14:59:47 groupware uwsgi[243367]: File "/usr/share/grommunio-admin-api/endpoints/system/domains.py", line 55, in getOrgLdapConfig
Mar 17 14:59:47 groupware uwsgi[243367]: config = OrgParam.loadLdap(ID) or {}
Mar 17 14:59:47 groupware uwsgi[243367]: ^^^^^^^^^^^^^^^^^^^^^
Mar 17 14:59:47 groupware uwsgi[243367]: File "/usr/share/grommunio-admin-api/orm/domains.py", line 104, in loadLdap
Mar 17 14:59:47 groupware uwsgi[243367]: for entry in plain.getall("ldap_user_attributes") if " " in entry}
Mar 17 14:59:47 groupware uwsgi[243367]: ^^^^^^^^^^^^
Mar 17 14:59:47 groupware uwsgi[243367]: AttributeError: 'dict' object has no attribute 'getall'
Mar 17 14:59:47 groupware uwsgi[243367]: [WARNING] (grommunio Admin API) GET /api/v1/system/orgs/2/ldap? from 192.168.11.57 -> 500 '{"message":"The server encountered an error while processing the request."}\n'
The database shows:
MariaDB [grommunio]> select * from orgparam;
+--------+------------------------+-------------------------------------------------------------+
| org_id | key | value |
+--------+------------------------+-------------------------------------------------------------+
| 2 | ldap_basedn | dc=example,dc=com |
| 2 | ldap_binddn | cn=grommunio,ou=services,dc=example,dc=com |
| 2 | ldap_bindpw | password |
| 2 | ldap_contact_filter | (objectclass=grommunioContact) |
| 2 | ldap_disabled | False |
| 2 | ldap_group_addr | grommunioMailAddress |
| 2 | ldap_group_filter | (&(objectClass=grommunioGroup)(grommunioActive=TRUE)) |
| 2 | ldap_group_memberof | memberOf |
| 2 | ldap_group_name | cn |
| 2 | ldap_mail_attr | grommunioMailAddress |
| 2 | ldap_object_id | entryUUID |
| 2 | ldap_start_tls | False |
| 2 | ldap_uri | ldaps://ldaptest.example.com |
| 2 | ldap_user_aliases | grommunioMailAlias |
| 2 | ldap_user_attributes | organizationName companyname |
| 2 | ldap_user_displayname | displayName |
| 2 | ldap_user_filter | (&(objectClass=grommunioMailAccount)(grommunioActive=TRUE)) |
| 2 | ldap_user_search_attrs | mail,givenName,cn,sn,displayName,gecos |
| 2 | ldap_user_templates | common,OpenLDAP |
+--------+------------------------+-------------------------------------------------------------+
19 rows in set (0.001 sec)
Am I'm doing something wrong with custom attribute mapping?
We're running grommunio on Debian 12 with the following versions:
ii grommunio-admin-api 1.17.0.39d84a8-1+2.1 all Backend for grommunio management
ii grommunio-admin-common 42.e17ec55-1+30.1 amd64 Common files for grommunio management
ii grommunio-admin-web 4.0.0.0.5e1e4b3-1+123.2 all Frontend for grommunio management
ii grommunio-common 27.db4a83f-1+49.1 amd64 Common configuration package for grommunio
ii grommunio-dav 1.4.7.ee40553-1 all grommunio-dav is CalDAV and CardDAV implementation for grommunio.
ii grommunio-dbconf 1.1.1.da20a46-1+6.1 amd64 grommunio-dbconf
ii grommunio-error-pages 1.0.10.bb2df37-1+14.2 all Grommunio-branded error pages for webservers
ii grommunio-index 1.3.0.g2bd8a8c-1+3.2 amd64 Generator for grommunio-web search indexes
ii grommunio-sync 2.1.6.22f2119-0 all an implementation of the ActiveSync protocol which is
ii grommunio-web 3.10.52.ga0ab1670-1+224.1 all Web access for grommunio
ii mapi-header-php 1.6.0.8f4757d-1+5.1 amd64 Common PHP MAPI header files for grommunio
ii system-user-grommunio 9-1 all General grommunio system user identities
EDIT by @crpb - examples on how to format