Skip to content

Update handing of single value attributes like DisplayName may fail #471

@elecharny

Description

@elecharny

The displayName attributeType is single-value, which leads to some errors when synchronizing two ldap servers when the policy is MERGE and we have two different values for such an attribute, as the modification will try to keep the two values.
For instance:

Message ID : 3
    Modify Request
        Object : 'cn=CN0002,ou=L2L001Dst,ou=Test Data,dc=lsc-project,dc=org'
        Modifications : 
            Modification[0]
                Operation :  add
                Modification : displayname: aaa
                                          displayname: ppp

when the source entry is:

cn: CN0002,ou=L2L001Src,ou=Test Data,dc=lsc-project,dc=org
cn: CN0002
sn: SN0002
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
displayName: aaa

and the syncOptions contains:

<dataset>
  <name>displayName</name>
  <policy>MERGE</policy>
  <defaultValues>
    <string>"ppp"</string>
  </defaultValues>
</dataset>

The documented rules for MERGE policy and default values stipulates that:

If:

    no <forceValues/> are specified,

values from <defaultValues/> are added, as well as any source values, to existing destination values

which is clearly wrong for SV attributeTypes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions