Configure Jira Connection

A Jira connection securely stores reusable authentication credential and URL path information for integrations with Jira.

Complete the following steps to configure a connection to Jira:

  1. Identify your Jira base URL
  2. Create an Atlassian API token
  3. Generate an Authorization header
  4. Create the Jira connection from the Alert Logic console
  5. Use the connection

Identify your Jira base URL

Identify your Jira instance name. In the Base URL field, you must replace "<myinstance>" in the default URL provided in the Alert Logic console with the Jira instance you want to target.

In the Jira templated connection configuration, the Alert Logic console provides the rest of the default URL path that Jira requires for ticket creation. For more information, see Configure Jira Templated Connection.

Create an Atlassian API token

For Jira connections, the authorization header requires an API token that you must create in your Atlassian account. For instructions on how to create and use the API token, see Create an API token in the Atlassian documentation.

Generate an Authorization header

Jira requires an HTTP Authorization request header. You can use the following instructions for your operating system to generate the header.

The command requires a valid Jira username and API token, and it encodes the credentials with base64. To construct the header, you enter the word "Basic" (which is the Authorization header type), a space, and then the base64-encoded credentials.

Alert Logic stores your Authorization header securely when you save the connection.

To generate the header on Linux and Mac OS X:

  1. In the command line, type the following command, including the single quotation marks:

    echo -n '<username>:<api_token>' | base64

    where you must replace <username> with a valid username for Jira and <api_token> with the API token you created earlier.

  2. Copy the following string, which you must enter in the Authorization Header field when you create the connection:

    Basic <resulting_base64_encoded_string>

If the username is "admin" and the API token is "Hj3Mbueurgg9AXKqK2TY6359", for example, the command is:

echo -n 'admin:Hj3Mbueurgg9AXKqK2TY6359' | base64

and the command produces this output:

YWRtaW46SGozTWJ1ZXVyZ2c5QVhLcUsyVFk2MzU5

So, in the Authorization Header field, you would paste:

Basic YWRtaW46SGozTWJ1ZXVyZ2c5QVhLcUsyVFk2MzU5

To generate the header in Windows PowerShell:

  1. In the command line, type the following commands, including the quotation marks:

    $auth = [System.Text.Encoding]::UTF8.GetBytes("<username>:<api_token>")

    where you must replace <username> with a valid username for Jira and <api_token> with the API token you created earlier.

    [System.Convert]::ToBase64String($auth)

  2. Copy the following string, which you must enter in the Authorization Header field when you create the connection:

    Basic <resulting_base64_encoded_string>

If the username is "admin" and the API token is "Hj3Mbueurgg9AXKqK2TY6359", for example, the commands are:

$auth = [System.Text.Encoding]::UTF8.GetBytes("admin:Hj3Mbueurgg9AXKqK2TY6359")

[System.Convert]::ToBase64String($auth)

and the command produces this output:

YWRtaW46SGozTWJ1ZXVyZ2c5QVhLcUsyVFk2MzU5

So, in the Authorization Header field, you would paste:

Basic YWRtaW46SGozTWJ1ZXVyZ2c5QVhLcUsyVFk2MzU5

Create the Jira connection from the Alert Logic console

The next step is to create the Jira connection in the Alert Logic console.

To create a Jira connection:

  1. In the Alert Logic console, click the navigation menu icon (), click Configure, and then click Connections.
  2. On the Connections page, click the add icon (), and then click Jira.
  3. On the Create a Jira Connection page, type a descriptive name for the connectionfor example, "Jira Connection".
  4. In Base URL, replace <myinstance> with the Jira instance name identified earlier.
  5. In Authorization Header, paste the authorization header you generated earlier.
  6. In Custom Header(s), leave the following default HTTP header that Jira requires or customize the headers for advanced integrations.

    Content-Type: application/json

    If you add headers, each HTTP header name-value pair must be on a separate line.

  7. Click SAVE.

Use the connection

After you save the connection, you can use it in a templated connection. For more information on templated connections, see Templated Connections Configuration Guide.

Manage connections

You can view the list of connections and edit or delete an existing one. For more information, see Manage Connections.