Create or update a client certificate
Purpose
Creates a trusted client certificate in Eclipse Amlen.
URI
Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:
http://<admin-endpoint-IP:Port>/ima/v1/configuration/
Object configuration data
Provide ClientCertificate object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:
{
"ClientCertificate":[{"SecurityProfileName":"string", "CertificateName": "string", "Overwrite": true|false }]
}
Where:- CertificateName
- Required.
- SecurityProfileName
- Required if you are creating a client certificate.
- Overwrite: true|false
- Specifies whether an existing certificate is overwritten if it has the same name.
Usage NotesĀ®
- You must copy the certificate to the server before you can apply it. Copy a file from the local machine to Eclipse Amlen to copy the certificate.
- The certificate must be a pem format certificate.
- You can upload a maximum of 100 trusted client certificates for every security profile.
- Capitalization and double quotation marks must be used as shown.
Related REST Administration APIs
Example
The following example shows the steps required to create a client certificate by using cURL:- Copy the client certificate 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 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 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