Skip to content

Commit 4270cf3

Browse files
committed
DOC-5210 Updated certificate REST API requests reference for customer-provided INE certs
1 parent cb145aa commit 4270cf3

File tree

2 files changed

+100
-12
lines changed

2 files changed

+100
-12
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
Title: Certificates object
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- operate
7+
- rs
8+
description: An object that represents a certificate
9+
linkTitle: certificates
10+
weight: $weight
11+
---
12+
13+
An API object that represents a certificate used by a Redis Enterprise Software cluster.
14+
15+
| Name | Type/Value | Description |
16+
|------|------------|-------------|
17+
| name | `cm`<br />`api`<br />`mtls_trusted_ca`<br />`proxy`<br />`metrics_exporter`<br />`syncer`<br />`ldap_client`<br />`ccs_internode_encryption`<br />`data_internode_encryption` | Certificate type.<br />See the [certificates table]({{< relref "/operate/rs/security/certificates" >}}) for the list of cluster certificates and their descriptions. |
18+
| certificate | string | The certificate in PEM format |
19+
| key | string | The private key in PEM format |

content/operate/rs/references/rest-api/requests/cluster/certificates/_index.md

Lines changed: 81 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ weight: $weight
1515
| Method | Path | Description |
1616
|--------|------|-------------|
1717
| [GET](#get-cluster-certificates) | `/v1/cluster/certificates` | Get cluster certificates |
18-
| [PUT](#put-cluster-update_cert) | `/v1/cluster/update_cert` | Update a cluster certificate |
18+
| [PUT](#put-cluster-certificates) | `/v1/cluster/certificates` | Update cluster certificates |
19+
| [PUT](#put-cluster-update_cert) | `/v1/cluster/update_cert` | Update a cluster certificate (deprecated as of Redis Enterprise Software version 7.22.2) |
1920
| [DELETE](#delete-cluster-certificate) | `/v1/cluster/certificates/{certificate_name}` | Delete cluster certificate |
2021

2122
## Get cluster certificates {#get-cluster-certificates}
@@ -62,15 +63,83 @@ Returns a JSON object that contains the cluster's certificates and keys.
6263

6364
| Code | Description |
6465
|------|-------------|
65-
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |
66+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error |
6667

6768

69+
## Update cluster certificates {#put-cluster-certificates}
70+
71+
```sh
72+
PUT /v1/cluster/certificates
73+
```
74+
75+
Replaces multiple cluster certificates with the provided certificates on all nodes within the cluster. This endpoint validates all provided certificates before actually updating the cluster.
76+
77+
See the [certificates table]({{< relref "/operate/rs/security/certificates" >}}) for the list of cluster certificates and their descriptions.
78+
79+
### Request {#put-certificates-request}
80+
81+
#### Example HTTP request
82+
83+
```sh
84+
PUT /v1/cluster/certificates
85+
```
86+
87+
#### Example JSON body
88+
89+
```json
90+
{
91+
"certificates": [
92+
{
93+
"name": "proxy",
94+
"certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
95+
"key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
96+
},
97+
{
98+
"name": "api",
99+
"certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
100+
"key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
101+
}
102+
]
103+
}
104+
```
105+
106+
#### Request headers
107+
108+
| Key | Value | Description |
109+
|-----|-------|-------------|
110+
| Host | cnm.cluster.fqdn | Domain name |
111+
| Accept | application/json | Accepted media type |
112+
113+
#### Request body
114+
115+
Include an array of [certificate objects]({{<relref "/operate/rs/references/rest-api/objects/certificates">}}) in the request body.
116+
117+
### Response {#put-certificates-response}
118+
119+
Returns a `200 OK` status code if all certificates are successfully replaced across the entire cluster.
120+
121+
If the response returns a failed status code, you should retry updating the certificates in case the cluster is no longer in an optimal state.
122+
123+
### Status codes {#put-certificates-status-codes}
124+
125+
| Code | Description |
126+
|------|-------------|
127+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error |
128+
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Failed, invalid certificate(s) |
129+
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Failed, unknown certificate(s) |
130+
| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Failed, expired certificate(s) |
131+
| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Failed, not all nodes have been updated |
132+
68133
## Update cluster certificate {#put-cluster-update_cert}
69134

70135
```sh
71136
PUT /v1/cluster/update_cert
72137
```
73138

139+
{{<note>}}
140+
This REST API path is deprecated as of Redis Enterprise Software 7.22.2 and will be removed in a future version. Use [`PUT /v1/cluster/certificates`](#put-cluster-certificates) instead.
141+
{{</note>}}
142+
74143
Replaces an existing certificate on all nodes within the cluster with a new certificate. The new certificate must pass validation before it can replace the old certificate.
75144

76145
See the [certificates table]({{< relref "/operate/rs/security/certificates" >}}) for the list of cluster certificates and their descriptions.
@@ -105,12 +174,12 @@ Otherwise, retry the certificate update in case the failure was due to a tempora
105174

106175
| Code | Description |
107176
|------|-------------|
108-
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |
109-
| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Failed, invalid certificate. |
110-
| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Failed, unknown certificate. |
111-
| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Failed, invalid certificate. |
112-
| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Failed, expired certificate. |
113-
| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Failed, not all nodes have been updated. |
177+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error |
178+
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Failed, invalid certificate. |
179+
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Failed, unknown certificate. |
180+
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Failed, invalid certificate. |
181+
| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Failed, expired certificate. |
182+
| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Failed, not all nodes have been updated. |
114183

115184

116185
## Delete cluster certificate {#delete-cluster-certificate}
@@ -143,7 +212,7 @@ Returns a status code that indicates the certificate deletion success or failure
143212

144213
| Code | Description |
145214
|------|-------------|
146-
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Operation successful |
147-
| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Failed, requested deletion of an unknown certificate |
148-
| [403 Forbidden](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4) | Failed, requested deletion of a required certificate |
149-
| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed, error while deleting certificate from disk |
215+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Operation successful |
216+
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Failed, requested deletion of an unknown certificate |
217+
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Failed, requested deletion of a required certificate |
218+
| [500 Internal Server Error](https://www.rfc-editor.org/rfc/rfc9110.html#name-500-internal-server-error) | Failed, error while deleting certificate from disk |

0 commit comments

Comments
 (0)