Bug 1950468

Summary: root_pass setting does not enforce minimum length of 8 characters as the host and hostgroups forms do
Product: Red Hat Satellite Reporter: Taft Sanders <tasander>
Component: SettingsAssignee: nalfassi
Status: CLOSED ERRATA QA Contact: visawant
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: apatel, inecas, kgaikwad, mhulan, nalfassi, pcreech, tbrisker, vijsingh, visawant
Target Milestone: 6.13.0Keywords: Triaged, UserExperience
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman-3.4.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-03 13:20:33 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:

Description Taft Sanders 2021-04-16 16:58:07 UTC
Description of problem:
Satellite host groups require an 8 character minimum password setting. Satellite settings > Provisioning > root_pass, has no minimum requirement.

Version-Release number of selected component (if applicable):
satellite-6.8.6-1

How reproducible:
every time

Steps to Reproduce:
1. Create a host group and set a password of fewer than 8 characters
2. Set a password in the Satellite settings > Provisioning > root_pass, of less than 8 characters
3.

Actual results:
Host group can't have a password of fewer than 8 characters

Expected results:
Host group root password minimum requirements should match that of the Satellite settings

Additional info:
A user is also not able to unset a password in a host group to allow for use of the default password from Satellite settings > Provisioning > root_pass

Comment 1 Tomer Brisker 2021-07-01 09:12:34 UTC
Looks like unsetting a hostgroup password does not work only if the root_pass setting is set to less than 8 characters. Since we require 8 characters both in host and hostgroup, it probably makes sense to also enforce the same requirement for the setting. Moving to Settings component.

Comment 2 Tomer Brisker 2021-07-01 09:16:48 UTC
Created redmine issue https://projects.theforeman.org/issues/32925 from this bug

Comment 3 nalfassi 2022-07-07 12:47:34 UTC
(In reply to Tomer Brisker from comment #1)
> Looks like unsetting a hostgroup password does not work only if the
> root_pass setting is set to less than 8 characters. Since we require 8
> characters both in host and hostgroup, it probably makes sense to also
> enforce the same requirement for the setting. Moving to Settings component.

I checked this on Sattelite 6.11 and this no longer happens. Meaning that the user can unset a hostgroup password (even if it's less than 8 characters).

Comment 4 Bryan Kearney 2022-07-10 16:03:22 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32925 has been resolved.

Comment 5 Marek Hulan 2022-07-12 08:13:55 UTC
Cool, thanks for the confirmation Nofar, so the fix that is delivered is actually a validation on the setting.

For QE:
1) Navigate to Administer -> Settings -> Provisioning -> Root password
2) try setting a password shorter than 8 chars, it should not allow you that
3) it still must be possible to set an empty password, users may want to configure it on host group or host level

Comment 11 errata-xmlrpc 2023-05-03 13:20:33 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 (Important: Satellite 6.13 Release), 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/RHSA-2023:2097