Skip to content

Commit 3cbb955

Browse files
add the rest of security
1 parent 4f9ea1f commit 3cbb955

20 files changed

+704
-706
lines changed
Lines changed: 70 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,113 @@
11
---
22
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
63
linkTitle: Organization access tokens
4+
description: Create and manage organization access tokens to securely authenticate automated systems and CI/CD pipelines with Docker Hub
5+
keywords: organization access tokens, OAT, docker hub security, programmatic access, automation
76
aliases:
87
- /security/for-admins/access-tokens/
98
---
109

1110
{{< summary-bar feature_name="OATs" >}}
1211

12+
Organization access tokens (OATs) provide secure, programmatic access to Docker Hub for automated systems, CI/CD pipelines, and other business-critical tasks. Unlike personal access tokens tied to individual users, OATs are associated with your organization and can be managed by any organization owner.
13+
1314
> [!WARNING]
1415
>
15-
> Organization access tokens (OATs) are incompatible with Docker Desktop,
16-
> [Image Access Management (IAM)](/manuals/enterprise/security/hardened-desktop/image-access-management.md), and [Registry Access Management (RAM)](/manuals/enterprise/security/hardened-desktop/registry-access-management.md).
17-
>
18-
> If you use Docker Desktop, IAM, or RAM, you must use personal
19-
> access tokens instead.
20-
21-
An organization access token (OAT) is like a [personal access token
22-
(PAT)](/security/access-tokens/), but an OAT is associated with
23-
an organization and not a single user account. Use an OAT instead of a PAT to
24-
let business-critical tasks access Docker Hub repositories without connecting
25-
the token to single user. You must have a [Docker Team or Business
26-
subscription](/subscription/core-subscription/details/) to use OATs.
27-
28-
OATs provide the following advantages:
29-
30-
- You can investigate when the OAT was last used and then disable or delete it
31-
if you find any suspicious activity.
32-
- You can limit what each OAT has access to, which limits the impact if an OAT
33-
is compromised.
34-
- All company or organization owners can manage OATs. If one owner leaves the
35-
organization, the remaining owners can still manage the OATs.
36-
- OATs have their own Docker Hub usage limits that don't count towards your
37-
personal account's limits.
38-
39-
If you have existing [service accounts](/docker-hub/service-accounts/),
40-
Docker recommends that you replace the service accounts with OATs. OATs offer
41-
the following advantages over service accounts:
42-
43-
- Access permissions are easier to manage with OATs. You can assign access
44-
permissions to OATs, while service accounts require using teams for access
45-
permissions.
46-
- OATs are easier to manage. OATs are centrally managed in the Admin Console.
47-
For service accounts, you may need to sign in to that service account to
48-
manage it. If using single sign-on enforcement and the service account is not
49-
in your IdP, you may not be able to sign in to the service account to manage
50-
it.
51-
- OATs are not associated with a single user. If a user with access to the
52-
service account leaves your organization, you may lose access to the service
53-
account. OATs can be managed by any company or organization owner.
16+
> Organization access tokens are incompatible with Docker Desktop, Image Access Management, and Registry Access Management. If you use these features, use [personal access tokens](/manuals/security/access-tokens.md) instead.
17+
18+
## When to use organization access tokens
19+
20+
Use OATs for automated systems that need Docker Hub access without depending on individual user accounts:
21+
22+
- CI/CD pipelines: Build and deployment systems that push and pull images
23+
- Production systems: Applications that pull images during deployment
24+
- Monitoring tools: Systems that need to check repository status or pull images
25+
- Backup systems: Tools that periodically pull images for archival
26+
- Integration services: Third-party tools that integrate with your Docker Hub repositories
27+
28+
## Prerequisites
29+
30+
To create and use organization access tokens, you must have:
31+
32+
- A Docker Team or Business subscription
33+
- Owner permissions
34+
- Repositories you want to grant access to
35+
36+
## Key benefits
37+
38+
Benefits of using organization access tokens include:
39+
40+
- Organizational ownership: Not tied to individual users who might leave the company
41+
- Shared management: All organization owners can create and manage OATs
42+
- Separate usage limits: OATs have their own Docker Hub rate limits, not counting against personal accounts
43+
- Better security audit: Track when tokens were last used and identify suspicious activity
44+
- Granular permissions: Limit access to specific repositories and operations
5445

5546
## Create an organization access token
5647

57-
> [!IMPORTANT]
58-
>
59-
> Treat access tokens like a password and keep them secret. Store your tokens
60-
> securely in a credential manager for example.
48+
Owners can create tokens with these limits:
6149

