Skip to content

Commit 23b9df6

Browse files
Merge pull request #20731 from craig-osterhout/engdocs-2167
admin: add org access tokens
2 parents bcaa915 + 660044a commit 23b9df6

File tree

5 files changed

+130
-2
lines changed

5 files changed

+130
-2
lines changed

_vale/config/vocabularies/Docker/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Netplan
9292
Nginx
9393
NTLM
9494
Nuxeo
95+
OAT
9596
OAuth
9697
OCI
9798
OTel

content/manuals/admin/organization/activity-logs.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ Refer to the following section for a list of events and their descriptions:
6666
| Single Sign-On domain added | Details of the single sign-on domain added to your organization |
6767
| Single Sign-On domain removed | Details of the single sign-on domain removed from your organization |
6868
| Single Sign-On domain verified | Details of the single sign-on domain verified for your organization |
69+
| Access token created | Access token created in organization |
70+
| Access token updated | Access token updated in organization |
71+
| Access token deleted | Access token deleted in organization |
6972

7073
### Repository events
7174

content/manuals/docker-hub/release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Each organization page now breaks down into these tabs:
254254

255255
### New features
256256

257-
* You can now [create personal access tokens](access-tokens.md) in Docker Hub and use them to authenticate from the Docker CLI. Find them in your account settings, under the new **[Security](https://hub.docker.com/settings/security)** section.
257+
* You can now [create personal access tokens](/security/for-developers/access-tokens/) in Docker Hub and use them to authenticate from the Docker CLI. Find them in your account settings, under the new **[Security](https://hub.docker.com/settings/security)** section.
258258

259259
### Known Issues
260260

content/manuals/docker-hub/service-accounts.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ weight: 50
1111
>
1212
> Service accounts require a
1313
> [Docker Team, or Business subscription](../subscription/_index.md).
14+
>
15+
> Docker recommends that you use organization access tokens instead of service
16+
> accounts. For more details, see [Organization access
17+
> tokens](/security/for-admins/access-tokens/).
1418
1519
A service account is a Docker ID used for automated management of container images or containerized applications. Service accounts are typically used in automated workflows, and don't share Docker IDs with the members in the organization. Common use cases for service accounts include mirroring content on Docker Hub, or tying in image pulls from your CI/CD process.
1620

@@ -49,7 +53,7 @@ To create a new service account for your Team account:
4953
2. Create a [team](manage-a-team.md) in your organization and grant it read-only access to your private repositories.
5054
3. Add the new Docker ID to your [organization](orgs.md).
5155
4. Add the new Docker ID to the [team](manage-a-team.md) you created earlier.
52-
5. Create a new [personal access token (PAT)](access-tokens.md) from the user account and use it for CI.
56+
5. Create a new [personal access token (PAT)](/security/for-developers/access-tokens/) from the user account and use it for CI.
5357

5458
> [!NOTE]
5559
>
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: Organization access tokens
3+
description: Learn how to create and manage organization access tokens
4+
to securely push and pull images programmatically.
5+
keywords: docker hub, security, OAT, organization access token
6+
linkTitle: Organization access tokens (Beta)
7+
---
8+
9+
{{% experimental title="Beta" %}}
10+
The organization access tokens feature is currently in [Beta](../../release-lifecycle.md#beta).
11+
{{% /experimental %}}
12+
13+
> [!WARNING]
14+
>
15+
> Organization access tokens aren't currently compatible with Docker Build Cloud. If you
16+
> are using Docker Build Cloud, you must use personal access tokens instead.
17+
18+
An organization access token (OAT) is like a [personal access token
19+
(PAT)](/security/for-developers/access-tokens/), but an OAT is associated with
20+
an organization and not a single user account. Use an OAT instead of a PAT to
21+
let business-critical tasks access Docker Hub repositories without connecting
22+
the token to single user. You must have a [Docker Team or Business
23+
subscription](/subscription/core-subscription/details/) to use OATs.
24+
25+
OATs provide the following advantages:
26+
27+
- You can investigate when the OAT was last used and then disable or delete it
28+
if you find any suspicious activity.
29+
- You can limit what each OAT has access to, which limits the impact if an OAT
30+
is compromised.
31+
- All organization owners can manage OATs. If one owner leaves the organization,
32+
the remaining owners can still manage the OATs.
33+
- OATs have their own Docker Hub usage limits that don't count towards your
34+
personal account's limits.
35+
36+
If you have existing [service accounts](/docker-hub/service-accounts/), Docker recommends that you replace the service accounts with OATs. OATs offer the following advantages over service accounts:
37+
38+
- Access permissions are easier to manage with OATs. You can assign access
39+
permissions to OATs, while service accounts require using teams for access
40+
permissions.
41+
- OATs are easier to manage. OATs are centrally managed in the Admin Console.
42+
For service accounts, you may need to sign in to that service account to
43+
manage it. If using single sign-on enforcement and the service account is not
44+
in your IdP, you may not be able to sign in to the service account to manage
45+
it.
46+
- OATs are not associated with a single user. If a user with access to the
47+
service account leaves your organization, you may lose access to the service
48+
account. OATs can be managed by any organization owner.
49+
50+
## Create an organization access token
51+
52+
> [!IMPORTANT]
53+
>
54+
> Treat access tokens like a password and keep them secret. Store your tokens securely in a credential manager for example.
55+
56+
Organization owners can create up to 10 organization access tokens (OATs) for
57+
organizations with a Team subscription and up to 100 OATs for organizations with
58+
a Business subscription. Expired tokens count towards the total amount of
59+
tokens.
60+
61+
To create an OAT:
62+
63+
1. Sign in to the [Admin Console](https://app.docker.com/admin).
64+
65+
2. Select the organization you want to create an access token for.
66+
67+
3. Under **Security and access**, select **Access tokens**.
68+
69+
4. Select **Generate access token**.
70+
71+
5. Add a label and optional description for your token. Use something that indicates the use case or purpose of the token.
72+
73+
6. Select the expiration date for the token.
74+
75+
7. Select the repository access for the token.
76+
77+
The access permissions are scopes that set restrictions in your repositories.
78+
For example, for Read & Write permissions, an automation pipeline can build
79+
an image and then push it to a repository. However, it can't delete the
80+
repository. You can select one of the following options:
81+
82+
- **Public repositories (read only)**
83+
- **All repositories**: You can select read access, or read and write access.
84+
- **Select repositories**: You can select up to 50 repositories, and then
85+
select read access, or read and write access for each repository.
86+
87+
8. Select **Generate token** and then copy the token that appears on the screen
88+
and save it. You won't be able to retrieve the token once you exit the
89+
screen.
90+
91+
## Use an organization access token
92+
93+
You can use an organization access token when you sign in using Docker CLI.
94+
95+
Sign in from your Docker CLI client with the following command, replacing
96+
`YOUR_ORG` with your organization name:
97+
98+
```console
99+
$ docker login --username <YOUR_ORG>
100+
```
101+
102+
When prompted for a password, enter your organization access token instead of a
103+
password.
104+
105+
## Modify existing tokens
106+
107+
You can rename, update the description, update the repository access,
108+
deactivate, or delete a token as needed.
109+
110+
1. Sign in to the [Admin Console](https://app.docker.com/admin).
111+
112+
2. Select the organization you want to modify an access token for.
113+
114+
3. Under **Security and access**, select **Access tokens**.
115+
116+
4. Select the actions menu on the far right of a token row, then select
117+
**Deactivate**, **Edit**, or **Delete** to modify the token. For **Inactive**
118+
tokens, you can only select **Delete**.
119+
120+
5. If editing a token, select **Save** after specifying your modifications.

0 commit comments

Comments
 (0)