Create and View System Users

System users are established at boot time, and have privileges to join and start GemFire XD servers and locators.

Procedure
  1. Create a system user for GemFire XD by specifying user name=password at boot time using the gemfirexd.user.UserName system property.

    GemFire XD user names are SQL92 identifiers, and are case-sensitive for user authentication. Delimited identifiers are allowed.

    For example, the following property defines a username of "FRed" with the password "java":
    gemfirexd.user."FRed"=java
    Note: You can use either a plain-text password or an encrypted password as the value of gemfirexd.user.UserName. See Encrypt the Password of a System User.
  2. Include the property definitions for system users in the gemfirexd.properties file for each GemFire XD server and standalone locator.
    For example, this listing shows a gemfirexd.properties file the defines a "locatoradmin" and "serveradmin" system user:
    gemfirexd.auth-provider=BUILTIN
    mcast-port=0
    gemfirexd.user.locatoradmin=locatorpassword
    gemfirexd.user.serveradmin=serverpassword
  3. To boot a standalone locator using the above properties file, specify a configured system user with the -user option as in:
    gfxd locator start -user=locatoradmin -password

    If you leave the -password option empty, GemFire XD prompts you for the password.

    Note: Built-in system users are defined when you boot the GemFire XD locator. Other GemFire XD members that join the system must specify one of the same system users that are defined in the locator. If you need to change the password of a system user, you must stop all members of the distributed system, and then restart them (beginning with the locator), specifying the new username definition when you start.
  4. Use the SYS.SHOW_USERS procedure to view the configured BUILTIN users in a GemFire XD distributed system.
Note: Keep in mind that gemfirexd.user.UserName defines a user credential, and -user specifies an available credential to use for booting the server or locator. Both properties are required. For example, if you specified all properties at the command line rather than in gemfirexd.properties, the command to boot the locator is:
gfxd locator start -auth-provider=BUILTIN 
     -gemfirexd.user.locatoradmin=locatorpassword -user=locatoradmin 
     -password=locatorpassword