Bug 1314731 - Installer: correction of users credentials and selecting use.same.password=true problem
Installer: correction of users credentials and selecting use.same.password=tr...
Status: CLOSED CURRENTRELEASE
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Installer (Show other bugs)
6.3.0
Unspecified Unspecified
urgent Severity urgent
: ER3
: 6.3.0
Assigned To: Thomas Hauser
Jan Stastny
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-04 06:02 EST by Jan Stastny
Modified: 2016-08-24 07:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-24 07:44:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Stastny 2016-03-04 06:02:37 EST
Description of problem:
When navigating through console and GUI installers, user can configure users' credentials for the DV instance. The installers enable a user to revisit this configuration and alter it.
In GUI, you can navigate with 'Next' and 'Back' buttons.
In console, you can select '3 to redisplay' before leaving the users credentials page.

And there is an issue, when:
1. user defines each user with specific password
2. revisits the configuration after that
3. changes to use 'use.same.password' option (GUI/console)
4. completes the installer

Obviously you can examine the problem only when adminPassword is different than all other passwords in step 1.

Result:
Users other that admin have the original passwords from 1., even though these values should have been replaced by values from 3.

Moreover console installer results in incorrect auto.xml script. Problematic are <entry autoPrompt="true"> elements, which shouldn't be there but for adminUser:
<userInput>
<entry key="use.same.password" value="true"/>
<entry key="addUser" value="true"/>
<entry key="adminUser" value="admin"/>
<entry autoPrompt="true" key="adminPassword"/>
<entry key="Dashboard.admin.username" value="dashboardAdmin"/>
<entry autoPrompt="true" key="Dashboard.admin.password"/>
<entry key="Teiid.user.username" value="teiidUser"/>
<entry autoPrompt="true" key="Teiid.user.password"/>
<entry key="Teiid.user.odata" value=""/>
<entry key="Teiid.user.logging" value=""/>
<entry key="Modeshape.user" value="modeshapeUser"/>
<entry autoPrompt="true" key="Modeshape.password"/>
</userInput>


Version-Release number of selected component (if applicable):
DV 6.3.0 ER1.1


Steps to Reproduce:
1. user defines each user with specific password
2. revisits the configuration after that
3. changes to use 'use.same.password' option (GUI/console)

Actual results:
The former passwords are saved.

Expected results:
The altered passwords should be saved.
Comment 1 Thomas Hauser 2016-03-09 13:46:09 EST
Reproduced. Passwords are still used even when the user has chosen to use one password.
Comment 2 Thomas Hauser 2016-03-09 15:51:04 EST
Fixed for ER2.
Comment 3 Jan Stastny 2016-04-22 01:54:36 EDT
This problem was fixed only for GUI installer, not console even though reported for both. If user installs server through console installer, wrong install script gets generated.

1. Start console installer
2. Navigate to the users credentials page
3. Don't check use same password
4. Provide some password to each user
5. While prompted '3 to redisplay' select '3'
6. Check use same password
7. Insert the admin's password (I used different than any other password before)
8. Insert other required fields (no other passwords are prompted for)
9. Finish the installer using defaults
10. Generate the install script
11. Try to install via the install script and in variables, or variableFile provide only password for admin user (that's the only the installer required)
12. Auto install will hang on prompt for Dashboard admin password.

The problem is caused by multiple <entry autoPrompt="true" ...> elements in resulting auto.xml script (only one autoPrompt should be here - for adminPassword):

<com.izforge.izpack.panels.UserInputPanel id="security">
<userInput>
<entry key="use.same.password" value="true"/>
<entry key="adminUser" value="admin"/>
<entry autoPrompt="true" key="adminPassword"/>
<entry key="Dashboard.admin.username" value="dashboardAdmin"/>
<entry autoPrompt="true" key="Dashboard.admin.password"/>
<entry key="Teiid.user.username" value="teiidUser"/>
<entry autoPrompt="true" key="Teiid.user.password"/>
<entry key="Teiid.user.odata" value=""/>
<entry key="Teiid.user.logging" value=""/>
<entry key="Modeshape.user" value="modeshapeUser"/>
<entry autoPrompt="true" key="Modeshape.password"/>
</userInput>
</com.izforge.izpack.panels.UserInputPanel>
Comment 4 Thomas Hauser 2016-04-27 16:39:43 EDT
This was actually two separate problems.

1) Problems in the installation library Console code that was not correctly keeping track of which data should be written to auto.xml. This results in the problem experienced in the latest comment even with the fix for the other issue below

2) Master password setting code not always doing the correct thing when encountering a password with an already existing value. 

With both of these corrected, auto.xml from console / gui are equivalent, and the original issue of having the incorrect password used for each user is also fixed.

Issue 1) actually also affected the Advanced Configuration panel in a similar manner (select advanced options, redo the panel and select default, advanced config options chosen still appear in the auto.xml). The implemented fix addresses this as well.

Note You need to log in before you can comment on or make changes to this bug.