API requester basic authentication to an API endpoint

Basic authentication can be used between the IBM® z/OS® Connect Server and the API endpoint.

zosConnect-3.0 Applies to zosConnect-3.0.

You can specify credentials for basic authentication for connections between the z/OS Connect Server and the API endpoint by using the zosconnect_authData element in the server.xml configuration file. These credentials are different from the credentials that are used for basic authentication between the, and the z/OS Connect Server.

Diagram shows how the API requester passes the TLS password credentials to the API provider.

Configuring z/OS Connect elements for basic authentication

The following excerpt from a server.xml configuration file shows an example of how to configure basic authentication for an API.


<zosconnect_authData id="zosconnectBasicAuthConfig"
      password="mypassword"
      user="Fred"/>

<zosconnect_endpointConnection id="bookStoreConnection"  
      host="http://myhost.example.com"
      port="1234"            
      authenticationConfigRef="zosconnectBasicAuthConfig"/>

To configure z/OS Connect to call the API using basic authentication, you must configure the zosconnect_authData and zosconnect_endpointConnection elements.

On the zosconnect_authData element, you can use the WebSphere® Liberty profile securityUtility encode command to encode the password for each user. The securityUtility command-line tool is available in the <installation_path>/wlp/bin directory. For more information, see A launch icon to indicate a link opens a new tab or window. securityUtility command in the WebSphere Application Server for z/OS Liberty documentation.

On the zosconnect_endpointConnection element
  • A host, specifying the HTTP or HTTPS protocol. If you choose to use the HTTPS protocol, you must also specify the sslCertsRef attribute and configure TLS.
  • A port, specifying the target port for the API provider.
  • An authenticationConfigRef to reference the basic authentication configuration.

For more information about the elements shown in the example, see zosConnect-3.0 Configuration elements in the Reference section.