7.3.1. Create JBoss Management Users

To access the JBoss Web Management Interface, you must first create a management user that will be used to access it. Follow these steps on the JBoss domain controller:

  1. Execute the JBoss add_user script on the JBoss domain controller: JBOSS_HOME/bin/add_user.(bat|sh)

  2. Follow the prompts to create a management user for accessing the JBoss Web Management Interface. Answer the prompts as shown in bold:

    What type of user do you wish to add?
     a) Management User (mgmt-users.properties)
     b) Application User (application-users.properties)
    (a): a
    
    Enter the details of the new user to add.
    Using realm 'ManagementRealm' as discovered from the existing property files.
    Username : admin
    User 'admin' already exists and is enabled, would you like to...
     a) Update the existing user password and roles
     b) Disable the existing user
     c) Type a new username
    (a): a
    Password recommendations are listed below. To modify these restrictions edit the
     add-user.properties configuration file.
     - The password should be different from the username
     - The password should not be one of the following restricted values {root, admin, administrator}
     - The password should contain at least 8 characters, 1 alphabetic character(s),
       1 digit(s), 1 non-alphanumeric symbol(s)
    Password :
    Re-enter Password :
    What groups do you want this user to belong to? (Please enter a comma separated list,
     or leave blank for none)[  ]:
    Updated user 'admin' to file 
     '/home/ekm/node1/v182/programs/wildfly-10.0.0.Final/standalone/configuration/mgmt-users.properties'
    Updated user 'admin' to file
     '/home/ekm/node1/v182/programs/wildfly-10.0.0.Final/domain/configuration/mgmt-users.properties'
    Updated user 'admin' with groups _to file
     '/home/ekm/node1/v182/programs/wildfly-10.0.0.Final/standalone/configuration/mgmt-groups.properties'
    Updated user 'admin' with groups _to file
     '/home/ekm/node1/v182/programs/wildfly-10.0.0.Final/domain/configuration/mgmt-groups.properties'
    Is this new user going to be used for one AS process to connect to another AS process?
    e.g. for a slave host controller connecting to the master or for a Remoting connection
     for server to server EJB calls.
    yes/no? n
    Press any key to continue . . .
    

Next, you must create a management user for each JBoss slave. This management user will be used by the JBoss slave to communicate with the domain controller. These management users are created on the JBoss domain controller, and added to the host controller configuration on each JBoss slave.

Repeat the following steps for each JBoss slave:

  1. Execute the JBoss add_user script on the JBoss domain controller: JBOSS_HOME/bin/add_user.(bat|sh)

  2. Follow the prompts to create a management user for the JBoss slave. The example below demonstrates creating a management user named node2. Answer the prompts as shown in bold:

    What type of user do you wish to add?
     a) Management User (mgmt-users.properties)
     b) Application User (application-users.properties)
    (a): a
    
    Enter the details of the new user to add.
    Using realm 'ManagementRealm' as discovered from the existing property files.
    Username : node2
    Password recommendations are listed below. To modify these restrictions edit the
     add-user.properties configuration file.
     - The password should be different from the username
     - The password should not be one of the following restricted values {root, admin, administrator}
     - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s),
     1 non-alphanumeric symbol(s)
    Password :
    Re-enter Password :
    What groups do you want this user to belong to? (Please enter a comma separated list,
     or leave blank for none)[  ]:
    About to add user 'node2' for realm 'ManagementRealm'
    Is this correct yes/no? y
    Added user 'node2' to file
     '/home/ekm/node1/v182/programs/wildfly-10.0.0.Final/standalone/configuration/mgmt-users.properties'
    Added user 'node2' to file
     '/home/ekm/node1/v182/programs/wildfly-10.0.0.Final/domain/configuration/mgmt-users.properties'
    Added user 'node2' with groups _to file
     '/home/ekm/node1/v182/programs/wildfly-10.0.0.Final/standalone/configuration/mgmt-groups.properties'
    Added user 'node2' with groups _to file
     '/home/ekm/node1/v182/programs/wildfly-10.0.0.Final/domain/configuration/mgmt-groups.properties'
    
    Is this new user going to be used for one AS process to connect to another AS process?
    e.g. for a slave host controller connecting to the master or for a Remoting connection
     for server to server EJB calls.
    yes/no? y
    To represent the user add the following to the server-identities definition
     <secret value="bm9kZTIhMTIz"/>
    
  3. On the JBoss slave, add the management user to the host controller configuration. The management user is added as shown in bold:

    <management>
       <security-realms>
          <security-realm name="ManagementRealm">
             <server-identities>
                <secret value="bm9kZTIhMTIz"/>
    	       </server-identities>
    

When the EKM cluster nodes are started, JBoss slaves will register themselves with the JBoss domain controller, as shown in the logs below.

JBoss domain controller (node1):

[Host Controller] 15:00:02,758 INFO
[org.jboss.as.domain.controller] (Host Controller Service 
Threads - 26) WFLYHC0019: Registered remote slave host "node2",
JBoss WildFly Full 10.0.0.Final (WildFly 2.0.10.Final)

JBoss slave (node 2):

[Host Controller] 15:00:05,774 INFO
[org.jboss.as.host.controller] (server-registration-threads - 1)
WFLYHC0020: Registering server node2

Release 18.2 - © ANSYS, Inc. All rights reserved.