Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >

Search





Overview

Xray's integration with Atlassian's Jira Software is a powerful feature that enables the automatic creation of Jira tickets based on Xray identified security threats violations. As DevOps teams are already familiar with the workflow and user experience of Jira, this integration makes it easy to handle Xray detections. Once configured, Policy violations will appear as notifications in Jira, allowing your team to know where the violations are found, how to prioritize them, and take immediate action to resolve them. 

Page Contents

 


How Does it Work?

Prerequisites
As a Jira admin, you must have the following information:

You must have Jira Admin permissions to be able to connect Jira to Xray. For the Jira-related steps, refer to Atlassian Jira Documentation .
  1. The supported authentication type this should be one of OAuth1, OAuth2 or Basic Authentication.
  2. User credentials depending on the authentication type.
  3. Jira Project Name.
  4. Issue type (bug, security, escalation, etc).
  5. Jira labels (optional).
  6. Custom Field Mapping (optional).

Step 1 Creating a Jira Connection Profile

Connect Jira to Xray through the Xray interface using one of the supported authentication methods. Navigate to Administration > Xray Security & Compliance >  Integrations > Jira Integration and select New Jira Integration.  

Xray supports three authentication methods:
  • OAuth1
  • OAuth2
  • Basic
Follow the steps depending on the chosen method. 

Connecting Jira to Xray Using OAuth1

In Xray:

  1. Define the following fields in the Xray Jira Integration:

    Field

    Description

    Consumer Key

    The consumer key that is provided in Jira when linking applications. 

    Jira server URL

    The URL of your Jira deployment.

  2. Generate a public key that you will define in your Jira. 

In Jira:

Paste the generated Public Key you copied from the Xray interface. 




Connecting Jira to Xray Using OAuth2

In Atlassian:

  1. From the Developer Console of Atlassian, create an OAUTH2 Integration. Specify the callback URL as the JFrog server URL, such as:

    https://artifatcory:8082/xray/api/v1/ticketing/integrations/callback
  2. In the Authentication details section, copy the Client ID and secret. You will use these in the Xray interface. 

In Xray:
Define the following fields in the Xray Jira Integration:

Field

Description

Client ID

The client ID you obtained from the Atlassian OAUTH2 integration.

Client Secret

The client secret you obtained from the Atlassian OAUTH2 integration.

Connecting Jira to Xray Using Basic Authentication

Define the following fields in the Xray Jira Integration:

Field

Description

Username

The username you use for Jira authentication.

Password

The password you use for Jira authentication.

Installation Type

Type of installation of your Jira instance, Cloud or On-Prem

Jira Server URL

URL of the Jira deployment.

 Ensure to test connectivity between Xray and Jira by clicking the Test Jira Connectivity button before proceeding to the next step.


Step 2 Creating a Jira Configuration Profile

After successfully completing the connection between Jira and Xray, you need to create a Jira Configuration profile. As there are different Jira projects for different teams, the configuration profile enables you to define specific criteria for the issued Jira ticket per Jira project, such as labels and custom mappings defined in the Jira project.

As each violation creates a new Jira ticket, you might have multiple Jira tickets for the same violation in different versions of the Build, Release Bundle, or package. You can choose to only have one Jira ticket for the violation, by eliminating duplicate Jira tickets. If unchecked, multiple Jira tickets will be created for the same violation in all Builds, Release Bundles, and Packages.


Step 3 Configuring the Policy Rules 

Enable the Jira ticket creation in the Policy rules. In Policy > Policy Rules > Automatic Actions, select the Create Jira Ticket checkbox to trigger the creation of Jira tickets when violations are found that match the rule you defined in the Policy. 


Step 4 Configuring the Watch with the Jira Configuration Profile

Attach the Jira Configuration Profile to the Watch that contains all of your Policies.  In Watches > Watch settings select the Enable Jira Ticket Creation checkbox and from the drop-down list select the relevant Jira Configuration Profile. The Jira tickets that are triggered will contain the configurations you defined int he selected configuration profile. 


Viewing Created Jira Tickets 

Violations Report

When generating a Violations Report, the created Jira tickets appear in the details of each violation. 

Jira Ticket 

This is an example of the generated Jira ticket.


REST API Support

You can enable Jira ticket creation in the using the following REST APIs:

  • No labels
Copyright © 2021 JFrog Ltd.