官术网_书友最值得收藏!

Installing SSL certificates from other applications

You might need to connect JIRA to other services, such as LDAP, mail servers, and other websites. Often, these services make use of SSL. In such cases, the connection will fail, and you will see the following errors in your JIRA log file:

javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed:  
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification
path to requested target 

Getting ready

For this recipe, we will use the Java keytool utility, so make sure you have the following configuration set up:

  • Obtain the SSL certificate from the target system.
  • Ensure that the JAVA_HOME environment variable is set properly.
  • Make sure you know which JDK/JRE JIRA is using. You can find this information on the System Info page, where you need to look for thejava.home property.
  • Make sure your JRE/JDK's bin directory is added to your PATH environment variable, and the keytool command will output its usage.
  • Obtain the password for the Java trust store used by JIRA.

How to do it...

In this recipe, let's assume we want to connect JIRA to an LDAP server that is running on SSL. Perform the following steps to make it a trusted site inside JIRA:

  1. Open up a command prompt and go to the directory where the certificate file resides.
  2. Import the certificate into the trust store by running the keytool -import -alias tomcat -file file.cer JAVA_HOME\jre\lib\security\cacerts command, where file.cer is the certificate file.
  3. Restart JIRA to apply the changes.

How it works...

When JIRA attempts to connect to an SSL-protected service, it will first check whether the target service's certificate can be trusted. This is done by checking to see whether the certificate is present in what is called the trust store. If the certificate is not present, the connection will fail.

The trust store is typically a KeyStore repository called cacerts and is located in the $JAVA_HOME/lib/security directory on the server.

We used the keytool utility to import the certificate to our local trust store, so the target service will be registered as a trusted service and allow JIRA to successfully connect to it.

主站蜘蛛池模板: 洛南县| 河池市| 固原市| 平阴县| 光山县| 尤溪县| 苗栗市| 勐海县| 湖南省| 通化县| 靖州| 尚志市| 合水县| 京山县| 巴彦淖尔市| 奈曼旗| 红原县| 延吉市| 夹江县| 四子王旗| 洪泽县| 潜江市| 贵阳市| 宝鸡市| 泰来县| 桦甸市| 诸暨市| 伊宁县| 准格尔旗| 河南省| 沙雅县| 广平县| 灌云县| 敦化市| 军事| 临西县| 荔波县| 京山县| 明光市| 邢台县| 新和县|