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 1538184 - IDM replica install failing with "ldap_modify: Insufficient access (50)"
Summary: IDM replica install failing with "ldap_modify: Insufficient access (50)"
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-24 15:33 UTC by aheverle
Modified: 2021-03-11 17:00 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-20 16:36:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description aheverle 2018-01-24 15:33:46 UTC
Description of problem:
Attempting to install IDM replicas and they are failing with the error:

ldap_modify: Insufficient access (50)
        additional info: Insufficient 'write' privilege to the 'objectClasses' attribute of entry 'cn=schema'.

Version-Release number of selected component (if applicable):
ipa-server-4.5.0-22.el7_4.x86_64 

How reproducible:


Steps to Reproduce:
1. # ipa-replica-install --principal admin --admin-password ********* --setup-ca


Actual results:
Install fails

Expected results:
Install successful

Additional info:
Tried setting SELinux to permissive.

umask is set to 0022 on the master and attempted replica

 [root@idm1 ~]#  ll -lZ /usr/share/ipa/schema-update.ldif
-rw-r--r--. root root system_u:object_r:usr_t:s0       /usr/share/ipa/schema-update.ldif

Comment 10 Rob Crittenden 2018-01-24 18:59:58 UTC
Note that I see the same bind even on a successful installation:

2018-01-24T18:51:40Z DEBUG stderr=ldap_initialize( ldapi://%2Fvar%2Frun%2Fslapd-EXAMPLE-COM.socket/??base )
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0

Comment 11 thierry bordaz 2018-01-25 08:31:29 UTC
Before adding the new sasl mapping installer also deleted the previous mapping

[23/Jan/2018:10:07:06.641219650 -0500] conn=2 op=3 DEL dn="cn=Kerberos uid mapping,cn=mapping,cn=sasl,cn=config"
[23/Jan/2018:10:07:06.643693427 -0500] conn=2 op=3 RESULT err=0 tag=107 nentries=0 etime=0
[23/Jan/2018:10:07:06.643852904 -0500] conn=2 op=4 DEL dn="cn=Peer Master,cn=mapping,cn=sasl,cn=config"
[23/Jan/2018:10:07:06.646315724 -0500] conn=2 op=4 RESULT err=0 tag=107 nentries=0 etime=0
[23/Jan/2018:10:07:06.646473424 -0500] conn=2 op=5 DEL dn="cn=rfc 2829 dn syntax,cn=mapping,cn=sasl,cn=config"
[23/Jan/2018:10:07:06.648993236 -0500] conn=2 op=5 RESULT err=0 tag=107 nentries=0 etime=0
[23/Jan/2018:10:07:06.649144789 -0500] conn=2 op=6 DEL dn="cn=rfc 2829 u syntax,cn=mapping,cn=sasl,cn=config"
[23/Jan/2018:10:07:06.651591998 -0500] conn=2 op=6 RESULT err=0 tag=107 nentries=0 etime=0
[23/Jan/2018:10:07:06.651745071 -0500] conn=2 op=7 DEL dn="cn=uid mapping,cn=mapping,cn=sasl,cn=config"
[23/Jan/2018:10:07:06.654147130 -0500] conn=2 op=7 RESULT err=0 tag=107 nentries=0 etime=0
[23/Jan/2018:10:07:06.654708862 -0500] conn=2 op=8 ADD dn="cn=Full Principal,cn=mapping,cn=sasl,cn=config"
[23/Jan/2018:10:07:06.657004209 -0500] conn=2 op=8 RESULT err=0 tag=105 nentries=0 etime=0
[23/Jan/2018:10:07:06.657564254 -0500] conn=2 op=9 ADD dn="cn=Name Only,cn=mapping,cn=sasl,cn=config"
[23/Jan/2018:10:07:06.659911039 -0500] conn=2 op=9 RESULT err=0 tag=105 nentries=0 etime=0



But this looks intentional

    def __configure_sasl_mappings(self):
        # we need to remove any existing SASL mappings in the directory as otherwise they
        # they may conflict.

The entry "uid=root,cn=users,cn=accounts,dc=ipa,dc=campllc,dc=org" matches one of the new mapping. Is it an entry added by the customer ?
Could we have a dump of this entry ?

Comment 13 thierry bordaz 2018-01-25 09:16:05 UTC
Indeed if for any reason, uid=root has gidNumber=uidNumber=0 it could take authentication in place of 'cn=directory manager'.

It could be a silent behavior if uid=root has enough rights on the main suffix. But during install, if you update schema you need to be DM.

Comment 22 Rob Crittenden 2018-01-25 19:40:23 UTC
It is failing with:

2018-01-25T18:19:03Z DEBUG The ipa-replica-install command failed, exception: HTTPError: 406 Client Error: Failed to validate message: No recipient matched the provided key["Failed: [ValueError('Decryption failed.',)]"]
2018-01-25T18:19:03Z ERROR 406 Client Error: Failed to validate message: No recipient matched the provided key["Failed: [ValueError('Decryption failed.',)]"]
2018-01-25T18:19:03Z ERROR The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information

Which sounds very much like https://pagure.io/freeipa/issue/7006 and was fixed by modifying the HBAC rules.

I think I'd start with a new upstream tool to check the custodia keys:

https://raw.githubusercontent.com/freeipa/freeipa/master/install/tools/ipa-custodia-check

# wget https://raw.githubusercontent.com/freeipa/freeipa/master/install/tools/ipa-custodia-check
# python ipa-custodia-check `hostname` --verbose


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