Skip to content

Commit 73d2df3

Browse files
authored
RS 7.8.6 June maintenance release docs (#1730)
* Fixed /users/password REST API reference * Fixed REST API examples, links, and explanations in password rotation doc * DOC-5351 RS: 7.8.6 June maintenance release notes * DOC-5351 Feedback update - /users/password resolved issue wording
1 parent 4bc5ffd commit 73d2df3

File tree

3 files changed

+283
-18
lines changed

3 files changed

+283
-18
lines changed

content/operate/rs/7.8/references/rest-api/requests/users/password.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ url: '/operate/rs/7.8/references/rest-api/requests/users/password/'
1414

1515
| Method | Path | Description |
1616
|----------------------------|----------------------|-----------------------------|
17-
| [PUT](#update-password) | `/v1/users/password` | Replace the password of the authenticated user |
18-
| [POST](#add-password) | `/v1/users/password` | Add a new password for the authenticated user |
19-
| [DELETE](#delete-password) | `/v1/users/password` | Delete a password for the authenticated user |
17+
| [PUT](#update-password) | `/v1/users/password` | Replace passwords |
18+
| [POST](#add-password) | `/v1/users/password` | Add a new password |
19+
| [DELETE](#delete-password) | `/v1/users/password` | Delete a password |
2020

2121
## Update password {#update-password}
2222

2323
PUT /v1/users/password
2424

25-
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.
25+
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.
2626

2727
### Request {#put-request}
2828

@@ -34,6 +34,7 @@ Replaces the password list of the user making this request with a single new pas
3434

3535
```json
3636
{
37+
"username": "The username of the affected user. If missing, default to the authenticated user.",
3738
"new_password": "the new (single) password"
3839
}
3940
```
@@ -50,6 +51,7 @@ The request must contain a JSON object with the following fields:
5051

5152
| Field | Type | Description |
5253
|-------|------|-------------|
54+
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
5355
| new_password | string | The new password (required) |
5456

5557
### Response {#put-response}
@@ -66,6 +68,8 @@ The following are possible `error_code` values:
6668
|------|-------------|
6769
| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). |
6870
| new_password_same_as_current | The given new password is identical to one of the already existing passwords. |
71+
| user_not_exist | User does not exist. |
72+
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |
6973

7074
### Status codes {#put-status-codes}
7175

@@ -74,12 +78,14 @@ The following are possible `error_code` values:
7478
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, password changed. |
7579
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad or missing parameters. |
7680
| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The user is unauthorized. |
81+
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Insufficient privileges. |
82+
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | User not found. |
7783

7884
## Add password {#add-password}
7985

8086
POST /v1/users/password
8187

82-
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.
88+
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.
8389

8490
### Request {#post-request}
8591

@@ -91,6 +97,7 @@ Adds a new password to the password list of the user making this request. The re
9197

9298
```json
9399
{
100+
"username": "The username of the affected user. If missing, default to the authenticated user.",
94101
"new_password": "a password to add"
95102
}
96103
```
@@ -107,6 +114,7 @@ The request must contain a JSON object with the following fields:
107114

108115
| Field | Type | Description |
109116
|-------|------|-------------|
117+
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
110118
| new_password | string | New password to add (required) |
111119

112120
### Response {#post-response}
@@ -123,6 +131,8 @@ The following are possible `error_code` values:
123131
|------|-------------|
124132
| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). |
125133
| new_password_same_as_current | The given new password is identical to one of the already existing passwords. |
134+
| user_not_exist | User does not exist. |
135+
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |
126136

127137
### Status codes {#post-status-codes}
128138

@@ -131,12 +141,14 @@ The following are possible `error_code` values:
131141
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, new password was added to the list of valid passwords. |
132142
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad or missing parameters. |
133143
| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The user is unauthorized. |
144+
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Insufficient privileges. |
145+
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | User not found. |
134146

135147
## Delete password {#delete-password}
136148

137149
DELETE /v1/users/password
138150

139-
Deletes a password from the password list of the user making this request. The request authentication header must include the relevant username and password.
151+
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.
140152

141153
### Request {#delete-request}
142154

@@ -148,7 +160,8 @@ Deletes a password from the password list of the user making this request. The r
148160

149161
```json
150162
{
151-
"old_password": "an existing password"
163+
"username": "The username of the affected user. If missing, default to the authenticated user.",
164+
"old_password": "an existing password to delete"
152165
}
153166
```
154167

@@ -164,6 +177,7 @@ The request must contain a JSON object with the following fields:
164177

165178
| Field | Type | Description |
166179
|-------|------|-------------|
180+
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
167181
| old_password | string | Existing password to be deleted (required) |
168182

169183
### Response {#delete-response}
@@ -176,7 +190,9 @@ The following are possible `error_code` values:
176190

177191
| Code | Description |
178192
|------|-------------|
179-
| cannot_delete_last_password | Cannot delete the last password of a user |
193+
| cannot_delete_last_password | Cannot delete the last password of a user. |
194+
| user_not_exist | User does not exist. |
195+
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |
180196

181197
### Status codes {#delete-status-codes}
182198

@@ -185,3 +201,5 @@ The following are possible `error_code` values:
185201
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, new password was deleted from the list of valid passwords. |
186202
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad or missing parameters. |
187203
| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The user is unauthorized. |
204+
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Insufficient privileges. |
205+
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | User not found. |

content/operate/rs/7.8/security/access-control/manage-passwords/rotate-passwords.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,46 @@ The new password cannot already exist as a password for the user and must meet t
4242

4343
## Rotate password
4444

45-
To rotate your password:
45+
To rotate passwords:
4646

47-
1. Add an additional password to your password list with [`POST /v1/users/password`]({{< relref "/operate/rs/7.8/references/rest-api/requests/users/password#add-password" >}}). You must provide the relevant username and current password for [basic authentication]({{<relref "/operate/rs/7.8/references/rest-api#authentication">}}) credentials when you send the request.
47+
1. Add an additional password to a user's password list with [`POST /v1/users/password`]({{< relref "/operate/rs/7.8/references/rest-api/requests/users/password#add-password" >}}).
4848

4949
```sh
5050
POST https://<host>:<port>/v1/users/password
51-
{ "new_password": "<a_new_password>" }
51+
{
52+
"username": "<target_username>",
53+
"new_password": "<a_new_password>"
54+
}
5255
```
5356

54-
After you send this request, you can authenticate with both the old and the new password.
57+
After you send this request, the user can authenticate with both the old and the new password.
5558

5659
1. Update the password in all database connections that connect with the user account.
57-
1. Delete the original password with [`DELETE /v1/users/password`]({{< relref "/operate/rs/7.8/references/rest-api/requests/users/password#update-password" >}}):
60+
1. Delete the original password with [`DELETE /v1/users/password`]({{< relref "/operate/rs/7.8/references/rest-api/requests/users/password#delete-password" >}}):
5861

5962
```sh
6063
DELETE https://<host>:<port>/v1/users/password
61-
{ "old_password": "<an_existing_password>" }
64+
{
65+
"username": "<target_username>",
66+
"old_password": "<existing_password_to_delete>"
67+
}
6268
```
6369

6470
If there is only one valid password for a user account, you cannot delete that password.
6571

6672
## Replace all passwords
6773

68-
You can also replace all existing passwords for your user account with a single password that does not match any existing passwords.
74+
You can also replace all existing passwords for a user account with a single password that does not match any existing passwords.
6975
This can be helpful if you suspect that your passwords are compromised and you want to quickly resecure the account.
7076

71-
To replace your passwords, use [`PUT /v1/users/password`]({{< relref "/operate/rs/7.8/references/rest-api/requests/users/password#delete-password" >}}). You must provide the relevant username and current password for [basic authentication]({{<relref "/operate/rs/7.8/references/rest-api#authentication">}}) credentials when you send the request.
77+
To replace a user's passwords, use [`PUT /v1/users/password`]({{< relref "/operate/rs/7.8/references/rest-api/requests/users/password#update-password" >}}).
7278
7379
```sh
7480
PUT https://<host>:<port>/v1/users/password
75-
{ "new_password": "<a_new_password>" }
81+
{
82+
"username": "<target_username>",
83+
"new_password": "<a_new_password>"
84+
}
7685
```
7786
78-
After this request, all of your existing passwords are deleted and only the new password is valid.
87+
After this request, all of the user's existing passwords are deleted and only the new password is valid.

0 commit comments

Comments
 (0)