Skip to content

Commit

Permalink
Introduce DTR access tokens (docker#394)
Browse files Browse the repository at this point in the history
* Introduce DTR access tokens
  • Loading branch information
joaofnfernandes authored and Jim Galasyn committed Apr 16, 2018
1 parent 3d8bf74 commit fc4c17d
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _data/toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2419,6 +2419,8 @@ manuals:
title: Create and manage webhooks
- path: /datacenter/dtr/2.5/guides/user/create-promotion-policies/
title: Create promotion policies
- title: Manage access tokens
path: /datacenter/dtr/2.5/guides/user/access-tokens/
- path: /datacenter/dtr/2.5/guides/release-notes/
title: Release notes
- path: /datacenter/dtr/2.5/guides/support/
Expand Down
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.
53 changes: 53 additions & 0 deletions datacenter/dtr/2.5/guides/user/access-tokens.md
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
```

0 comments on commit fc4c17d

Please sign in to comment.