Bug 1203260

Summary: Installer removes default $REALM_NAME from mgmt-users.properties files
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Petr Kremensky <pkremens>
Component: InstallerAssignee: Thomas Hauser <thauser>
Status: CLOSED WONTFIX QA Contact: Petr Kremensky <pkremens>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: cdewolf, darran.lofthouse, mkopecky
Target Milestone: ---   
Target Release: TBD EAP 7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 11:25:54 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 Petr Kremensky 2015-03-18 13:33:36 UTC
Description of problem:
 Installer removes the default content of mgmt-users.properties which, among other things, contains default realm name used by add-user utility.
  - $INSTALLATION_TARGET/standalone/configuration/mgmt-users.properties
  - $INSTALLATION_TARGET/domain/configuration/mgmt-users.properties

Version-Release number of selected component (if applicable):
 6.4.0.CR1

How reproducible:
 Always

Steps to Reproduce:
 1. java -jar jboss-eap-6.4.0.CR1-installer.jar
 2. finish installation using default values where possible
 3. vim $INSTALLATION_TARGET/standalone/configuration/mgmt-users.properties

Actual results:
$ cat EAP-6.4.0/standalone/configuration/mgmt-users.properties 
admin=6b9d4d6d0293f023f66c51d8b70392d8

It would be nice to preserve most of the content and remove just last paragraph, since there are some useful information.
Expected results:
$ cat jboss-eap-6.4/standalone/configuration/mgmt-users.properties 
#
# Properties declaration of users for the realm 'ManagementRealm' which is the default realm
# for new installations. Further authentication mechanism can be configured
# as part of the <management /> in standalone.xml.
#
# Users can be added to this properties file at any time, updates after the server has started
# will be automatically detected.
#
# By default the properties realm expects the entries to be in the format: -
# username=HEX( MD5( username ':' realm ':' password))
#
# A utility script is provided which can be executed from the bin folder to add the users: -
# - Linux
#  bin/add-user.sh
#
# - Windows
#  bin\add-user.bat
#
#$REALM_NAME=ManagementRealm$ This line is used by the add-user utility to identify the realm name already used in this file.
#
# On start-up the server will also automatically add a user $local - this user is specifically
# for local tools running against this AS installation.
#
admin=6b9d4d6d0293f023f66c51d8b70392d8

Additional info:
 Darran, can you please confirm that $REALM_NAME in these files is used only by add-user utility?

Comment 1 Carlo de Wolf 2015-03-19 11:25:54 UTC
Issues for EAP 7 must be filed at https://issues.jboss.org/browse/JBEAP

Comment 2 Darran Lofthouse 2015-03-19 12:22:17 UTC
For issues like this I would also say don't bother raising for EAP 7 - this is an area under active development and marked as deprecated in EAP 6.4.