SSLPeerUnverifiedException while connecting to marketplace.atlassian.com from Bamboo
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
While trying to connect to marketplace.atlassian.com via Bamboo UI , user receives javax.net.ssl.SSLPeerUnverifiedException certificate error.
Environment
8.0.3 and 8.1.2
Diagnosis
Certificate error can be seen in the Bamboo logs (atlassian-bamboo.log)
2022-03-30 11:04:38,959 WARN [http-nio-8085-exec-67] [CategoryCollectionResource] Failed to get categories
com.atlassian.marketplace.client.MpacException: javax.net.ssl.SSLPeerUnverifiedException: Certificate for <marketplace.atlassian.com> doesn't match any of the subject alternative names: [services.atlassian.com, *.services.atlassian.com]
Cause
This error occurs when the certificate for Atlassian Marketplace doesn’t match with the certificates present in key-store of Bamboo server.
Server Name Indication (SNI) is an extension to the Transport Layer Security (TLS) computer network protocol which allows a server to present one of multiple possible certificates on the same IP address and TCP port number and hence allows multiple secure (HTTPS) websites to be served by the same IP address without requiring all those sites to use the same certificate.
SNIExtension is not enabled and the TLS client protocol version is below version 1.2 which is preventing Bamboo server to communicate with marketplace.atlassian.com.
Solution
In order to solve this problem you must enable SNI Extension and TLSv1.2 for Bamboo:
1. Stop Bamboo.
2. Follow the steps inside the Configuring your system properties page (depending on your OS) and add the following Java properties to Bamboo:
* -Djsse.enableSNIExtension=true
* -Djdk.tls.client.protocols=TLSv1.2
3. Start Bamboo.