RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1044198 - Replication of the schema may overwrite consumer 'attributetypes' even if consumer definition is a superset
Summary: Replication of the schema may overwrite consumer 'attributetypes' even if con...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 21:53 UTC by Nathan Kinder
Modified: 2020-09-13 20:48 UTC (History)
4 users (show)

Fixed In Version: 389-ds-base-1.3.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 09:33:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 878 0 None None None 2020-09-13 20:48:07 UTC
Red Hat Product Errata RHSA-2015:0416 0 normal SHIPPED_LIVE Important: 389-ds-base security, bug fix, and enhancement update 2015-03-05 14:26:33 UTC

Description Nathan Kinder 2013-12-17 21:53:23 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47541

This ticket is a follow-up of https://fedorahosted.org/389/ticket/47490

A schema is a ldap entry with two attributes of 'objectclasses' and 'attributetypes'. 
A value of 'objectclasses' is a component that defines an objectclass. For example, a value of 'objectclasses' defines the objectclass 'person' with parentOC, MUST and MAY attribute.
Similarly a value of 'attributetypes' defines  the attribute 'givenname' with syntax,single-multi value, use...
 
During a replication session, the supplier may push its schema ( attributes 'objectclasses' and 'attributetypes') to the consumer. 

A value of 'objectclasses' may differs between supplier and consumer. A problem can arise if the value on the consumer is a superset of the value on the supplier. For example if consumer OC1 defines MUST with A1,A2 while the supplier OC1 defines MUST with A1. In that sense the OC1 on the supplier is more restrictive than the one on the consumer and if OC1 is pushed, then some entries on the consumer may violate the OC1. This problem was addressed with tichet https://fedorahosted.org/389/ticket/47490

A similar issue exists with 'attributetypes' where an attributetypes value, may be more restrictive on the supplier than on a consumer. For example with a more restrictive syntax or being single valued. This ticket is to address the 'attributetypes' checking during the schema push

Comment 2 Viktor Ashirov 2015-01-26 23:14:04 UTC
Please, provide verification steps.
Thank you!

Comment 3 Noriko Hosoi 2015-01-26 23:16:57 UTC
It looks the owner of the ticket is Mark...

Comment 4 mreynolds 2015-01-27 14:39:13 UTC
Verification Steps:

[1]  Create two instances using "dc=example,dc=com" - replica A and replica B
[2]  Setup Multi-Master Replication(MMR) between the two servers
[3]  On Replica A create a new attribute "myAttribute" that is single valued (SINGLE-VALUE)

ldapmodify ...
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( myAttribute-oid NAME 'myAttribute'  SYNTAX 1.3.6.1.4.1.1466.
 115.121.1.38 SINGLE-VALUE X-ORIGIN 'user defined' )

[4]  On Replica B create a new attribute with the same name "myAttribute", but it should be multi-valued (no SINGLE-VALUE)

ldapmodify ...
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( myAttribute-oid NAME 'myAttribute'  SYNTAX 1.3.6.1.4.1.1466.
 115.121.1.38 X-ORIGIN 'user defined' )


[5]  Add a dummy entry on Replica A to trigger replication, and the schema push.
[6]  Check the Replica B 'myAttribute" is still "multi-valued" or unchanged - meaning the attribute value does not contain "SINGLE-VALUE":

attributeTypes: ( myAttribute-oid NAME 'myAttribute'  SYNTAX 1.3.6.1.4.1.1466.
 115.121.1.38 X-ORIGIN 'user defined' )

[7]  On Replica A, the attributeTypes value should be changed to be multi-valued (no SINGLE-VALUE):

attributeTypes: ( myAttribute-oid NAME 'myAttribute'  SYNTAX 1.3.6.1.4.1.1466.
 115.121.1.38 X-ORIGIN 'user defined' )

So both Replica A & B should have the same attributeTypes value for "myAttribute" (no "SINGLE-VALUE")

[8] Done

Comment 5 Viktor Ashirov 2015-01-27 16:57:33 UTC
Mark, thank you for the verification steps!

$ rpm -qa | grep 389
389-ds-base-1.3.3.1-12.el7.x86_64
389-ds-base-debuginfo-1.3.3.1-12.el7.x86_64
389-ds-base-libs-1.3.3.1-12.el7.x86_64

[1]  Create two instances using "dc=example,dc=com" - replica A and replica B
[2]  Setup Multi-Master Replication(MMR) between the two servers
[3]  On Replica A create a new attribute "myAttribute" that is single valued (SINGLE-VALUE)
$ ldapmodify -D "cn=Directory Manager" -w Secret123 -H ldap://localhost:1189 -a << EOF
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( myAttribute-oid NAME 'myAttribute'  SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 SINGLE-VALUE X-ORIGIN 'user defined' )
EOF
modifying entry "cn=schema"

[4]  On Replica B create a new attribute with the same name "myAttribute", but it should be multi-valued (no SINGLE-VALUE)
$ ldapmodify -D "cn=Directory Manager" -w Secret123 -H ldap://localhost:1289 -a << EOF
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( myAttribute-oid NAME 'myAttribute'  SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 X-ORIGIN 'user defined' )
EOF
modifying entry "cn=schema"

[5]  Add a dummy entry on Replica A to trigger replication, and the schema push.
$ ldapmodify -D "cn=Directory Manager" -w Secret123 -H ldap://localhost:1189 -a << EOF
dn: cn=user1,ou=People,dc=example,dc=com
objectClass: person
objectClass: top
cn: user1
sn: user1
EOF
adding new entry "cn=user1,ou=People,dc=example,dc=com"

[6]  Check the Replica B 'myAttribute" is still "multi-valued" or unchanged - meaning the attribute value does not contain "SINGLE-VALUE":
$ ldapsearch -D "cn=Directory Manager" -w Secret123 -H ldap://localhost:1189  -LLL -o ldif-wrap=no -b "cn=schema" -s base "objectclass=*" nscpEntryWSI | grep myAttribute
nscpEntryWSI: attributeTypes: ( myAttribute-oid NAME 'myAttribute'  SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 X-ORIGIN 'user defined' )

[7]  On Replica A, the attributeTypes value should be changed to be multi-valued (no SINGLE-VALUE):
$ ldapsearch -D "cn=Directory Manager" -w Secret123 -H ldap://localhost:1289  -LLL -o ldif-wrap=no -b "cn=schema" -s base "objectclass=*" nscpEntryWSI | grep myAttribute
nscpEntryWSI: attributeTypes: ( myAttribute-oid NAME 'myAttribute'  SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 X-ORIGIN 'user defined' )

Both Replica A & B have the same attributeTypes value for "myAttribute" (no "SINGLE-VALUE"). Hence marking as VERIFIED.

Comment 7 errata-xmlrpc 2015-03-05 09:33:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0416.html


Note You need to log in before you can comment on or make changes to this bug.