Issue 8926 - glue records + syncrepl
Summary: glue records + syncrepl
Status: VERIFIED INVALID
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.46
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-11 16:06 UTC by goudal@bordeaux-inp.fr
Modified: 2020-03-23 20:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description goudal@bordeaux-inp.fr 2018-10-11 16:06:41 UTC
Full_Name: Fr.d.ric Goudal
Version: 2.4.46
OS: ubuntu 18.14 LTS
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (147.210.204.135)


The global setup is the following :
- 1 master ldap (2.4.40)
- 1 hidden slave on the master ldap, same suffix, ldap backend
- 1 ldap backend on a distant server (2.4.46)

When starting synchronisation the following event are happening :
- for some reason the sync process ask for creating
dn:uid=foo,ou=bar,dc=my,dc=domaine BEFORE the creation of
dn : ou=bar,dc=my,dc=domain

- on the backend the following entries are created in that order
   - dn:ou=bar,dc=my,dc=domain with the object class glue
   - dn: uid=foo,ou=bar,dc=my,dc=domain

Than... the sync tries to create ou=bar,dc=my,dc=domain with the correct
objectClass : organizationalUnit
But, as the object exists on the backend ldap, creation fails, and
synchronization stops.

Solution 
     -remove by hand the dn: uid=foo,ou=bar,dc=my,dc=domain, that remove the
glue object
    - create by hand the ou=bar,dc=my,dc=domain

What IMHO slapd should do :
- either check that it does not add an object before its parent objects
- either convert the glue object to the correct object when the real creation is
needed.

f




Comment 1 Howard Chu 2018-10-11 16:32:57 UTC
goudal@bordeaux-inp.fr wrote:
> Full_Name: Fr.d.ric Goudal
> Version: 2.4.46
> OS: ubuntu 18.14 LTS
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (147.210.204.135)
> 
> 
> The global setup is the following :
> - 1 master ldap (2.4.40)
> - 1 hidden slave on the master ldap, same suffix, ldap backend
> - 1 ldap backend on a distant server (2.4.46)
> 
> When starting synchronisation the following event are happening :
> - for some reason the sync process ask for creating
> dn:uid=foo,ou=bar,dc=my,dc=domaine BEFORE the creation of
> dn : ou=bar,dc=my,dc=domain
> 
> - on the backend the following entries are created in that order
>    - dn:ou=bar,dc=my,dc=domain with the object class glue
>    - dn: uid=foo,ou=bar,dc=my,dc=domain
> 
> Than... the sync tries to create ou=bar,dc=my,dc=domain with the correct
> objectClass : organizationalUnit
> But, as the object exists on the backend ldap, creation fails, and
> synchronization stops.
> 
> Solution 
>      -remove by hand the dn: uid=foo,ou=bar,dc=my,dc=domain, that remove the
> glue object
>     - create by hand the ou=bar,dc=my,dc=domain
> 
> What IMHO slapd should do :
> - either check that it does not add an object before its parent objects

No. This behavior is already documented in the Syncrepl specification.

> - either convert the glue object to the correct object when the real creation is
> needed.

The slapd consumer already does this when running on a local database. It would
require Manage privileges when running through back-ldap. Check your back-ldap configuration.

-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Frederic Goudal 2018-10-12 06:26:32 UTC
> Le 11 oct. 2018 à 18:32, Howard Chu <hyc@symas.com> a écrit :
> 
> goudal@bordeaux-inp.fr wrote:
>> Full_Name: Fr.d.ric Goudal
>> 
>> Solution 
>>     -remove by hand the dn: uid=foo,ou=bar,dc=my,dc=domain, that remove the
>> glue object
>>    - create by hand the ou=bar,dc=my,dc=domain
>> 
>> What IMHO slapd should do :
>> - either check that it does not add an object before its parent objects
> 
> No. This behavior is already documented in the Syncrepl specification.
> 
>> - either convert the glue object to the correct object when the real creation is
>> needed.
> 
> The slapd consumer already does this when running on a local database. It would
> require Manage privileges when running through back-ldap. Check your back-ldap configuration.

Well… I’v read 5 time the documentation on my setup, never seen the manage privilege mentioned anywhere…
Even in the example given for the backend configuration the acls don’t mention this « manage » privilege :

From page : https://www.openldap.org/doc/admin24/replication.html#Syncrepl

    # Give the replica DN unlimited read access.  This ACL may need to be
        # merged with other ACL statements.

        access to *
             by dn.base="cn=replicator,dc=suretecsystems,dc=com" write
             by * break

        access to dn.base=""
                by * read

        access to dn.base="cn=Subschema"
                by * read

        access to dn.subtree="cn=Monitor"
            by dn.exact="uid=admin,dc=suretecsystems,dc=com" write
            by users read
            by * none

        access to *
                by self write
                by * read


Wel.. I can accept it’s a documentation bug…but where is the correct documentation ?


f.g.



Comment 3 Frederic Goudal 2018-10-12 06:47:33 UTC
> Le 11 oct. 2018 à 18:32, Howard Chu <hyc@symas.com> a écrit :
> 
> goudal@bordeaux-inp.fr wrote:
>> Full_Name: Fr.d.ric Goudal
>> 
>> Solution 
>>    -remove by hand the dn: uid=foo,ou=bar,dc=my,dc=domain, that remove the
>> glue object
>>   - create by hand the ou=bar,dc=my,dc=domain
>> 
>> What IMHO slapd should do :
>> - either check that it does not add an object before its parent objects
> 
> No. This behavior is already documented in the Syncrepl specification.
> 
>> - either convert the glue object to the correct object when the real creation is
>> needed.
> 
> The slapd consumer already does this when running on a local database. It would
> require Manage privileges when running through back-ldap. Check your back-ldap configuration.

Well… I’v read 5 time the documentation on my setup, never seen the manage privilege mentioned anywhere…
Even in the example given for the backend configuration the acls don’t mention this « manage » privilege :

From page : https://www.openldap.org/doc/admin24/replication.html#Syncrepl

   # Give the replica DN unlimited read access.  This ACL may need to be
       # merged with other ACL statements.

       access to *
            by dn.base="cn=replicator,dc=suretecsystems,dc=com" write
            by * break

       access to dn.base=""
               by * read

       access to dn.base="cn=Subschema"
               by * read

       access to dn.subtree="cn=Monitor"
           by dn.exact="uid=admin,dc=suretecsystems,dc=com" write
           by users read
           by * none

       access to *
               by self write
               by * read


Wel.. I can accept it’s a documentation bug…but where is the correct documentation ?


f.g.



Comment 4 OpenLDAP project 2018-11-16 20:10:59 UTC
Update admin guide for this configuration?
Comment 5 Quanah Gibson-Mount 2018-11-16 20:10:59 UTC
changed notes
Comment 6 Quanah Gibson-Mount 2020-03-23 20:47:01 UTC
invalid config

manage documentation updates already being tracked