Bug 2100916
| Summary: | ipa user login with otp fails with error 'Preauthentication failed while getting initial credentials ' | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Sudhir Menon <sumenon> |
| Component: | libverto | Assignee: | Julien Rische <jrische> |
| Status: | CLOSED ERRATA | QA Contact: | anuja <amore> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.7 | CC: | frenaud, mpolovka, rcritten, tscherf |
| Target Milestone: | rc | Keywords: | Regression, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libverto-0.3.2-2.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-08 10:54:21 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Deadline: | 2022-07-11 | ||
|
Description
Sudhir Menon
2022-06-24 16:55:09 UTC
The journal shows an error in ipa-otpd with "Unable to initialize event loop". The issue seems related to the version of libverto available in RHEL 8.7.
The new ipa package (4.9.10) is initializing libverto with an additional flag: VERTO_EV_TYPE_CHILD [1].
On RHEL 8.7, libverto (0.3.0) is using libverto-libevent, while on RHEL 9.1 (where the issue doesn't happen), libverto (0.3.2) is using libverto-libev.
The spec file for RHEL 8.7 does not even compile libev [2]:
%if !0%{?rhel}
%package libev
Summary: libev module for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: %{name}-module-base = %{version}-%{release}
I tried to do a scratch build of libverto 0.3.2 and installation of libverto + libverto-libev on RHEL 8.7 and it seems to fix the issue.
Moving the bugzilla to libverto for futher analysis. A possible fix would be to rebase libverto to 0.3.2 in RHEL 8.7 and add a dependency on libverto-libev.
[1] https://pagure.io/freeipa/blob/61a64aef6dd0b884d968e72546b4adbd265f8404/f/daemons/ipa-otpd/main.c#_245-246
[2] http://pkgs.devel.redhat.com/cgit/rpms/libverto/tree/libverto.spec?h=rhel-8.7.0#n107
Interesting. I didn't get the event error on my test install and updating libverto doesn't fix it. The BIND is failing in ipa-otpd. Jun 24 14:31:29 ipa.example.test ipa-otpd[12977]: tuser: request received Jun 24 14:31:29 ipa.example.test ipa-otpd[12977]: tuser: user query start Jun 24 14:31:29 ipa.example.test ipa-otpd[12977]: tuser: user query end: uid=tuser,cn=users,cn=accounts,dc=example,dc=test Jun 24 14:31:29 ipa.example.test ipa-otpd[12977]: tuser: bind start: uid=tuser,cn=users,cn=accounts,dc=example,dc=test Jun 24 14:31:29 ipa.example.test ipa-otpd[12977]: tuser: bind end: Invalid credentials Jun 24 14:31:29 ipa.example.test ipa-otpd[12977]: tuser: response sent: Access-Reject 389-ds access log confirms [24/Jun/2022:14:31:29.673490666 -0400] conn=47 op=6 BIND dn="uid=tuser,cn=users,cn=accounts,dc=example,dc=test" method=128 version=3 [24/Jun/2022:14:31:29.673841183 -0400] conn=47 op=6 RESULT err=49 tag=97 nentries=0 wtime=0.000033733 optime=0.000358440 etime=0.000389191 FWIW: the KDC certificate issue is a red herring. It must show up during bootstrap. Never mind, I had removed otp from my test user's auth. I've confirmed that with the scratch build Flo did authentication works. The last version of ipa-otpd loads a libverto context with the VERTO_EV_TYPE_CHILD flag[1]. However, it is not supported by libverto-libevent[2]. It would require an upgrade to libverto-libev[3], which is provider in libverto 0.3.2 release. [1] https://pagure.io/freeipa/blob/master/f/daemons/ipa-otpd/main.c#_246 [2] https://github.com/latchset/libverto/blob/0.3.2/src/verto-libevent.c#L146 [3] https://github.com/latchset/libverto/blob/0.3.2/src/verto-libev.c#L153 Pre-verified using the automation from src/otp/test_0001_otp_master_tests.py::TestOTPfunction::test_otp_0001 and package libverto-0.3.2-2.el8.x86_64 Passed src/otp/test_0001_otp_master_tests.py::TestOTPfunction::test_otp_0001 Full log is an attachment of this BZ. Marking as pre-verified - tested. Verified using automation from src/otp/test_0001_otp_master_tests.py::TestOTPfunction::test_otp_0001 on RHEL8.7 machine. Passed src/otp/test_0001_otp_master_tests.py::TestOTPfunction::test_otp_0001 Complete test run log is an attachment of this BZ. Marking as verified. 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 (libverto 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-2022:7776 |