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 1999992 - ipa migrate-ds command fails to warn when compat plugin is enabled
Summary: ipa migrate-ds command fails to warn when compat plugin is enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks: 2002285 2004165
TreeView+ depends on / blocked
 
Reported: 2021-09-01 07:12 UTC by Sudhir Menon
Modified: 2021-11-10 00:02 UTC (History)
6 users (show)

Fixed In Version: idm-client-8050020210913151510.de73ecb2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2002285 2004165 (view as bug list)
Environment:
Last Closed: 2021-11-09 18:29:52 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-6882 0 None None None 2021-09-22 14:25:11 UTC
Red Hat Issue Tracker RHELPLAN-95828 0 None None None 2021-09-01 07:13:05 UTC
Red Hat Product Errata RHBA-2021:4230 0 None None None 2021-11-09 18:30:16 UTC

Description Sudhir Menon 2021-09-01 07:12:11 UTC
Description of problem: ipa migrate-ds command fails to warn compat plugin is enabled

Version-Release number of selected component (if applicable):
ipa-server-4.9.6-4.module+el8.5.0+11912+1b4496cf.x86_64
389-ds-base-1.4.3.23-10.module+el8.5.0+12398+47000435.x86_64
pki-ca-10.11.0-2.module+el8.5.0+12220+9cc212a8.noarch
selinux-policy-3.14.3-79.el8.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install IPA server and client
2. Ensure enable-migration=TRUE in IPA server and compat plugin is enabled
3. Setup dsinstance on the IPA client and add users to the instance.
4. Run migrate-ds command on IPA client

Actual results:
Migration is done, and the warning is missing saying that 'compat plugin is enabled'.

[root@client ~]# echo password | ipa migrate-ds ldap://client.rhel85.test:389 > /tmp/compatenabled1.out
-----------
migrate-ds:
-----------
Migrated:
  user: puser1
  group: demo_group, group1, group2, hr managers, qa managers, pd managers, accounting managers
Failed user:
Failed group:
----------
Passwords have been migrated in pre-hashed format.
IPA is unable to generate Kerberos keys unless provided
with clear text passwords. All migrated users need to
login at https://your.domain/ipa/migration/ before they
can use their Kerberos accounts.

Expected results:
Warning needs to be displayed for compat plugin being enabled.

Additional info: 
https://bugzilla.redhat.com/show_bug.cgi?id=783270#c6

Comment 2 Florence Blanc-Renaud 2021-09-01 09:12:05 UTC
The migrate-ds plugin is doing an internal ldapsearch in order to find if the compat plugin is enabled, equivalent to
ldapsearch -Y GSSAPI -b cn=compat,$SUFFIX -s base "(objectClass=*)" * aci

This search does not return any entry, and the plugin considers that the compat tree is not enabled.

This looks similar to https://bugzilla.redhat.com/show_bug.cgi?id=1958909 except that 1958909 was fixed for base searches below cn=compat,$SUFFIX (for instance -b cn=admins,cn=groups,cn=compat,$SUFFIX). It seems that the fix was not sufficient:
# ldapsearch -LLL -o ldif-wrap=no  -D cn=directory\ manager -w Secret123 -b cn=compat,dc=ipa,dc=test -s base "(objectClass=*)"
No such object (32)
Matched DN: dc=ipa,dc=test
# rpm -qa ipa-server slapi-nis
ipa-server-4.9.6-4.module+el8.5.0+11912+1b4496cf.x86_64
slapi-nis-0.56.6-3.module+el8.5.0+11645+9d3a3007.x86_64


On IPA side, we can check if compat plugin is enabled by reading the entry cn=Schema Compatibility,cn=plugins,cn=config: if the attribute "nsslapd-pluginEnabled" is set to on, then the plugin is enabled.

Comment 3 Florence Blanc-Renaud 2021-09-01 09:49:05 UTC
Opened https://bugzilla.redhat.com/show_bug.cgi?id=2000060 to track the base search on cn=compat,$SUFFIX issue.

We can either wait for a fix of 2000060, or modify migrate-ds code with a workaround (search -b cn=users,cn=compat,$SUFFIX -s base instead of search -b cn=compat,$SUFFIX -s base for instance).
Note that my previous suggestion (reading the entry cn=Schema Compatibility,cn=plugins,cn=config) would not work as this entry is protected by ACIs and only directory manager could read its content. Since migrate-ds is run with a kerberos ticket (usually admin), the entry would not be returned and migrate-ds would wrongly assume that the compat plugin is not enabled.

Comment 4 Florence Blanc-Renaud 2021-09-07 15:02:02 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/8984

Comment 5 Florence Blanc-Renaud 2021-09-08 08:25:42 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/2ba3028b968f8d3c27980c9921c0c08b29d024e9

Comment 6 Florence Blanc-Renaud 2021-09-08 12:47:43 UTC
Fixed upstream
ipa-4-9:
https://pagure.io/freeipa/c/3c4f9e7347965ff9a887147df34e720224ffa7cc

Comment 9 Florence Blanc-Renaud 2021-09-09 08:30:51 UTC
Removing "depends on" as a workaround has been implemented in the fix for this BZ.

Comment 18 errata-xmlrpc 2021-11-09 18:29:52 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 (ipa bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2021:4230


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