forked from docker/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce DTR access tokens (docker#394)
* Introduce DTR access tokens
- Loading branch information
1 parent
3d8bf74
commit fc4c17d
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: Manage access tokens | ||
description: Learn how to create and manage your personal DTR access tokens to securely | ||
integrate DTR with other products. | ||
keywords: dtr, security, access tokens | ||
ui_tabs: | ||
- version: dtr-2.5 | ||
orhigher: true | ||
--- | ||
|
||
{% if include.ui %} | ||
{% if include.version=="dtr-2.5" %} | ||
|
||
Docker Trusted Registry allows you to issue access tokens so that you can | ||
integrate with other services without having to give those services your | ||
credentials. An access token is issued for a user and has the same DTR | ||
permissions the user has. | ||
|
||
It's better to use access tokens to build integrations since you can issue | ||
multiple tokens, one for each integration, and revoke them at any time. | ||
|
||
## Create an access token | ||
|
||
In the **DTR web UI**, navigate to your user profile, and choose **Access tokens**. | ||
|
||
![Token list](../images/access-tokens-1.png){: .with-border} | ||
|
||
Click **New access token**, and assign a meaningful name to your token. | ||
Choose a name that indicates where the token is going to be used, or what’s the | ||
purpose for the token. Administrators can also create tokens for other users. | ||
|
||
![Create token](../images/access-tokens-2.png){: .with-border} | ||
|
||
Once the token is created you won’t be able to see it again, but you can | ||
rename it if needed. | ||
|
||
{% endif %} | ||
{% endif %} | ||
|
||
## Use the access token | ||
|
||
You can use an access token in any place that requires your DTR password. | ||
As an example you can use access tokens to login in from your Docker CLI client: | ||
|
||
``` | ||
docker login dtr.example.org --username <username> --password <token> | ||
``` | ||
|
||
To use the DTR API to list the repositories your user has access to: | ||
|
||
``` | ||
curl --silent --insecure --user <username>:<token> dtr.example.org/api/v0/repositories | ||
``` |