Skip to content

Setting up a Jira Integration

Our native Jira integration allows users to create new issues based on found defects. In order to authenticate with the Jira API, we have to set up a OAuth 2.0 app using the Atlassian developer console. The app is used to authenticate with the Jira API and handle the scopes that Mayhem has access to. The callback url should point to your instance of Mayhem. The client id and secret are generated for your app and can be changed if you wish. Lastly, sharing the app allows Mayhem to have access to it in order to use it for authentication. Below are instructions for creating and configuring your OAuth 2.0 app.

Create OAuth 2.0 App

  1. First, go to the Atlassian Developer console and login using an account that has access to your Atlassian instance. This account will own the OAuth 2.0 app.

  2. In the developer console press "Create" and select "OAuth 2.0 Integration"

    create_app.png

  3. Set the title of the OAuth 2.0 app to whatever you like

    app_title.png

Configure Authorization

  1. Select Authorization from the menu on the left

  2. Click on “Add”

    add_authorization.png

  3. Set the callback URL to the deploy’s API URL https://your-mayhem-root-url/api/v2/jira/oauth

    callback_url.png

  4. Press “Save Changes”

Set Permissions

  1. Click on permissions

  2. Click on Jira API “Add button”

    add_permissions.png

  3. Click on “Configure” button

  4. Select the “Granular scopes” tab and “Edit scopes”

    granular_scopes.png

  5. Select the following scopes

    • 'write:issue:jira',
    • 'write:comment:jira',
    • 'write:comment.property:jira',
    • 'write:attachment:jira',
    • 'read:application-role:jira',
    • 'read:avatar:jira',
    • 'read:field-configuration:jira',
    • 'read:group:jira',
    • 'read:issue:jira',
    • 'read:issue-details:jira',
    • 'read:issue-meta:jira',
    • 'read:project:jira',
    • 'read:user:jira',
    • 'read:user.property:jira'

    select_scopes.png

  6. On the distribution tab select "Edit" and distribution status "Sharing"

    configure_sharing.png

  7. Click Save

Add credentials in Mayhem

  1. Login as admin to your Mayhem instance

  2. Click on your profile and select Admin Settings

  3. Select the Integrations tab

  4. Enable the Jira Integration

    admin_settings_integration.png

  5. Add the Client Id and Client secret from your Jira OAuth 2.0 app found under Settings

    client_secrets.png

  6. Click Save

Resources

Atlassian Documentation on how OAuth 2.0 apps work