Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2122444

Summary: [Machines] The appearance of password quality check is different after some extra steps when creating vm with cloud base image
Product: Red Hat Enterprise Linux 9 Reporter: Xianghua Chen <xchen>
Component: cockpit-machinesAssignee: Simon Kobyda <skobyda>
Status: CLOSED ERRATA QA Contact: Xianghua Chen <xchen>
Severity: low Docs Contact:
Priority: unspecified    
Version: 9.1CC: kkoukiou, mmarusak, mpitt, qzhang, wshi, ymao, yunyang
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cockpit-machines-284-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:34:03 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: 284
Embargoed:

Description Xianghua Chen 2022-08-30 03:22:40 UTC
Description of problem:
[Machines] The appearance of password quality check is different after some extra steps when creating vm with cloud base image
 
Packages:
cockpit-machines-273-1.el9.noarch
cockpit-275-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-daemon-8.5.0-5.el9.x86_64

How reproducible:
100%

Steps:
1 Prepare a cloud image like:
rhel-guest-image-9.0-20220420.0.x86_64.qcow2

2 Click "Create VM", on Details tab, configure as following:
Installation type:   "Cloud base image" 
Installation source: the image file prepared in step1 
Operating system:Red Hat Enterprise Linux 9 Unknown (9-unknown Plow)

3 Click Automation tab, input simple password like: redhat
There will be pink bar under the password bar imply that the password is not strong.
Then clear the password just input, the pink bar changed back to blue bar.

4. Then input user login as: test123
Leave other fields blank, click "Create and run"
The "Create and run" is disabled , and there is an error:
User password must not be empty when user login is set

5. Fill in the "Uder password" like : redhat
There will be pink bar and an error message under it:
Password quality check failed: The password is shorter than 8 characters
Clear the password, error message change back to step4 which is correct.

6. Fill in "Root password" like : redhat
There will be pink bar and an error message under it:
Password quality check failed: The password is shorter than 8 characters
Clear the root password just input, the error messange is still there

Actual results:
As shown in step5 & step6

Expected results:
1. In step 5, it has error message shown compare to step3. Actually the error message is ok to me, just the apperance should be consistent with step3 no matter there is step4 or not.
2. In step 6, the error message should disappear after clear the password.

Additional info:

Comment 1 Matej Marušák 2022-09-08 13:41:25 UTC
Upstream fix: https://github.com/cockpit-project/cockpit-machines/pull/804

Comment 4 Xianghua Chen 2022-11-02 07:25:54 UTC
I don't think it has been fixed ,and it also introduced new problem. I tried with :
cockpit-machines-276-1.el9.noarch

Steps:
1 Prepare a cloud image like:
rhel-guest-image-9.0-20220420.0.x86_64.qcow2

2 Click "Create VM", on Details tab, configure as following:
Installation type:   "Cloud base image" 
Installation source: the image file prepared in step1 
Operating system:Red Hat Enterprise Linux 9 Unknown (9-unknown Plow)

3 Click Automation tab, input simple root password like: redhat
There will be pink bar under the password bar imply that the password is not strong.
Then clear the password just input, the pink bar changed back to blue bar.

4. Then input user login as: test123
Leave other fields blank, click "Create and run"
The "Create and run" is disabled , and there is an error under User password:
User password must not be empty when user login is set   --->>> This is correct

There is an error under "Root password":
   Password quality check failed: The password is shorter than 8 characters
1) And if you input password like 'redhat', and clear user login field,  then "Create and run" is still disabled and we can not create the vm with only weak root password which is not the same with step3.
2) If you input an Excellent password, the error is gone , but then "Create and run" is still disabled and we can not create the vm too
3) Then if you clear the root password, the error is still there, which should be cleared.
4) But if you didn't execute step 3, you won't see this problem...
5) If you input an excellent password, then clear the error gone and back to blue bar
----->>> Please check this part carefully

5. Fill in the "Uder password" like : redhat
There will be pink bar and an error message under it:
Password quality check failed: The password is shorter than 8 characters 
----->>> it didn't enable "create and run" with weak password or excellent password, which is not correct.

Clear the password, error message change back to step4 which is correct.

Comment 16 Xianghua Chen 2023-02-27 13:01:10 UTC
Verified with packages:
cockpit-machines-284-1.el9.noarch
cockpit-286-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-daemon-9.0.0-7.el9.x86_64

Steps:
1 Prepare a cloud image like:
rhel-guest-image-9.2-20230223.23.x86_64.qcow2

2 Click "Create VM", on Details tab, configure as following:
Installation type:   "Cloud base image"
Installation source: the image file prepared in step1
Operating system:Red Hat Enterprise Linux 9 Unknown (9-unknown Plow)

3 Click Automation tab, input simple password like: redhat
There will be pink bar under the password bar imply that the password is not strong.
Then clear the password just input, the pink bar changed back to blue bar.

4. Then input user login as: test123
Leave other fields blank, click "Create and run"
The "Create and run" is disabled , and there is an error:
User password must not be empty when user login is set

5. Fill in the "User password" like : redhat
There will be pink bar and an error message under it:
Password quality check failed: The password is shorter than 8 characters
The  "Create and run" is enabled.

Clear the password, error message change back to step4 which is correct and "Create and run" is disabled again.
Re-input redhat, and click "Create and run", the vm can be created.

6. Repeat step 2-4, clear "User login" and fill in "Root password" like : redhat
There will be pink bar and an error message under it:
Password quality check failed: The password is shorter than 8 characters
Clear the root password just input, the pink bar changed back to blue bar and error message dissappeared.

Re-input redhat, and click "Create and run", the vm can be created.


So verified.

Comment 18 errata-xmlrpc 2023-05-09 07:34:03 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 (cockpit-machines 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:2211

Comment 19 Red Hat Bugzilla 2023-09-19 04:25:14 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days