Creating and updating a client certificate by using REST Administration APIs
System administrators can copy a client certificate to be used in Eclipse Amlen by using the Eclipse Amlen REST API PUT method. The certificate is copied to /var/lib/amlen-server/userfiles System administrators can then import the client certificate to the truststore of the certificate profile that is referenced in the security profile that is associated with the client certificate by using the Eclipse Amlen REST API POST method. Existing client certificates can also be updated by system administrators by using the Eclipse Amlen REST API POST method.
You can copy a client certificate to be used in Eclipse Amlen by using the Eclipse Amlen REST API PUT, or by using the Amlen WebUI. For more information about using the Amlen WebUI to upload a client certificate, see Configuring client certificates by using the Amlen WebUI.
- Copy the client certificate to /var/lib/amlen-server/userfiles by using the REST API PUT method:
curl -X PUT -T imaCA-crt.pem http://127.0.0.1:9089/ima/v1/file/TestCACertKey.pem
- Copy the certificate and key to /var/lib/amlen-server/userfiles to create a CertificateProfile by using the REST API PUT method:
curl -X PUT -T certFree.pem http://127.0.0.1:9089/ima/v1/file/TestCert.pem curl -X PUT -T keyFree.pem http://127.0.0.1:9089/ima/v1/file/TestKey.pem
- Create and import the CertificateProfile by using the REST API POST method:
curl -X POST \ -H 'Content-Type: application/json' \ -d '{ "CertificateProfile":{ "TestCertProf":{ "Certificate": "TestCert.pem", "Key": "TestKey.pem" } } } ' \ http://127.0.0.1:9089/ima/v1/configuration
- Create the SecurityProfile by using the REST API POST method:
curl -X POST -H 'Content-Type: application/json' \ -d '{ "SecurityProfile":{ "TestSecProf":{ "CertificateProfile": "TestCertProf", "UsePasswordAuthentication": false } } } ' \ http://127.0.0.1:9089/ima/v1/configuration
- Create the ClientCertificate by using the REST API POST method:
curl -X POST -H 'Content-Type: application/json' \ -d '{"ClientCertificate":[{ "SecurityProfileName":"TestSecProf", "CertificateName": "TestCACertKey" }] } ' \ http://127.0.0.1:9089/ima/v1/configuration