62-
Company or organization owners can create up to:
63-
- 10 OATs for organizations with a Team subscription
64-
- 100 OATs for organizations with a Business subscription
50+
- Team subscription: Up to 10 OATs per organization
51+
- Business subscription: Up to 100 OATs per organization
6552

66-
Expired tokens count towards the total amount of tokens.
53+
Expired tokens count toward your total limit.
6754

6855
To create an OAT:
6956

7057
1. Sign in to [Docker Home](https://app.docker.com/) and select your
7158
organization.
7259
1. Select **Admin Console**, then **Access tokens**.
7360
1. Select **Generate access token**.
74-
1. Add a label and optional description for your token. Use something that
75-
indicates the use case or purpose of the token.
76-
1. Select the expiration date for the token.
77-
1. Expand the **Repository** drop-down to set access permission
78-
scopes for your token. To set Repository access scopes:
79-
1. Optional. Select **Read public repositories**.
80-
1. Select **Add repository** and choose a repository from the drop-down.
81-
1. Set the scopes for your repository &mdash; **Image Push** or
82-
**Image Pull**.
83-
1. Add more repositories as needed. You can add up to 50 repositories.
84-
1. Optional. Expand the **Organization** drop-down and select the
85-
**Allow management access to this organization's resources** checkbox. This
86-
setting enables organization management scopes for your token. The following
87-
organization management scopes are available:
61+
1. Configure token details:
62+
- Label: Descriptive name indicating the token's purpose
63+
- Description (optional): Additional details
64+
- Expiration date: When the token should expire
65+
1. Expand the **Repository** drop-down to set access permissions:
66+
1. Optional. Select **Read public repositories** for access to public repositories.
67+
1. Select **Add repository** and choose a repository from the drop-down.
68+
1. Set permissions for each repository: **Image Pull** or **Image Push**.
69+
1. Add up to 50 repositories as needed.
70+
1. Optional. Configure organization management permissions by expanding the **Organization** drop-down and selecting the **Allow management access to this organization's resources**:
8871
- **Member Edit**: Edit members of the organization
8972
- **Member Read**: Read members of the organization
9073
- **Invite Edit**: Invite members to the organization
9174
- **Invite Read**: Read invites to the organization
9275
- **Group Edit**: Edit groups of the organization
9376
- **Group Read**: Read groups of the organization
94-
1. Select **Generate token**. Copy the token that appears on the screen
95-
and save it. You won't be able to retrieve the token once you exit the
96-
screen.
77+
1. Select **Generate token**. Copy the token that appears on the screen and save it. You won't be able to retrieve the token once you exit the screen.
9778

98-
## Use an organization access token
79+
> [!IMPORTANT]
80+
>
81+
> Treat organization access tokens like passwords. Store them securely in a credential manager and never commit them to source code repositories.
9982
100-
You can use an organization access token when you sign in using Docker CLI.
83+
## Use organization access tokens
10184

102-
Sign in from your Docker CLI client with the following command, replacing
103-
`YOUR_ORG` with your organization name:
85+
Sign in to the Docker CLI using your organization access token:
10486

10587
```console
106-
$ docker login --username <YOUR_ORG>
88+
$ docker login --username <YOUR_ORGANIZATION_NAME>
89+
Password: [paste your OAT here]
10790
```
10891

109-
When prompted for a password, enter your organization access token instead of a
110-
password.
92+
When prompted for a password, enter your organization access token.
11193

11294
## Modify existing tokens
11395

114-
You can rename, update the description, update the repository access,
115-
deactivate, or delete a token as needed.
96+
To manage existing tokens:
11697

11798
1. Sign in to [Docker Home](https://app.docker.com/) and select your
11899
organization.
119100
1. Select **Admin Console**, then **Access tokens**.
120-
1. Select the actions menu in the token row, then select **Deactivate**, **Edit**, or **Delete** to modify the token. For **Inactive** tokens, you can only select **Delete**.
121-
1. If editing a token, select **Save** after specifying your modifications.
101+
1. Select the actions menu in the token row, you can:
102+
- **Edit**
103+
- **Deactivate**
104+
- **Delete**
105+
1. Select **Save** after making changes to a token.
106+
107+
## Organization access token best practices
108+
109+
- Regular token rotation: Set reasonable expiration dates and rotate tokens regularly to minimize security risks.
110+
- Principle of least privilege: Grant only the minimum repository access and permissions needed for each use case.
111+
- Monitor token usage: Regularly review when tokens were last used to identify unused or suspicious tokens.
112+
- Secure storage: Store tokens in secure credential management systems, never in plain text or source code.
113+
- Immediate revocation: Deactivate or delete tokens immediately if they're compromised or no longer needed.

0 commit comments

Comments
 (0)