Enabling long-lived Tanium sessions through API tokens
API tokens overview
Tanium™ API authentication tokens enable users to establish long-lived sessions with Tanium Cloud without repeatedly re-authenticating for workflows that are long-lived but not continuously running. For example, you can add a token that enables the synchronization of patch definitions and statuses between the Tanium Patch module and the Tanium Patch Management for IT Operations application in a ServiceNow instance.
Tokens have a configurable expiration interval. To prevent interruptions to long-lived workflows, users must rotate tokens: request new tokens and revoke the current ones before they expire.
Token permissions
A token can authenticate only the service account, user account, or persona that you select for the token when creating it. Each account or persona can have multiple tokens. The role permissions of a token are those of the account or persona that you select when creating the token. If the permissions of an account or persona change after the token is created, the token permissions change to match those of the account or persona.
Best practices for tokens
Observe the following best practices when you create tokens:
-
Use service accounts
Select a service account for every token unless the token is for workflows that a specific user account or persona must run according to the mandates of your organization. If users or personas are deleted, disabled, or locked out (such as when a user leaves your organization), their tokens produce 401 Unauthorized errors when other accounts or personas try to use those tokens. Such errors are less likely for tokens that are bound to service accounts because those accounts are more often permanent.
-
Use one token per process
Do not use a single token for multiple processes. For example, do not use a single token for a ServiceNow integration and a Splunk integration, or for multiple ServiceNow instances, or for multiple connections from one ServiceNow instance to Tanium Cloud. When a token rotates for any process, that token stops working for any other processes that use it.
View API token details
Viewing API token attributes can help you to determine if new tokens are necessary and to manage or troubleshoot existing tokens. For example, you can check if a token is about to expire and for which user the token is bound. The API Tokens grid shows only valid tokens and stops showing tokens that you revoke.
Create an API token
Rotate an API token
To extend the expiration interval of a token without changing any of its other settings, rotate the token. Rotation deletes the existing token and creates a new one. The expiration timer of the new token is reset and has the same interval as the deleted token.
Revoke API tokens
You might want to revoke an API token if you have doubts about its security or if its associated user is no longer with your organization.