Menu

#2212 user picture no longer synchronized from synchro_data_ldap_persons

Unassigned
more-info-needed
nobody
None
Data synchronization
Critical
3.1.0
defect
2024-01-31
2023-12-19
No

I just updated a test instance from 2.7.x to 3.1.0-2-11973 and the user picture is no longer loaded from the synchro_data_ldap_persons table.
I tested an update from 2.7.x to 3.0.3-10998 and in 3.0.3 the picture is updated correctly.

Discussion

  • Pierre Goiffon

    Pierre Goiffon - 2024-01-19

    Hello,
    Do you mean a new Person created by the datasynchro won't have anything in its picture attribute ?
    Please give more details like datasynchro configuration, input data, logs, datamodel customizations, ...

     
  • Pierre Goiffon

    Pierre Goiffon - 2024-01-19
    • status: new --> more-info-needed
     
  • Luca Olivetti

    Luca Olivetti - 2024-01-19

    When a new person is created there's no picture and when a person is updated it keeps the previous picture.
    This is the configuration of the Synhcro LDAP Person:
    * Name: Synchro LDAP Person
    * Description: Synchronization of persons from the LDAP directory
    * Status: Production
    * Target class: person
    * User: undefined
    * Contact to notify: undefined
    * Icon's hyperlink: (empty)
    * Application's hyperlink: (empty)
    * Data table: synchro_data_ldap_persons
    * Reconciliation policy: Use the attributes
    * Action on zero: Create
    * Action on one: Update
    * Action on many: Error
    * Users allowed: nobody
    * Full load interval: 7d 0h 0min 0s
    * Update rules: (empty)
    * Retention duration: 0s

    The attributes:
    Last Name (name) No Yes Locked
    Status (status) No Yes Locked
    Organization (org_id) No Yes Locked Name
    Email (email) No Yes Locked
    Phone (phone) No Yes Locked
    Notification (notify) No No Locked
    Function (function) No Yes Locked
    CIs (cis_list) No No Locked
    Picture (picture) No Yes Locked
    First Name (first_name) No Yes Locked
    Employee number (employee_number) Yes Yes Locked
    Mobile phone (mobile_phone) No Yes Locked
    Location (location_id) No No Locked Name
    Manager (manager_id) No No Locked Email
    Teams (team_list) No No Locked

    (As you can see I use the "employee number" as the only key, which I take from the unix uid from the samba AD, hence it's unique).

    I periodically run a syncronization job that takes all user data from AD, fills the synchronization table and issues a GET to the itop instance to trigger the synchronization.
    If the user in AD has a thumnailphoto attribute (which in my case is a jpeg picture) I fill the picture_data field of the synchro_data_ldap_persons table, picture_mimetype with 'image/jpeg' and picture_filename is the username+'.jpg'. In case there's no thumbnailphoto those fields are null.
    I checked that there's no difference in the data in the table in the 3 versions (2.7, 3.0 and 3.1), only in version 3.1 the picture_data/picture_mimetype/picture_filename are ignored.

     
  • Pierre Goiffon

    Pierre Goiffon - 2024-01-31

    Hello,
    Thanks for the details.
    Can you check your data table content ? Especially for the picture field ?

     
    • Luca Olivetti

      Luca Olivetti - 2024-01-31

      This is from version 3.0.3 (I'm not using 3.1 due to this bug)

      MariaDB [itop]> select picture_mimetype,picture_filename, hex(substr(picture_data,1,4)),substr(picture_data,5,10) from person limit 10;
      +------------------+-------------------+-------------------------------+---------------------------+
      | picture_mimetype | picture_filename  | hex(substr(picture_data,1,4)) | substr(picture_data,5,10) |
      +------------------+-------------------+-------------------------------+---------------------------+
      | image/jpeg       | bernd.jpg         | FFD8FFE0                      |  JFIF                  |
      | image/jpeg       | guillemrebull.jpg | FFD8FFE0                      |  JFIF                  |
      | image/jpeg       | calmet.jpg        | FFD8FFE0                      |  JFIF                  |
      | image/jpeg       | luca.jpg          | FFD8FFE0                      |  JFIF                  |
      | image/jpeg       | jmoreno.jpg       | FFD8FFE0                      |  JFIF                  |
      |                  |                   |                               |                           |
      | image/jpeg       | olivella.jpg      | FFD8FFE0                      |  JFIF                  |
      | image/jpeg       | ahernando.jpg     | FFD8FFE0                      |  JFIF                  |
      | image/jpeg       | victor.jpg        | FFD8FFE0                      |  JFIF                  |
      |                  |                   |                               |                           |
      +------------------+-------------------+-------------------------------+---------------------------+
      
       

Log in to post a comment.