Personal Access Tokens

Trento allows users to create Personal Access Tokens (PATs) for authentication and authorization purposes in third-party integrations with the APIs exposed by its components:

Creating a Personal Access Token

Log in to Trento Web UI, click on your username in the top-right corner, and select Profile from the drop-down menu.

trento-web-profile
Figure 1. Profile
  1. Click Generate Token in the Personal Access Tokens section.

  2. When prompted, provide a name and an expiration date, then click Generate Token.

    trento-web-generate-pat
    Figure 2. Generate personal access token modal
  3. Copy the generated token starting with trento_pat_. Keep in mind that the token is shown only once. If you lose the token, you must generate a new one.

    trento-web-generated-pat
    Figure 3. Generated personal access token

Using a Personal Access Token

You can use the created Personal Access Token to authenticate API requests by including it in the Authorization header as a Bearer token.

$ curl -X GET "..." -H "Authorization: Bearer trento_pat_<rest_of_token>"

Deleting a Personal Access Token

To delete Personal Access Token, click its contextual Delete button in the Personal Access Tokens section of the profile.

trento-web-pats-list
Figure 4. Personal access tokens section

Confirm the deletion

trento-web-delete-pat-confirmation
Figure 5. Delete personal access token modal

Notes for user admins

User admins can delete tokens for other users. However, admins cannot create new tokens for other users.

To delete a token for another user, a user admin must perform the following steps:

  1. navigate to the Users page

  2. select a user

  3. click a token’s contextual Delete button in the Personal Access Tokens section