HCL Commerce Developer

Setting the spiuser password in HCL Commerce Developer

You must set the spiuser user password in your HCL Commerce development environment to allow for your HCL Commerce servers to function together as expected.

About this task

All servers in HCL Commerce Developer are hard coded to use a default spiuser user password.

The default password for the spiuser user in the provided sample DB2 Docker container is: passw0rd (with a zero)

If you specified a different password during Loading the HCL Commerce Developer database schema, then you must update your server properties so that the password is synchronized with the one that is in the database.

Procedure

  1. Open a command line interface and navigate to the WCDE_installdir\bin\ directory.
    Set your spiuser user password in your HCL Commerce development environment. The method that you will use depends on the version of HCL Commerce Developer that you are using.
  2. Encrypt the spiuser user password by running the following command.
    wcs_encrypt.bat spiuser_plain_text_password
    Ensure that the spiuser_plain_text_password is the same plain text password that you specified in Loading the HCL Commerce Developer database schema.
  3. Copy the ASCII encoded string.
  4. Update the ASCII encoded password for the Transaction server.
    1. Open the WCDE_installdir/wasprofile/config/cells/localhost/nodes/localhost/servers/server1/server.xml file.
    2. Update the value of the system property spi.password with the ASCII encoded string.
  5. Generate the merchantKey encrypted password, and store it in the database.
    1. Obtain the salted spiuser password from the database.
      Open a database command line prompt, and run the following against your database.
      select salt from userreg where logonid='spiuser';
    2. Encrypt the salted password with the merchantKey.
      In a separate command prompt, run the following HCL Commerce command utility located in the /opt/WebSphere/CommerceServer90/bin/ directory.
      ./wcs_password.bat plain_text_spiuser_password salt unencrypted_merchantKey_value
    3. Store the encrypted password in the database.
      In the database command line prompt, update the encrypted password.
      update userreg set logonpassword=x'encrypted_hexadecimal_output' where logonid = 'spiuser';
      Note: The x'encrypted_hex_output' is required to store the value in hexadecimal format.
  6. Update the ASCII encoded password in the Search server and Store server.
    1. Open the Liberty_installdir/usr/servers/crsServer/jvm.options file.
    2. Update the value of the spi.password with the ASCII encoded string.
    3. Open the Liberty_installdir/usr/servers/searchServer/jvm.options file.
    4. Update the value of the spi.password with the ASCII encrypted string.
  7. Update the encrypted password in the Search server and Customization serverWebSphere Application Server V8.5.5 Liberty configuration for the Search server and Customization server.
    1. In a command line interface, go to Liberty_installdir/bin/.
    2. Run the following command to encrypt the plain text spiuser password.
      securityUtility.bat encode spiuser_plain_text_password
    3. Copy the output string.
      For example,
      {xor}Lz4sLChvLTs=
    4. Open the Liberty_installdir/usr/servers/searchServer/configDropins/overrides/userregistry.xml file.
    5. Update the value of the password with the output string.
    6. Open the Liberty_installdir/usr/servers/commerceueServer/configDropins/overrides/userregistry.xml file.
    7. Update the value of the password with the output string.
    8. Save and close both files.
  8. If the Transaction, Search, Store, or Customization servers are running, restart the servers.

Results

The spiuser user password has been set in your HCL Commerce development environment to correspond with the one that is encrypted in the associated development database.