Configuring basic authentication for a REST client connection

Follow these steps to configure user security credentials for a REST client connection.

Before you begin

  1. Configure a zosconnect_zosConnectServiceRestClientConnection element in server.xml. For more information, see Configuring a REST client connection in IBM z/OS Connect.
  2. Locate the WebSphere® Liberty profile server securityUtility command tool, which can be found in the <installation_path>/wlp/bin directory.

Procedure

  1. Use the securityUtility encode command to encode the password for the user ID that is to be defined for the connection. For more information, see the securityUtility command.
  2. Define a zosconnect_zosConnectServiceRestBasicAuth element in server.xml. The userName and password attributes must both be specified. For the password, specify the entire encoded string output by running the securityUtility command.
  3. Add the basicAuthRef attribute to the zosconnect_zosConnectServiceRestClientConnection element to reference the zosconnect_zosConnectServiceRestClientBasicAuth element. For example:
    <zosconnect_zosConnectServiceRestClientBasicAuth id="authABC" 
        userName="SYSUSER" password="mypassword"/>
    <zosconnect_zosConnectServiceRestClientConnection id="restConn" 
        host="hostName_or_IPAddress" port="1234" basicAuthRef="authABC"/>