|
| 1 | +--- |
| 2 | +Title: Change password hashing algorithm requests |
| 3 | +alwaysopen: false |
| 4 | +categories: |
| 5 | +- docs |
| 6 | +- operate |
| 7 | +- rs |
| 8 | +description: REST API requests to change the hashing algorithm for user passwords. |
| 9 | +headerRange: '[1-2]' |
| 10 | +linkTitle: change_password_hashing_algorithm |
| 11 | +weight: $weight |
| 12 | +--- |
| 13 | + |
| 14 | +| Method | Path | Description | |
| 15 | +|--------|------|-------------| |
| 16 | +| [PATCH](#patch-change-password-hashing-algorithm) | `/v1/cluster/change_password_hashing_algorithm` | Change the hashing policy for user passwords | |
| 17 | + |
| 18 | +## Change password hashing algorithm {#patch-change-password-hashing-algorithm} |
| 19 | + |
| 20 | + PATCH /v1/cluster/change_password_hashing_algorithm |
| 21 | + |
| 22 | +Changes the password hashing algorithm for the entire cluster. When you change the hashing algorithm, it rehashes the administrator password and all user passwords, including default users. |
| 23 | + |
| 24 | +The hashing algorithm options are `SHA-256` or `PBKDF2`. The default hashing algorithm is `SHA-256`. |
| 25 | + |
| 26 | +#### Required permissions |
| 27 | + |
| 28 | +| Permission name | |
| 29 | +|-----------------| |
| 30 | +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | |
| 31 | + |
| 32 | +### Request {#patch-request} |
| 33 | + |
| 34 | +#### Example HTTP request |
| 35 | + |
| 36 | + PATCH /v1/cluster/change_password_hashing_algorithm |
| 37 | + |
| 38 | +#### Example JSON body |
| 39 | + |
| 40 | +```json |
| 41 | +{ "algorithm": "PBKDF2" } |
| 42 | +``` |
| 43 | + |
| 44 | +#### Request headers |
| 45 | + |
| 46 | +| Key | Value | Description | |
| 47 | +|-----|-------|-------------| |
| 48 | +| Host | cnm.cluster.fqdn | Domain name | |
| 49 | +| Accept | application/json | Accepted media type | |
| 50 | + |
| 51 | +#### Request body |
| 52 | + |
| 53 | +Include a JSON object `{ "algorithm": "<option>" }` in the request body. The hashing algorithm options are `SHA-256` or `PBKDF2`. |
| 54 | + |
| 55 | +### Response {#patch-response} |
| 56 | + |
| 57 | +Returns a status code that indicates the success or failure of the update. |
| 58 | + |
| 59 | +### Status codes {#patch-status-codes} |
| 60 | + |
| 61 | +| Code | Description | |
| 62 | +|------|-------------| |
| 63 | +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success | |
| 64 | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Supported algorithm must be provided, or this algorithm is already set | |
0 commit comments