Bug 1268905

Summary: Internal DB Password Configuration breaks when password contains non-alphanum characters
Product: Red Hat CloudForms Management Engine Reporter: John Prause <jprause>
Component: ApplianceAssignee: Nick Carboni <ncarboni>
Status: CLOSED ERRATA QA Contact: Aziza Karol <akarol>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3.0CC: abellott, alsmith, cbolz, cpelland, dajohnso, jhardy, mfeifer, ncarboni, obarenbo, snansi
Target Milestone: GAKeywords: ZStream
Target Release: 5.4.4   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 5.4.4.1 Doc Type: Bug Fix
Doc Text:
In the previous version of CloudForms Management Engine, configuring the CFME appliance to use an internal database with a password could fail if the password contained non-alpha numeric characters ([^a-zA-Z0-9]). This bug was caused by using shell quoting, which did not escape the database password correctly. This issue was resolved by using pg gem, which escaped the password correctly, to create the root database role. Non-alpha numeric character passwords can be used as expected in the latest version of CloudForms Management Engine.
Story Points: ---
Clone Of: 1267698 Environment:
Last Closed: 2015-12-16 13:19:41 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: 1267698    
Bug Blocks:    

Comment 3 CFME Bot 2015-10-08 20:55:09 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=7f22fce0000acba0c55461b6074490acc511dbfc

commit 7f22fce0000acba0c55461b6074490acc511dbfc
Author:     Nick Carboni <ncarboni>
AuthorDate: Tue Oct 6 13:59:40 2015 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Tue Oct 6 13:59:40 2015 -0400

    Moving pg gem to lib/Gemfile
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1268905

 lib/Gemfile  | 1 +
 vmdb/Gemfile | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Comment 4 CFME Bot 2015-10-08 20:55:14 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=07447434ced7246f9c204a54d693cc52021e81dd

commit 07447434ced7246f9c204a54d693cc52021e81dd
Author:     Nick Carboni <ncarboni>
AuthorDate: Tue Oct 6 14:00:02 2015 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Tue Oct 6 14:00:02 2015 -0400

    Using pg gem to create root database role
    
    This allows us to properly escape the password using the pg gem
    rather than dealing with shell quoting and escaping rules.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1268905

 lib/appliance_console/internal_database_configuration.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comment 5 CFME Bot 2015-10-08 20:55:19 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=819252a13b9def23768f9f1a08e1cdcb260f05f9

commit 819252a13b9def23768f9f1a08e1cdcb260f05f9
Merge: 202a263 0744743
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Thu Oct 8 16:49:22 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Thu Oct 8 16:49:22 2015 -0400

    Merge branch 'backport_psql_quoting_fix' into '5.4.z'
    
    Backport psql quoting fix
    
    Using pg gem to create root database role
    
    This allows us to properly escape the password using the pg gem
    rather than dealing with shell quoting and escaping rules.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1268905
    
    See merge request !281

 lib/Gemfile                                              | 1 +
 lib/appliance_console/internal_database_configuration.rb | 5 ++++-
 vmdb/Gemfile                                             | 1 -
 3 files changed, 5 insertions(+), 2 deletions(-)

Comment 7 Aziza Karol 2015-12-09 11:46:35 UTC
Verified in 5.4.4.2.20151130143928_89a28ce with password "!@#$"

The DB was configured successfully.

Comment 9 errata-xmlrpc 2015-12-16 13:19:41 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/RHSA-2015-2620.html