[In Progress] 10.2: Integrate Cerb and Jira using OAuth2 #44
jstanden
started this conversation in
Guides and Tutorials
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
Using automations and connected accounts in Cerb, you can integrate with the full Jira Cloud API.
Configure OAuth in Jira
Create an OAuth app
Log into the Jira developer console.
Click the blue Create button in the top right and select OAuth 2.0 integration.
Use the name Cerb integration, agree to the terms, and click the Create button.
Add permissions
In your new Jira app, open the Permissions section and click the Add button for Jira platform REST API.
Click the new Configure button for Jira platform REST API.
Add permissions for View Jira issue data and Create and manage issues.
Configure authorization
In your new Jira app, click on Authorization in the left sidebar.
Click the Configure button for OAuth 2.0 (3LO).
Use rotating refresh tokens.
Add a callback URL for
https://example.com/oauth/callback
whereexample.com
is your Cerb host. In Cerb Cloud this will be something likeexample.cerb.me
.Credentials
Click on Settings in the left sidebar.
Copy the Client ID and Secret to use in Cerb.
Create a connected service and account in Cerb
Log into Cerb as an administrator.
Create a connected service
First we need a connected service to define the integration between Cerb and Jira. We'll use the OAuth2 credentials from Jira that we created above.
Navigate to Search > Connected Services.
Click the (+) icon in the top right of the worklist.
Select the Build tab.
jira
https://auth.atlassian.com/authorize?audience=api.atlassian.com
https://auth.atlassian.com/oauth/token
https://api.atlassian.com/oauth/token/accessible-resources
offline_access read:jira-user write:jira-work read:jira-work
consent
Click the Save Changes button to create the connected service.
Create a connected account
With OAuth2, each Jira user can consent to link their own account to Cerb. However, it's common for a team to add a Cerb user to their Jira environment for automations.
In Cerb, OAuth-based connected services may have one or more connected accounts.
Navigate to Search > Connected Accounts.
Click the (+) icon in the top right of the worklist.
Select the Jira service.
Use the following details:
Jira (Cerb)
jira-cerb
Click the blue Link to Jira button to link your account.
Accept the integration.
Examples
Navigate to Search > Automations.
Click the (+) icon in the top right of the worklist to add a new automation.
automation.function
Paste the following into the Policy tab:
Let's fetch the Cloud ID for your preferred site.
Paste the following automation:
In the Run tab, click the icon.
You can use the Cloud ID to access any of Jira's API endpoints.
Search projects
Search issues
Get issue creation metadata
Create an issue
Beta Was this translation helpful? Give feedback.
All reactions