Importing and applying a certificate for an LDAP connection by using REST Administration APIs
System administrators can import a certificate to use with an LDAP connection by using REST Administration APIs.
You can import a certificate for an LDAP connection by using a REST Administration API, or by using the Amlen WebUI. When you use the Amlen WebUI, importing the certificate is part of configuring an LDAP connection. For more information about using the Amlen WebUI to import the certificate, see Configuring an LDAP server by using the Amlen WebUI.
After the certificate is applied, it is automatically renamed to ldap.pem.
The following example shows importing a file called ldap.pem
from the local machine to a staging directory and applying the LDAP certificate on a server:
curl -X PUT -T /certificates/ldap.pem http://127.0.0.1:9089/ima/v1/file/ldap.pem
An example response to the PUT method:
The following example applies the certificate to the LDAP connection by using cURL:
{
"Version": "v1",
"Code": "CWLNA6011",
"Message": "The requested configuration change has completed successfully."
}
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"LDAP": {
"Certificate": "ldap.pem",
"Overwrite": true
}
}
' \
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."
}