Problems with SSL certification for custom API integration
Introduction
If you are using your own integration, and using the XTM API, you might sometimes report an issue with SSL certification, accompanied by the following error message in your logs, which is part of a bigger error stack. More specifically, the error is related to the failing of the connection during the SSL handshake.
Caused by: javax.net.ssl.SSLHandshakeException: SSLHandshakeException invoking https://api.xtm-cloud.com/project-manager-gui/services/v2/projectmanager/xop/XTMWebService: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
As a result, you are unable to perform any API calls, which prevents you from creating new projects or importing completed projects back to your integration.
Possible causes of the issue
The most probable root cause of the issue is in your own integration. You might either have built your integration incorrectly or not updated your SSL certificate in compliance with global standards.
The PKIX Path Building Failed error shown in the log might lead you to this Atlassian article, which might help you find the actual root cause of the issue and resolve the problem: Unable to Connect to SSL Services Due to 'PKIX Path Building Failed' Error in Jira Datacenter and Server.
However, the issue usually lies in your application’s java certificate store, where your SSL certificate has not been updated.
On the XTM Cloud side, the SSL certificate is updated automatically every 3 months, in accordance with a global standard practice.
This article provides for more information about this issue: Why ninety-day lifetimes for certificates?. Keep in mind that this time limit is not something XTM Support can add an exception to, as it is out of XTM’s control. Instead, it is a requirement imposed by the certificate authority.