Configuring security credentials for connecting to a REST API
Create a security identity by using the mqsisetdbparms command, and configure a REST request node in a message flow to use that identity for connecting to a secured REST API.
About this task
Procedure
What to do next
You can use the mqsireportdbparms command to
show information about the security identities that are being used
for connecting to a REST API. For example:
- Enter the following command to show the security identity for
HTTP Basic Authentication and the API key, for use with a REST request
node:
This command returns output similar to the following example:mqsireportdbparms IB10NODE -n rest::myBasicAuthAndApiKey
$ mqsireportdbparms IB10NODE -n rest::myBasicAuthAndApiKey BIP8180I: The resource name 'rest::myBasicAuthAndApiKey' has userID 'myUserID'. BIP8214I: The resource name 'rest::myBasicAuthAndApiKey' has API key 'C664C588-885A-4F07-9390-9CD7A4F8A89F'.
- Enter the following command to validate the password for a single
security identity for HTTP Basic Authentication, for use with a REST
request node:
This command returns output similar to the following example:mqsireportdbparms IB10NODE -n rest::myBasicAuth -u myUserID -p password
$ mqsireportdbparms IB10NODE -n rest::myBasicAuth -u myUserID -p password BIP8180I: The resource name 'rest::myBasicAuth' has userID 'myUserID'. BIP8201I: The password you entered, 'password' for resource 'rest::myBasicAuth' and userId 'myUserID' is correct. BIP8206I: The Integration node is not running and may not have been restarted since the last change made by the mqsisetdbparms command. BIP8071I: Successful command completion.