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.
-
Click Generate Token in the Personal Access Tokens section.
-
When prompted, provide a name and an expiration date, then click Generate Token.
Figure 2. Generate personal access token modal -
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.
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.
Confirm the deletion
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:
-
navigate to the Users page
-
select a user
-
click a token’s contextual Delete button in the Personal Access Tokens section