Configure ServiceNow Connection
A ServiceNow connection securely stores reusable authentication credential
Complete the following steps to configure a connection to ServiceNow:
- Identify your ServiceNow base URL
- Generate an Authorization header
- Create the ServiceNow connection from the Alert Logic console
- Use the connection
Identify your ServiceNow base URL
Identify your ServiceNow instance name. In the Base URL field, you must replace "<myinstance>" in the default URL provided in the Alert Logic console with the ServiceNow instance you want to target.
In the ServiceNow templated connection configuration, the Alert Logic console provides the rest of the default URL path that ServiceNow requires for ticket creation. The URL path in the templated connection is added to the base URL in the connection to define the full URL. For more information, see Configure ServiceNow Templated Connection.
Generate an Authorization header
ServiceNow 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 ServiceNow username and password, 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:
- In the command line, type the following command, including the single quotation marks:
echo -n '<username>:<password>' | base64
where you must replace <username> and <password> with a valid username and password for ServiceNow.
- Copy the following string, which you must enter in the Authorization Header field when you create the 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("<username>:<password>")
where you must replace <username> and <password> with a valid username and password for ServiceNow.
[System.Convert]::ToBase64String($auth)
- Copy the following string, which you must enter in the Authorization Header field when you create the 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
Create the ServiceNow connection from the Alert Logic console
The next step is to create the ServiceNow connection in the Alert Logic console.
To create a ServiceNow 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 ServiceNow.
- On the Create a ServiceNow Connection page, type a descriptive name for the connection—for example, "ServiceNow Connection".
- In Base URL, replace <myinstance> with the ServiceNow instance name identified earlier.
- In Authorization Header, paste the authorization header you generated earlier.
- In Custom Header(s), leave the following default HTTP headers that ServiceNow requires or customize the headers for advanced integrations.
Accept: application/json
Content-Type: application/json
If you add headers, each HTTP header name-value pair must be on a separate line.
- 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.