Before setting up Jira, check your project type and issue types.
- Exporting to "next-gen" projects on Jira Cloud is not currently supported. Coverity on Polaris Jira integration is able to export issues to Jira Cloud only when the project type is "classic."
- The issue type must be "Task" when exporting an issue to Jira. If "Task" is not available as an issue type, the export will fail.
- When exporting tasks to Jira, Coverity on Polaris includes the following
fields:
- Summary
- Description
- Reporter name (Exported with an empty value, which Jira sets to the name of the user who configured the Coverity on Polaris-Jira integration)
- Project id
- Issue type
- Create a pair of public and private RSA keys
- Use the public key to configure Jira
- Use the private key to configure Coverity on Polaris
Create Public and Private RSA Keys
Before connecting Jira with Coverity on Polaris, you need to create a pair of public and private OAuth keys. If you already have keys, go on to the next section. If not, follow these steps.
1. Open a terminal.
2. Copy and paste the following SSL commands into your terminal one at a time. Most of them create little or no output in the terminal.
2A. Generate a new RSA private key:
openssl genrsa -out jira_privatekey.pem 1024
This example assigns the name jira_privatekey.pem and a length
of 1024 bits. The .pem file will be written to your current
directory and is necessary for the next step.
2B. Create a certificate:
openssl req -newkey rsa:1024 -x509 -key jira_privatekey.pem -out jira_publickey.cer -days 365
After you enter what is above, the terminal will ask you a series of questions that are necessary for the certificate request.
The example generates an X509 certificate.
The certificate will expire in 365 days – you can change the final value in this line to reflect a different number of days. After the interval passes, a new certificate is needed.
2C. Extract a PCKS8 private key:
openssl pkcs8 -topk8 -nocrypt -in jira_privatekey.pem -out jira_privatekey.pcks8
This example reads the unencrypted private key and outputs a new key in PKCS8
format with the name specified (jira_privatekey.pcks8). This is
the private key that you will provide to Coverity on Polaris later.
2D. Extract the public key:
openssl x509 -pubkey -noout -in jira_publickey.cer > jira_publickey.pem
This
example uses the certificate you created to extract the public key file:
jira_publickey.pem. This is the public key you will provide
to Jira.
Configure Jira with a Public Key
3. Depending on your Jira installation, navigate as follows:
| For Jira type: | Go to: |
|---|---|
|
Jira Cloud |
Settings > Products |
| Jira Server or Data Center | Settings > Applications |
4. Under Integrations, Choose Application Links and enter the URL of your Coverity on Polaris instance.
5. Click Create New Link.
6. If you see a warning that the URL might not be valid, click Continue.
7. Complete the form.
- Enter an application name (required).
- Under Application type, select generic application
- Check the box next to Create incoming link
8. Click Continue
9. Complete the next form:
All three fields are required. For the first two fields, you can copy the answers exactly as they appear in the following list.
- Consumer Key: OauthKey
- Consumer Name: Polaris
- Public Key: {your public key}
To use a public key you created: Open the file, copy the contents, and paste the text in the Public Key field of the form.
10. When you return to the Configure Application Links page (where you entered the URL in step 2) you should see Coverity on Polaris in your list of apps.
Configure Coverity on Polaris with a Private Key
11. In Coverity on Polaris go to My organization > Integrations and click the button that says Add Jira Integration.
12. In the Jira integration Set Up page, complete the form as follows:
- Jira URL: {Enter the address of your Jira}
- Enter Consumer Key: OauthKey
- Enter Private Key: {Enter your private key}
13. Click Next.
14. In Jira, you should see a window asking for verification that you want to allow Coverity on Polaris to connect. Click Allow.
15. Copy the verification code and go back to Coverity on Polaris.
16. In Coverity on Polaris, on the Jira Integration Set Up (on the tab that says "Step two") enter the verification code and click Validate.
17. Click Next
18. Review the information and click Finish.