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.

Important: Set the ServiceNow application scope to Global before you create any of the following records. A record created in the wrong scope becomes hard to find and edit later, and an application uninstall or rollback can remove the record.

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.

Table 1. Additional role for header authentication
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.

  1. Sign in to ServiceNow. In the filter navigator, go to System Web Services > API Access Policies > Inbound Authentication Profile, and then click New.
  2. Select Create API Key authentication profiles.
  3. In the Name field, enter a name for the profile, for example Tanium VR Header Auth.
  4. 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.
  5. Click Submit.

Create the REST API key

  1. Sign in to ServiceNow. In the filter navigator, go to System Web Services > API Access Policies > REST API Key, and then click New.
  2. Enter a Name, and set User to the service account.
  3. If your rotation policy requires an expiration date, enter a value for Expiry.
  4. Click Submit to save the record and return to the API Keys page.
  5. 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.

Important: Scope the access policy to the Tanium VR Scripted REST API only. A policy attached to a shared API, such as the Table API, allows only the authentication methods that the policy lists. If you attach a policy that lists only the API key profile to a shared API, every existing OAuth, Basic Authentication, and mutual TLS (mTLS) integration on that API stops working.
  1. Sign in to ServiceNow. In the filter navigator, go to System Web Services > API Access Policies > REST API Access Policies, and then click New.
  2. Enter a Name, set REST API to the Tanium VR vulnerability findings endpoint, and set Application to Global.
  3. Select Apply to all methods, Apply to all resources, and Apply to all versions, and then click Submit.
  4. 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 System Security > Access Control (ACL), 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.

Important: Test with the service account, not with an administrator session. The endpoint ACL allows administrator overrides, which permits an administrator to reach the endpoint even when the service account cannot.

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.

Table 2. Connect destination fields for header authentication
Field Value
Use Authentication Header Authentication
Auth Header Name x-sn-apikey
Secret The token from the REST API key that you created
Note: If Auth Header Name is limited to Authorization in your Tanium Connect version, leave Use Authentication set to None, and add x-sn-apikey as a custom header with the token as its value instead. Both methods produce the same result.

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.

Table 3. Header authentication errors
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.