Bug 1214925

Summary: Foreman UI - password length must be 8 characters or more
Product: Red Hat CloudForms Management Engine Reporter: Jan Krocil <jkrocil>
Component: ProvisioningAssignee: Greg McCullough <gmccullo>
Status: CLOSED ERRATA QA Contact: Jan Krocil <jkrocil>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4.0CC: hkataria, jhardy, mpovolny, obarenbo
Target Milestone: GA   
Target Release: 5.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-16 12:59:49 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 Jan Krocil 2015-04-23 20:53:54 UTC
Description of problem:
User is able to set password shorter than 8 chars in the provisioning dialog.
Foreman api returns error 422 and the provisioning request fails.

Version-Release number of selected component (if applicable):
5.4.0.0.22

How reproducible:
Always

Steps to Reproduce:
1. Setup foreman
2. During provisioning, set pass shorter than 8 chars

Actual results:
CFME side:
----------
[----] E, [2015-04-23T16:25:35.060804 #2247:12bdea4] ERROR -- : Q-task_id([miq_provision_task_1])
 MIQ(MiqProvisionTaskConfiguredSystemForeman#provision_error) [[RestClient::UnprocessableEntity]:
 422 Unprocessable Entity] encountered during phase [update_configuration]


Foreman side:
-------------
Processing by Api::V2::HostsController#update as JSON
  Parameters: {"host"=>{"hostgroup_id"=>"1", "root_pass"=>"[FILTERED]"}, "apiv"=>"v2", "id"=>"3"}
Authorized user admin(Admin User)
Unprocessable entity Host::Managed (id: 3):
  Root password should be 8 characters or more

  Rendered api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout (3.1ms
)
Completed 422 Unprocessable Entity in 7000ms (Views: 72.0ms | ActiveRecord: 89.2ms)


Expected results:
If the user chooses to pick a password, he/she must not be allowed to set one that is shorter than 8 characters.

Additional info:
-

Comment 2 CFME Bot 2015-04-29 19:19:56 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/96e582a989cd152c53b84469e45b533987102689

commit 96e582a989cd152c53b84469e45b533987102689
Author:     Greg McCullough <gmccullo>
AuthorDate: Wed Apr 29 10:25:41 2015 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Wed Apr 29 10:25:41 2015 -0400

    Add note to Foreman provision dialog password field for minimum length
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1214925

 .../miq_dialogs/miq_provision_configured_system_foreman_dialogs.yaml     | 1 +
 1 file changed, 1 insertion(+)

Comment 4 Jan Krocil 2015-05-07 11:11:58 UTC
Blocked by BZ#1219439.

Comment 5 Jan Krocil 2015-05-12 09:48:33 UTC
Verified fixed in 5.4.0.0.26 - 5.4.0.0.26.20150511144816_f924bd4.

Comment 7 errata-xmlrpc 2015-06-16 12:59:49 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, 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://rhn.redhat.com/errata/RHBA-2015-1100.html