Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
JIRA 6.x Administration Cookbook

You're reading from   JIRA 6.x Administration Cookbook Over 100 hands-on recipes to help you efficiently administer, customize, and extend your JIRA 6 implementation

Arrow left icon
Product type Paperback
Published in Jul 2014
Publisher Packt
ISBN-13 9781782176862
Length 260 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Patrick Li Patrick Li
Author Profile Icon Patrick Li
Patrick Li
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. JIRA Server Administration FREE CHAPTER 2. Fields and Screens 3. JIRA Workflows 4. User Management 5. JIRA Security 6. E-mails and Notifications 7. Integrating with JIRA 8. JIRA Administration 9. JIRA Customizations Index

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 be using 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 from the System Info page, where you need to look for the java.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 determine whether the target service can be trusted by checking if the service's 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 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 allows JIRA to successfully connect to it.

There's more…

Manually downloading the certificate and running the keytool command every time can be a hassle. To make life easier for you, there is a free add-on called SSL for JIRA from Atlassian Labs that can help you automate some of the steps. You can download this add-on from the following link:

https://marketplace.atlassian.com/plugins/com.atlassian.jira.plugin.jirasslplugin

Perform the following steps to use the SSL for JIRA add-on:

  1. Log in to JIRA as a JIRA administrator.
  2. Navigate to Administration | System | Configure SSL.
  3. Type in the target system's address in the Rules textbox in the host:port format (for example, smtp.gmail.com:465).

    Tip

    You can add multiple systems by specifying each one on a new line.

  4. Click on Save certificates as shown in the following screenshot.
  5. Follow the instruction on the screen to copy over the cacerts file to the target location.
  6. Restart JIRA to apply the changes.
    There's more…

    Note

    Do not confuse this add-on with running JIRA over SSL.

You have been reading a chapter from
JIRA 6.x Administration Cookbook
Published in: Jul 2014
Publisher: Packt
ISBN-13: 9781782176862
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime