Configuring the MQ Connectivity key repository by using REST Administration APIs
System administrators can configure the MQ Connectivity key repository by using MQ Connectivity. The MQ Connectivity key database file and password stash file that are to be used in the MQ SSL certificate must first be copied to Eclipse Amlen by using the Eclipse Amlen REST API PUT method. System administrators can then create the MQ SSL certificate by using the Eclipse Amlen REST API POST method. Existing certificates can also be updated by system administrators by using the Eclipse Amlen REST API POST method. The MQ SSL certificate is used to secure connections between IBM MQ and Eclipse Amlen.
Before creating an MQ SSL certificate, system administrators must first copy an MQ Connectivity key database file and password stash file to Eclipse Amlen by using the Eclipse Amlen REST API PUT method or by using the Amlen WebUI. For more information about using the Amlen WebUI to uploadcopy an MQ Connectivity key database file and password stash file, see Configuring the MQ Connectivity key repository by using the Amlen WebUI. System administrators can then apply these files by using the Eclipse Amlen REST API POST method in order to create an MQ SSL certificate. Existing MQ SSL certificates can also be updated by system administrators by using the Eclipse Amlen REST API POST method.
After creating or updating the MQ SSL certificate, you must restart the MQ Connectivity process if you want to use the new or updated certificate.
curl -X PUT -T mqconnectivity.kdb http://127.0.0.1:9089/ima/v1/file/mqconnectivity.kdb
curl -X PUT -T mqconnectivity.sth http://127.0.0.1:9089/ima/v1/file/mqconnectivity.sth
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"MQCertificate":{
"MQSSLKey": "mqconnectivity.kdb",
"MQStashPassword": "mqconnectivity.sth"
}
}
' \
http://127.0.0.1:9089/ima/v1/configuration
The following shows an example response to the POST method.
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}
You can check that the configuration of the MQ SSL certificate is as expected by using the Eclipse Amlen REST Administration API GET method. For more information about using the GET method to check the configuration of the MQ SSL certificate, see Viewing configuration details of an MQ SSL certificate by using a REST Administration API.