Bug 2127035

Summary: Attempt to log in as "root" user with admin's password in Web UI does not properly fail
Product: Red Hat Enterprise Linux 8 Reporter: Florence Blanc-Renaud <frenaud>
Component: ipaAssignee: Florence Blanc-Renaud <frenaud>
Status: CLOSED ERRATA QA Contact: Michal Polovka <mpolovka>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.6CC: abokovoy, gkaihoro, ipa-qe, ivan.brkic, mjurasek, mrehak, mvarun, pasik, rcritten, rjeffman, sumenon, tscherf
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ipa-4.9.10-8.module+el8.8.0+17351+9a3fb056 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2124547
: 2133050 2133051 (view as bug list) Environment:
Last Closed: 2023-05-16 08:28:45 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:
Bug Depends On: 2124547    
Bug Blocks: 2133050, 2133051    

Description Florence Blanc-Renaud 2022-09-15 07:04:27 UTC
+++ This bug was initially created as a clone of Bug #2124547 +++

Description of problem:

The login page on Web UI for the Identity Management exhibits strange behaviour when attempting to log in as user "root" and password specified for the "admin" default administrator user.

When attempting to log in this way, the login attempt isn't denied as it should be but the Web UI goes into a loop of trying to log in and failing, displaying only a "Loading" box on a black background.


Version-Release number of selected component (if applicable):
ipa-server-4.9.8-7.el9_0.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Set up and install ip-server with ipa-server-dns component on a RHEL9 minimal install server.
2. Open a private browsing session of Firefox or Chrome (because the login attempt gets cached)
3. Attempt to log in to the ipa web UI with username "root" and password set for the "admin" user.


Actual results:
The login attempt does not fail. The page goes into a loop reloading the page, displaying a "Loading" box and no content. The attempted credentials are cached by the browser and any attempt to open the web page results in this loading loop. Closing the tab and going to the same URL results in the same "Loading" loop. Browser cache clearing is needed for the Web UI to display the login page.

Expected results:
Login attempt should fail with 
"The password or username you entered is incorrect"
since the "root" user does not exist in IdM/ipa

Additional info:
Bug does not appear in RHEL7 IdM login page.

I am initially flagging this as a security sensitive, since I don't know if this behaviour can potentially be used for something malicious. Feel free to remove the security flag if you don't find it to be a security vulnerability.

--- Additional comment from Alexander Bokovoy on 2022-09-07 12:51:37 UTC ---

We have handled this in upstream publicly, so this bug can be unclassified.

It should be fixed in RHEL 8.7/9.1 once they are out as part of the rebases.

--- Additional comment from Florence Blanc-Renaud on 2022-09-07 14:50:49 UTC ---

Upstream ticket:
https://pagure.io/freeipa/issue/9226

--- Additional comment from Florence Blanc-Renaud on 2022-09-07 14:52:43 UTC ---

Fixed upstream:

master:
https://pagure.io/freeipa/c/2ae316d4308d05fcac118212299fdd33d135179c

ipa-4-10:
https://pagure.io/freeipa/c/a0928fe164712303a7c24ee61500ac7326bd9e4a

ipa-4-9:
https://pagure.io/freeipa/c/109cd579e3b089b7fad4c92bf25594eba1af8a21

ipa-4-6:
https://pagure.io/freeipa/c/6536162634289509078700174b6f12962eadc4b5

Comment 7 Varun Mylaraiah 2022-12-22 06:51:00 UTC
Verified using existing automation with nightly build.

ipa-client-4.9.10-8.module+el8.8.0+17351+9a3fb056.x86_64
ipa-client-common-4.9.10-8.module+el8.8.0+17351+9a3fb056.noarch
ipa-common-4.9.10-8.module+el8.8.0+17351+9a3fb056.noarch
ipa-healthcheck-core-0.7-14.module+el8.7.0+15352+88b578e5.noarch
ipa-selinux-4.9.10-8.module+el8.8.0+17351+9a3fb056.noarch
ipa-server-4.9.10-8.module+el8.8.0+17351+9a3fb056.x86_64
ipa-server-common-4.9.10-8.module+el8.8.0+17351+9a3fb056.noarch
ipa-server-dns-4.9.10-8.module+el8.8.0+17351+9a3fb056.noarch
ipa-server-trust-ad-4.9.10-8.module+el8.8.0+17351+9a3fb056.x86_64


============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-3.10.1, py-1.11.0, pluggy-1.0.0 -- /usr/libexec/platform-python
cachedir: /home/cloud-user/.pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-445.el8.x86_64-x86_64-with-redhat-8.8-Ootpa', 'Packages': {'pytest': '3.10.1', 'py': '1.11.0', 'pluggy': '1.0.0'}, 'Plugins': {'metadata': '1.11.0', 'html': '1.22.1', 'multihost': '3.0', 'sourceorder': '0.6.0'}}
rootdir: /usr/lib/python3.6/site-packages/ipatests, inifile:
plugins: metadata-1.11.0, html-1.22.1, multihost-3.0, sourceorder-0.6.0
collecting ... collected 5 items

test_webui/test_loginscreen.py::TestLoginScreen::test_reset_password_view PASSED [ 20%]
test_webui/test_loginscreen.py::TestLoginScreen::test_reset_password_view_with_redirect PASSED [ 40%]
test_webui/test_loginscreen.py::TestLoginScreen::test_reset_password_view_with_delayed_redirect PASSED [ 60%]
test_webui/test_loginscreen.py::TestLoginScreen::test_reset_password_and_login_view PASSED [ 80%]
test_webui/test_loginscreen.py::TestLoginScreen::test_login_view PASSED  [100%]

Based on the test result, marking the bug VERIFIED.

Comment 10 errata-xmlrpc 2023-05-16 08:28:45 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 (idm:client and idm:DL1 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-2023:2794