Using Gateway

Use Gateway to build API-based integrations with the Tanium Core Platform. This service consolidates information from multiple Tanium modules into a unified view of information on the endpoints in the environment. Gateway intelligently routes requests to the services and sources that provide the most recent information and the most reliable mutations.

Note: To view examples of filtering syntax, see Reference: Filter syntax. To view examples of available functions, see Reference: Gateway examples. To download a file containing examples, see Reference: Integration with Insomnia API Client.

Gateway uses GraphQL to request data (queries) and to make changes (mutations). With GraphQL, you can compose queries in Gateway to retrieve the exact data that you want as well as filter the results to a set of endpoints.

Important: Requests scheduled to run during an upgrade of Gateway, or any Tanium solution that your request relies on, might be interrupted or fail. Schedule your connections to run at a different time than your Tanium upgrades.

Use Gateway to:

  • Query endpoints through the Tanium Server, or access data through Tanium Data Service (TDS)

  • Create, delete, and query actions

  • Query packages

  • Open a connection to an endpoint through Tanium Direct Connect and retrieve data from the endpoint

To view examples of available functions, see Reference: Gateway examples.

Create a persona limited to submitting only query requests

If you want to restrict a user's ability to modify information using Gateway, configure a role with read-only rights to certain Tanium Core Platform functionality, then create a persona and add the role to the persona. If a user with this persona active submits a mutation, the response contains an error because the persona does not have write access.

Note: The following role and persona limit Tanium Core Platform permissions for questions and actions. If you want to restrict other functionality, such as that associated with other Tanium solutions, you might need to add additional read-only permissions.

To create a custom role, see Configure a custom role. To create a persona, see Configure a persona.

  1. From the Main menu, go to Administration > Permissions > Roles and click New Role.
  2. Specify a Role Name, such as Gateway read-only role.
  3. Set the Permission Type to Allow.
  4. Select the Gateway API execute permission to allow the role to submit requests.
  5. Select the following permissions to restrict question access to read-only:
    • Interact - Ask Dynamic Questions special
    • Platform Content Permissions - Filter Group Read
    • Platform Content Permissions - Sensor read

    Select the following permissions to restrict action access to read-only:

    • Platform Content Permissions - Action Read
    • Platform Content Permissions - Filter Group Read
    • Platform Content Permissions - Package Read
    • Platform Content Permissions - Sensor Read
  6. Click Save.
  7. From the Main menu, go to Administration > Permissions > Personas and click New Persona.
  8. Specify a persona Name, such as Gateway read-only persona.
  9. Click Manage Roles.
  10. Select Gateway read-only role.
  11. Click Apply.
  12. Configure the user group, user, and computer group assignments.
  13. Click Save.

Test a query in Tanium Console

To access the query explorer in Tanium Console and run a query, perform the following steps:

  1. From the Main menu, go to Shared Services > Gateway.
  2. Enter a query in the query pane.

    For example, paste the following query to get the time from the Tanium Server:

    CODE
    {
      now
    }
    Tip: If the query explorer does not appear on the Gateway Overview page, click Customize Page and make sure the Query Explorer option is selected.
  3. (Optional) If a query or mutation uses variables, expand the QUERY VARIABLES pane and include the variables in the pane that expands.
  4. Click Execute Query Execute Query.

Gateway sends the query to the server and returns the response in the results pane.

Figure 1. Example query and response
Example query and response

For more information on the query explorer, see Query explorer.

Use the Documentation Explorer to view the schema

Gateway contains a schema reference that documents all queries, mutations, and objects that are available in Gateway. The schema reference is generated directly from the schema; refer to the schema reference in Gateway for the most up-to-date documentation.

To view the schema reference in the query explorer, click Docs to expand the Documentation Explorer pane of the query explorer.

Figure 2. Documentation Explorer pane
Documentation Explorer pane