Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »

In order to retrieve and update Mattermost profile pictures from LDAP, we must understand how LDAP stores the images.

Microsoft Active Directory primarily stores profile images in an attribute with the name “thumbnailPhoto”. However, OpenLDAP uses the attribute “jpegPhoto”. AD also has the “jpegPhoto” attribute and could be used in AD as well. Therefore, we need to allow the administrator to enter the name of the profile photo attribute. Suggest that we include the two terms “jpegPhoto” and “thumbnailPhoto” in the help text under the textbox for Photo.

Image sizes - our documentation states we can handle a maximum file size of 50 mg. When importing files from LDAP we should check to ensure the size is under the 50mg maximum. The thumbnailPhoto has a size limit of 100kb. However, the “jpegPhoto” doesn’t enforce a size limit. We should potentially log a warning if a photo is above a certain size as transporting large files could hinder performance.

Image Types - Mattermost can support BMP, JPG or PNG format. It appears that LDAP supports both JPG and PNG format.

Performance/Comparison - Currently, each returned LDAP property is compared with the property saved in the user’s record. If any of the properties are different, the existing record's fields are updated with the new attribute values. Adding the update of images in this manner will not scale very well. When retrieving LDAP data, currently all user-defined(?) attributes are returned. Images should only be returned when necessary. Updating images should potentially be a separate phase in LDAP Sync where the query could take advantage of the modifyTimestamp attributes in OpenLDAP and AD/LDAP. This may be a way to improve our entire LDAP Sync process.

  • No labels