Reference: Header authentication setup for Tanium Vulnerability Management in ServiceNow
Configure header authentication as an alternative to basic authentication for Tanium Connect connections that push vulnerability data to ServiceNow.
The Create connection for vulnerability findings and Create connection to push CVE status tasks configure a Tanium Connect HTTP destination with basic authentication, which uses a user name and password for the ServiceNow service account. Alternatively, you can configure header authentication to use an API key instead of a password. With header authentication, no password is stored in Tanium, and the key does not require an OAuth refresh cycle to maintain.
Header authentication is a generic Tanium Connect destination option. For information about the Header Authentication fields in Tanium Connect, see Configure the HTTP destination.
Prerequisites
- ServiceNow Washington DC release or later. Inbound API keys are not available in earlier releases.
- The API Key and HMAC Authentication plugin (com.glide.tokenbased_auth) is active. This plugin is active by default.
- A password manager or secrets vault to store the API key. ServiceNow shows the key value only once, at creation.
Assign an additional role to the service account
The service account in Create and assign roles for a service account already has the x_taniu_tanium_vr.rest role. Header authentication also requires the following role on that account.
| Role | Purpose |
|---|---|
| snc_platform_rest_api_access | Permits the account to invoke platform REST APIs. Without this role, requests fail with Failed API level ACL Validation. |
Create the Inbound Authentication Profile
This record tells ServiceNow where to find the API key on an incoming request.
- Sign in to ServiceNow. In the filter navigator, go to , and then click New.
- Select Create API Key authentication profiles.
- In the Name field, enter a name for the profile, for example Tanium VR Header Auth.
- Click Unlock
next to Auth Parameter, add the auth header record for x-sn-apikey.
Note: Do not use the Query Parameter variant. A key placed in the URL is written to server and proxy logs. - Click Submit.
Create the REST API key
- Sign in to ServiceNow. In the filter navigator, go to , and then click New.
- Enter a Name, and set User to the service account.
- If your rotation policy requires an expiration date, enter a value for Expiry.
- Click Submit to save the record and return to the API Keys page.
- Reopen the new record. Click Toggle Password Visibility
next to the Token field to reveal the value, and copy the value to your password manager.
Create the REST API access policy
This record enables API key authentication on the Tanium VR endpoint. Without the record, ServiceNow rejects the key regardless of the roles assigned to the service account.
- Sign in to ServiceNow. In the filter navigator, go to , and then click New.
- Enter a Name, set REST API to the Tanium VR vulnerability findings endpoint, and set Application to Global.
- Select Apply to all methods, Apply to all resources, and Apply to all versions, and then click Submit.
- Reopen the saved record. In the Inbound authentication profiles list, double-click Insert a new row, select the profile that you created, and click Update.
Note: A single click on the insert row often fails to engage the reference field. If the profile does not appear in the list, confirm the policy and the profile both show Application set to Global, and confirm the profile was created through the interceptor in the previous section.
Verify the endpoint access control list
Sign in to ServiceNow. In the filter navigator, go to , and find the record for the Tanium VR vulnerability findings endpoint. Confirm the role that the record requires, and confirm the service account holds that role.
Configure the Tanium Connect destination for header authentication
In Create connection for vulnerability findings or Create connection to push CVE status, set the following values instead of basic authentication.
| Field | Value |
|---|---|
| Use Authentication | Header Authentication |
| Auth Header Name | x-sn-apikey |
| Secret | The token from the REST API key that you created |
Troubleshoot header authentication
The HTTP status in the Tanium Connect run log identifies which side of the request failed. A status of 401 is an authentication problem. A status of 403 is an authorization problem.
| Status | Cause | Fix |
|---|---|---|
| 401 Unauthorized | No access policy enables API key authentication on the endpoint. | Create the REST API access policy. |
| 401 Unauthorized | The header name is misspelled, or the token was copied with extra whitespace. | Check the inbound authentication profile and the Tanium Connect destination configuration. |
| 401 Unauthorized | The API key expired, or the key record is not active. | Check the REST API key record. |
| 403 Failed API level ACL Validation | The service account is missing the snc_platform_rest_api_access role or the endpoint role. | Assign the missing role to the service account. |