Using RACF PassTickets instead of encrypted password files with the SQL DI REST API

If you are currently using the SQL DI REST APIs with Db2 encrypted password files, switching to RACF PassTickets requires some adjustments.

About this task

Follow this process to transition to using RACF PassTickets with the SQL DI REST API.

Procedure

  1. Enable RACF PassTickets as described in Enabling RACF PassTicket support for SQL DI.
  2. Run the following PATCH request to provide the Db2 application name for RACF PassTickets on an existing connection that was using a Db2 encrypted password file.
    Note: The user ID that runs this API must be authorized to access Db2 using PassTickets, per step 1.
    PATCH https://<SQLDI-IPAddress>:<SQLDI-PortNumber>/sqldi/v2/connections/{connId}
    Request body:
    {
      db2ApplID : db2-application-name
    }
  3. Run the REST APIs without providing Db2 credential fields (Db2-Username and Db2-Password).
    Note: The user ID that was used to generate a bearer token (see Generating an authentication token with SQL DI REST API) and the Db2 application name provided in step 2 will be used to generate the PassTicket for accessing Db2.