Configure Universal Webhook Connection

A universal webhook connection securely stores reusable authentication credential and URL path information for integrations with a third-party application. If a specific connection is not available for your application, an experienced DevOps professional can configure a Webhook connection for any HTTP endpoint.

Complete the following steps to successfully configure the universal webhook connection:

  1. Identify your webhook base URL
  2. (Optional) Generate an Authorization header
  3. (Optional) Add custom header(s)
  4. Create the universal Webhook connection from the Alert Logic console
  5. Use the connection in templated connections
Before you create the webhook connection in the Alert Logic console, gather the information that your third-party application requires by consulting the vendor documentation.

Identify your webhook base URL

To create the connection, Alert Logic requires the URL for your application. Some applications require that you generate a URL that includes a token for authorization.

To set up a simple connection:

Copy the entire third-party-generated URL, which you must paste into the Base URL field in the Alert Logic console later. You will not need to add additional target URL information in the webhook templated connectionconfiguration.

To set up a generic connection for multiple integrations with the application:

Copy only the base URL path information from the URL generated by Teams. You will need to specify exact URL target information in in the webhook templated connection configuration.

For example, "https://webhooks.3rdparty.com/api" could be used in the Base URL field in the connection configuration, and "/<unique-integration-id>" could be used as the target URL field in the templated connection configuration.

(Optional) Generate an Authorization header

If the third-party application to which you want to connect requires a Basic HTTP Authorization request header, you can use these instructions to generate the header. The command requires the valid user name and password (or API token) in the application to which you want to connect, and it encodes the credentials with base64.

Some types of external applications require an API token or integration key generated in your external application account instead of a password. For more information, refer to the documentation for your external application.

In the Authorization Header field, you enter the word "Basic" (which is the Authorization header type), a space, and then the base64-encoded credentials.

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 '<user_name>:<password_or_api_token>' | base64

    where you must replace <user_name> with a valid username and <password_or_api_token> with either a password or an API token for the third-party application.

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

    Basic <resulting_base64_encoded_string>

If the user name is "admin" and the password is "testpassword" for example, the command is:

echo -n 'admin:testpassword' | base64

and the command produces this output:

YWRtaW46dGVzdHBhc3N3b3Jk

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

Basic YWRtaW46dGVzdHBhc3N3b3Jk

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("<user_name>:<password_or_api_token>")

    where you must replace <user_name> with a valid username and <password_or_api_token> with either a password or an API token for the third-party application.

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

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

    Basic <resulting_base64_encoded_string>

If the user name is "admin" and the password is "testpassword" for example, the commands are:

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

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

and the command produces this output:

YWRtaW46dGVzdHBhc3N3b3Jk

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

Basic YWRtaW46dGVzdHBhc3N3b3Jk

(Optional) Add custom header(s)

Some applications require one or more HTTP custom headers. Custom headers are HTTP name-value pairs in the format Header-Name: value with each header field on a separate line, for example:

Copy
Accept: application/json
Content-Type: application/json

Create the universal Webhook connection from the Alert Logic console

After you finish gathering information and completing any configuration steps required by the third-party application, the next step is to create the connection in the Alert Logic console.

To create a universal Webhook 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 Webhook.
  3. On the Create a Webhook Connection page, type a descriptive name for the connectionfor example, "My Third-Party App Webhook Connection".
  4. In Base URL, paste the URL identified earlier.
  5. In Authorization Header, paste the authorization header you generated earlier, or leave the field blank if the third-party application to which you want to connect does not require a Basic HTTP Authorization request header.
  6. In Custom Header(s), enter the custom headers identified earlier. Each HTTP header name-value pair must be on a separate line. Leave the field blank if the third-party application to which you want to connect does not require any custom headers.
  7. Click SAVE.

Use the connection in templated connections

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.