TDV Adapter for JIRA

Build 21.0.8137

Creating a Custom OAuth App

If you do not have access to the user name and API token or do not wish to require them, you can use OAuth authentication. JIRA uses the OAuth authentication standard, which requires the authenticating user to interact with JIRA via the browser. The adapter facilitates the OAuth exchange in various ways, as described in this section. Please note OAuth 2.0 is only supported for Jira Cloud. Tables for which OAuth 2.0 is not enabled will not work.

Create an OAuth App

To obtain the OAuth client credentials, consumer key, and consumer secret:

  1. Log in to your JIRA Cloud site.
  2. Navigate to your app management at https://developer.atlassian.com/apps/ (not your OAuth credentials at yoursitename.atlassian.net/secure/admin/oauth-credentials which is for self-hosted tools.)
  3. Select Create new app, then name the app. The app will now be created.
  4. If missing, add OAuth 2.0 functionality to your app by navigating to APIS AND FEATURES -> + Add -> Add OAuth 2.0 (3LO).
  5. From APIS AND FEATURES -> + Add, add the Jira platform REST API to your app.
  6. From APIS AND FEATURES -> + Jira platform REST API, add the desired scopes to your app.
  7. You'll additionally need to set up your Callback URL. Navigate to APIS AND FEATURES -> OAuth 2.0 (3LO). Enter a URL that is accessible to your app and save the changes.

Authenticate to JIRA from a Desktop Application

After setting the following connection properties, you are ready to connect:

  • OAuthClientId: Set to the consumer key in your app details.
  • OAuthClientSecret: Set to the consumer secret in your app details.
  • CallbackURL: Set to the callback URL found in your app details under APIS AND FEATURES -> OAuth 2.0 (3LO).
  • InitiateOAuth: Set to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken connection property.
  • OAuthVersion: Set to 2.0.
  • Url: The URL to your JIRA endpoint; for example, https://yoursitename.atlassian.net.

When you connect, the adapter opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The adapter then completes the following OAuth process:

  1. Gets the callback URL and sets the access token and oauthserverurl to authenticate requests.
  2. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
  3. Exchanges the returned refresh token for a new, valid access token.

Authenticate to JIRA from a Web Application

To obtain the access token, set the following connection properties:

  • OAuthClientId: Set to the consumer key in your app details.
  • OAuthClientSecret: Set to the consumer secret in your app details.
  • CallbackURL: Set to the callback URL in your app details under APIS AND FEATURES -> OAuth 2.0 (3LO).
  • Url: The URL to your JIRA endpoint; for example, https://yoursitename.atlassian.net.
  • OAuthVersion: Set to 2.0.

When connecting via a web application, or if the adapter is not authorized to open a browser window, you need to exchange temporary verification values for the access token:

  1. Call GetOAuthAuthorizationURL. The stored procedure returns the URL to the OAuth endpoint.
  2. Log in and authorize the application. You are redirected back to the callback URL. If you set the GrantType parameter to Implicit, the callbackURL contains the OAuthAccessToken and oauthserverurl in a query string parameter. If you set the GrantType parameter to code, the callback URL contains the verifier code in the query string parameter named "code". Extract the verifier code and call GetOAuthAccessToken.

To connect to data, set the following connection properties:

  • OAuthAccessToken
  • OAuthVersion
  • OAuthClientId
  • OAuthClientSecret
  • OAuthAccessToken
  • Url

Copyright (c) 2022 CData Software, Inc. - All rights reserved.
Build 21.0.8137