Certificate for REST APIs
The PowerProtect DDMC System provides a self-signed certificate by default. The self-signed certificate is not trusted by external systems (by default) and may block you from using the REST APIs because of security warnings from the HTTP client. This tutorial introduces two ways to resolve this issue.
Trust the PowerProtect DDMC system certificate (recommended)
Trust the PowerProtect DDMC system root CA
The PowerProtect DDMC system root CA can be found here on the DDMC system:
/root/certs/CA/cacert.pem
Most HTTP clients have their own trusted CA management. Follow the guidelines for those clients to install the PowerProtect DDMC system root CA into the corresponding trusted area.
The PowerProtect DDMC system CA can be located here:
/etc/ssl/certs/<DDMC hostname>.pem
If you are using the client URL (cURL) command line, you can specify your own CA certification path with the --cacert option. For example:
curl --cacert /etc/ssl/certs/<DDMC hostname>.pem \
--request POST \
--url https://<DDMC-SYSTEM-IP/FQDN>:3009/rest/v1.0/auth \
--header 'content-type: application/json' \
--data '{"username":"<your-user-name>","password":"<your-password>"}'
Ingore the certificate not trusted warning (nonproduction activities only)
Most HTTP clients provide an option to turn off SSL certificate verification.
To log in to the system, you can use this cURL command:
curl --request POST \
--url https://<DDMC-SYSTEM-IP/FQDN>:3009/rest/v1.0/auth \
--header 'content-type: application/json' \
--data '{"username":"<your-user-name>","password":"<your-password>"}'
If you have not trusted the PowerProtect DDMC system root CA, you are blocked by the following response from cURL:
curl: (60) SSL certificate problem: self signed certificate in certificate chain.
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
For nonproduction activities such as test and debug, you can use the -k option to bypass the certificate verification.
curl -k --request POST \
--url https://<DDMC-SYSTEM-IP/FQDN>:3009/rest/v1.0/auth \
--header 'content-type: application/json' \
--data '{"username":"<your-user-name>","password":"<your-password>"}'
Then the response is OK.
CAUTION: Ignoring the certificate is risky because it enables man-in-the-middle attacks that can sniff your traffic (in this case, the password). Ensure that you use this method only in a safe network environment.