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
* DOC-5333 RS: 7.22.0 June maintenance release notes
* Added license_expiration_days to v2 Prometheus metrics
* Fixed /users/password REST API reference
* Fixed REST API examples, links, and explanations in password rotation doc
* DOC-5333 Added more resolved issues
* DOC-5333 Feedback update - /users/password resolved issue wording
* DOC-5333 Added build number and checksums
* DOC-5333 Added resolved issue for incorrect status returned by DB endpoint availability API
|[POST](#add-password)|`/v1/users/password`| Add a new password |
18
+
|[DELETE](#delete-password)|`/v1/users/password`| Delete a password |
19
19
20
20
## Update password {#update-password}
21
21
22
22
PUT /v1/users/password
23
23
24
-
Replaces the password list of the user making this request with a single new password. The request authentication header must include the relevant username and password.
24
+
Replaces the password list of the specified user with a single new password. If a `username` is not provided in the JSON request body, it replaces the password list of the authenticated user making this request instead.
25
25
26
26
### Request {#put-request}
27
27
@@ -33,6 +33,7 @@ Replaces the password list of the user making this request with a single new pas
33
33
34
34
```json
35
35
{
36
+
"username": "The username of the affected user. If missing, default to the authenticated user.",
36
37
"new_password": "the new (single) password"
37
38
}
38
39
```
@@ -49,6 +50,7 @@ The request must contain a JSON object with the following fields:
49
50
50
51
| Field | Type | Description |
51
52
|-------|------|-------------|
53
+
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
52
54
| new_password | string | The new password (required) |
53
55
54
56
### Response {#put-response}
@@ -65,6 +67,8 @@ The following are possible `error_code` values:
65
67
|------|-------------|
66
68
| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). |
67
69
| new_password_same_as_current | The given new password is identical to one of the already existing passwords. |
70
+
| user_not_exist | User does not exist. |
71
+
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |
68
72
69
73
### Status codes {#put-status-codes}
70
74
@@ -73,12 +77,14 @@ The following are possible `error_code` values:
|[404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found)| User not found. |
76
82
77
83
## Add password {#add-password}
78
84
79
85
POST /v1/users/password
80
86
81
-
Adds a new password to the password list of the user making this request. The request authentication header must include the relevant username and password.
87
+
Adds a new password to the specified user's password list. If a `username` is not provided in the JSON request body, it adds the password to the password list of the authenticated user making this request instead.
82
88
83
89
### Request {#post-request}
84
90
@@ -90,6 +96,7 @@ Adds a new password to the password list of the user making this request. The re
90
96
91
97
```json
92
98
{
99
+
"username": "The username of the affected user. If missing, default to the authenticated user.",
93
100
"new_password": "a password to add"
94
101
}
95
102
```
@@ -106,6 +113,7 @@ The request must contain a JSON object with the following fields:
106
113
107
114
| Field | Type | Description |
108
115
|-------|------|-------------|
116
+
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
109
117
| new_password | string | New password to add (required) |
110
118
111
119
### Response {#post-response}
@@ -122,6 +130,8 @@ The following are possible `error_code` values:
122
130
|------|-------------|
123
131
| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). |
124
132
| new_password_same_as_current | The given new password is identical to one of the already existing passwords. |
133
+
| user_not_exist | User does not exist. |
134
+
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |
125
135
126
136
### Status codes {#post-status-codes}
127
137
@@ -130,12 +140,14 @@ The following are possible `error_code` values:
130
140
|[200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok)| Success, new password was added to the list of valid passwords. |
131
141
|[400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request)| Bad or missing parameters. |
132
142
|[401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized)| The user is unauthorized. |
|[404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found)| User not found. |
133
145
134
146
## Delete password {#delete-password}
135
147
136
148
DELETE /v1/users/password
137
149
138
-
Deletes a password from the password list of the user making this request. The request authentication header must include the relevant username and password.
150
+
Deletes a password from the specified user's password list. If a `username` is not provided in the JSON request body, it deletes the password from the password list of the authenticated user making this request instead.
139
151
140
152
### Request {#delete-request}
141
153
@@ -147,7 +159,8 @@ Deletes a password from the password list of the user making this request. The r
147
159
148
160
```json
149
161
{
150
-
"old_password": "an existing password"
162
+
"username": "The username of the affected user. If missing, default to the authenticated user.",
163
+
"old_password": "an existing password to delete"
151
164
}
152
165
```
153
166
@@ -163,6 +176,7 @@ The request must contain a JSON object with the following fields:
163
176
164
177
| Field | Type | Description |
165
178
|-------|------|-------------|
179
+
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
166
180
| old_password | string | Existing password to be deleted (required) |
167
181
168
182
### Response {#delete-response}
@@ -175,7 +189,9 @@ The following are possible `error_code` values:
175
189
176
190
| Code | Description |
177
191
|------|-------------|
178
-
| cannot_delete_last_password | Cannot delete the last password of a user |
192
+
| cannot_delete_last_password | Cannot delete the last password of a user. |
193
+
| user_not_exist | User does not exist. |
194
+
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |
179
195
180
196
### Status codes {#delete-status-codes}
181
197
@@ -184,3 +200,5 @@ The following are possible `error_code` values:
184
200
|[200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok)| Success, new password was deleted from the list of valid passwords. |
185
201
|[400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request)| Bad or missing parameters. |
186
202
|[401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized)| The user is unauthorized. |
0 commit comments