1

IBM IIB or IBM App Connect Enterprise has a feature to store user credentials such as username and password at the server level with the help of the following commands. mqsisetdbparms mqsivault We wanted to access values of Username and password store using these command in Java Compute node or ESQL node so that these value to programmatically call to REST web service using HTTPURLConnection object.

Please help me to find out how to access the username and password store in the server using any IIB provided node or in Java compute node or ESQL node.

Rohan
  • 607
  • 5
  • 5
Hari
  • 117
  • 1
  • 7
  • Hari - Are you trying to set HTTP basic auth OR some other way of populating username/password in http headers so that you are able to call the target REST service endpoint successfully. – Rohan Mar 07 '21 at 16:24
  • I am trying to call OAuth REST call which take input as formData type input (application/x-www-form-urlencoded), so I wanted to get username and password (as text) and wanted to set them as URLEncoder.encode("username", "UTF-8") and send to REST request. I am using HttpURLConnection as client to make this REST call – Hari Mar 08 '21 at 03:15
  • You could look a the following video to see if it helps https://www.youtube.com/watch?v=fL5cZoRMrQA – Rohan Mar 08 '21 at 16:03
  • @Rohan This is using RESTRequestNode, I wanted to access username and password in Java Compute Node – Hari Mar 09 '21 at 00:57
  • Hari - My understanding is IIB vault has specific use cases that it fulfills that is present on the following link. https://www.ibm.com/support/knowledgecenter/SSTTDS_11.0.0/com.ibm.etools.mft.doc/an09200_.html.... under the credential type. Do you have any other vault that you could use such as Azure Vault. May you could pull the values from that and populate the http headers appropriately before making the Oauth call to get a token – Rohan Mar 09 '21 at 01:22
  • Yes but again there no way to access mqsicredentials value in Java compute node it is same as mqsisetdbparams, there is no Java or ESQL API to access from from vault – Hari Mar 09 '21 at 02:36
  • As a workaround, you could use UDP properties instead and override the values in the bar file for each of your environment during deployment time using CI/CD pipeline. This value overrides the value that was set when you defined the message flow. Check the following link https://www.ibm.com/support/knowledgecenter/SSTTDS_11.0.0/com.ibm.etools.mft.doc/ac00328_.html – Rohan Mar 09 '21 at 02:56

0 Answers0