Skip to content

Commit 56c2504

Browse files
committed
Fixed REST API examples, links, and explanations in password rotation doc
1 parent 602bb49 commit 56c2504

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

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

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

4242
## Rotate password
4343

44-
To rotate your password:
44+
To rotate passwords:
4545

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

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

53-
After you send this request, you can authenticate with both the old and the new password.
56+
After you send this request, the user can authenticate with both the old and the new password.
5457

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

5861
```sh
5962
DELETE https://<host>:<port>/v1/users/password
60-
{ "old_password": "<an_existing_password>" }
63+
{
64+
"username": "<target_username>",
65+
"old_password": "<existing_password_to_delete>"
66+
}
6167
```
6268

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

6571
## Replace all passwords
6672

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

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

0 commit comments

Comments
 (0)