Configure OAuth 2.0 Connection for Jira Cloud
OAuth 2.0 is used for secure authentication and integration. OAuth is the only authentication type supported by Jira Cloud and ZE integration.
Configure Jira Cloud to Use OAuth 2.0
Perform the following steps to configure Jira Cloud using OAuth2:
Log in to Jira as a Jira Admin user.
Open the Developer console.
To configure the Jira Cloud with OAuth 2.0, click Create and select OAuth 2.0 Integration.
Enter the name of the app and click Create. You are redirected to the OAuth app page.
By default, the application is set to Private, which means it can only be accessed by the user who is logged in.
Select the Distribution menu to share the app and allow other users to access it.
On the Distribution Screen, update the Distribution status to "Sharing" to make it accessible to other users.
To configure Distribution, do the following:
Click the Distribution tab, and then select Edit.
Under Distribution status, select the Sharing option.
In the Vendor name box, enter "Smartbear".
In the Privacy box, enter the Privacy Policy URL. Refer to SmartBear Privacy Policy for more information on the URL policy.
Click Save changes.
To add and configure the API scopes for your app, go to the Permissions menu.
Under the API name list, select Jira API and click the Configure link.
The Jira Platform Rest API screen appears.
Click the Classic scopes tab, and then click the Edit Scopes button.
Select the following permissions by clicking the options button for the following code:
read:jira-work
read:jira-user
write:jira-work
manage:jira-webhook
Click Save to save the selected permissions for Classic scopes.
Click the Granular Scopes tab, and then click the Edit Scopes button.
Select the following permissions by clicking the options button for the following code:
read:project:jira
read:board-scope:jira-software
read:epic:jira-software
read:sprint:jira-software
In the Search box, enter the permission name or code to choose the required permissions.
Click Save to save the permissions for Granular scopes.
Go to the Authorization menu, and click Add to add the authorization type for OAuth 2.0 (3LO).
Enter the Callback URL in the following format, and then click Save changes.
https://<domain_name>/flex/services/rest/v3/oAuth2/callbackUrl
For example, https://example.yourzephyr.com/flex/services/rest/v3/oAuth2/callbackUrl
Once you save the changes, you will get the authentication details of the OAUTH2 to use while integrating with Zephyr Enterprise.
Go to the Settings menu, and copy the Client ID and Secret details.
Configure the connection in Zephyr
Perform the following steps to configure the connection in Zephyr:
Log in to your Zephyr Enterprise instance as a user with administrator permissions.
Go to Administration, select Jira Integration.
Click the Add Jira Connectionbutton. The Add a Jira Integration screen appears. Specify the following values on it:
Enter the URL of your Jira instance like https://{my-org}.atlassian.nеt.
Select OAuth2 as the authentication method.
Click Next.
The User Details screen appears.
Enter the Client ID and Client Secret mentioned while configuring the Jira application link, and then click Next. The Connect your Jira Account screen appears.
Click the link displayed on the screen to get the verification code.
This requests the authentication code from Jira. You need to grant the app access to your data in all locations where it is installed and accessible. You will be navigated to the Authorize app screen.
Select the Jira account you want the app to access and click Accept to continue.
Once you click Accept, the verification code appears on the next screen.
Copy this verification code, switch to the Connect your Jira Account screen, and paste it into the box.
Click Next. Zephyr will run the diagnostics and displays the results.
Verify the Diagnostic Status, and then click Done.
Jira is successfully integrated with OAuth2. You will see the newly created connection in the list of connections.
Webhooks for Zephyr integration with Jira
Webhooks are an essential part of Zephyr integration with Jira. They are used to synchronize Zephyr and Jira requirements and defects.
Webhooks can be created using either of the following methods:
Zephyr creates a pre-configured webhook automatically when you are mapping a project in Zephyr. You must have a Jira account with special permissions (for example, Browse Projects). You can view the created webhook in Jira settings:
Go to Settings , select System (under Jira Settings), and then select Webhooks (under Advanced).
For the Automatic webhook, use the following API to check the project mappings in the JQL.
API Details: GET https://api.atlassian.com/ex/jira/{cloud_id}/rest/api/3/webhook
Example: GET https://api.atlassian.com/ex/jira/0b5ceb25-e93b-4fb7-bdc1-89a5ba8e8330//rest/api/3/webhook
Warning
Do not delete this webhook or modify its properties. It has all the required settings enabled. You can update the webhook later if required.
As an administrator, you can create and manage webhooks manually. This is recommended if you do not have (or do not want to create) a Jira service account with the permissions required for automatic webhook management.
For more information on Rest API for Webhooks, refer to The Jira Cloud platform REST API.