You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve auth docs and add oat tags for use (#22045)
<!--Delete sections as needed -->
## Description
This improves our authentication docs in our API. Additionally, we need
to note on certain routes where OAT bearers are allowed.
## Related issues or tickets
<!-- Related issues, pull requests, or Jira tickets -->
## Reviews
<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->
- [x] Technical review
- [x] Editorial review
- [ ] Product review
---------
Co-authored-by: Sarah Sanders <[email protected]>
Copy file name to clipboardExpand all lines: content/reference/api/hub/latest.yaml
+89-9Lines changed: 89 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,50 @@ tags:
50
50
Additionally, similar to the Docker Hub UI features, API endpoint responses may vary depending on your plan (Personal, Pro, or Team) and your account's permissions.
51
51
52
52
To learn more about the features available in each plan and to upgrade your existing plan, see [Docker Pricing](https://www.docker.com/pricing).
53
+
54
+
# Types
55
+
56
+
The Docker Hub API supports the following authentication types.
57
+
58
+
You must use each authentication type with the [Create access token](#tag/authentication-api/operation/AuthCreateAccessToken) route to obtain a bearer token.
59
+
60
+
## Password
61
+
Using a username and password is the most powerful, yet least secure way
62
+
to authenticate with Docker as a user. It allows access to resources
63
+
for the user without scopes.
64
+
65
+
_In general, it is recommended to use a personal access token (PAT) instead._
66
+
67
+
_**The password authentication type is not available if your organization has SSO enforced.**_
68
+
69
+
## Personal Access Token (PAT)
70
+
Using a username and PAT is the most secure way to authenticate with
71
+
Docker as a user. PATs are scoped to specific resources and scopes.
72
+
73
+
Currently, a PAT is a more secure password due to limited functionality.
74
+
In the future, we may add fine-grained access like organization
75
+
access tokens for enhanced usage and security.
76
+
77
+
## Organization Access Token (OAT)
78
+
Organization access tokens are scoped to specific resources and scopes
79
+
in an organization. They are managed by organization owners.
80
+
81
+
These tokens are meant for automation and are not meant to be used by
82
+
users.
83
+
84
+
# Labels
85
+
86
+
These labels will show up on routes in this reference that allow for use of bearer
87
+
tokens issued from them.
88
+
89
+
<span class="pat"></span>
90
+
<span class="oat"></span>
91
+
- name: authentication-api
92
+
x-displayName: Authentication
93
+
description: |
94
+
The authentication endpoints allow you to authenticate with Docker Hub APIs.
95
+
96
+
For more information, see [Authentication](#tag/authentication).
53
97
- name: access-tokens
54
98
x-displayName: Personal Access Tokens
55
99
description: |
@@ -110,7 +154,7 @@ paths:
110
154
/v2/users/login:
111
155
post:
112
156
tags:
113
-
- authentication
157
+
- authentication-api
114
158
summary: Create an authentication token
115
159
operationId: PostUsersLogin
116
160
security: []
@@ -123,7 +167,7 @@ paths:
123
167
_**As of September 16, 2024, this route requires a personal access token (PAT) instead of a password if your organization has SSO enforced.**_
0 commit comments