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:
- Identify your webhook base URL
- (Optional) Generate an Authorization header
- (Optional) Add custom header(s)
- Create the universal Webhook connection from the Alert Logic console
- Use the connection in templated connections
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.
(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.
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:
- 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.
- Copy the following string, which you must enter in the Authorization Header field when you create the templated connection:
Basic <resulting_base64_encoded_string>
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:
- 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)
- Copy the following string, which you must enter in the Authorization Header field when you create the templated connection:
Basic <resulting_base64_encoded_string>
$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:
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:
- In the Alert Logic console, click the navigation menu icon (), click Configure, and then click Connections.
- On the Connections page, click the add icon (), and then click Webhook.
- On the Create a Webhook Connection page, type a descriptive name for the connection—for example, "My Third-Party App Webhook Connection".
- In Base URL, paste the URL identified earlier.
- 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.
- 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.
- 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.