Skip to content

Commit b5e45c3

Browse files
Add APIRequest examples under CH custom ciphers instructions
1 parent a31cd62 commit b5e45c3

File tree

1 file changed

+70
-5
lines changed
  • src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management

1 file changed

+70
-5
lines changed

src/content/docs/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/enforce-mtls.mdx

Lines changed: 70 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,77 @@ Refer to [Customize cipher suites - SSL/TLS](/ssl/edge-certificates/additional-o
128128

129129
<Details header="Restrict cipher suites for custom hostname">
130130

131-
In the API documentation, refer to [SSL properties of a custom hostname](/api/resources/custom_hostnames/methods/edit/).
131+
In the API documentation, refer to [SSL properties of a custom hostname](/api/resources/custom_hostnames/methods/edit/). Besides the `settings` specifications, you must include `type` and `method` within the `ssl` object, as explained below.
132132

133-
<Render
134-
file="edit-custom-hostname-api"
135-
params={{ one: "When making the request," }}
136-
product="cloudflare-for-platforms"
133+
1. Make a `GET` request to the [Custom Hostname Details](/api/resources/custom_hostnames/methods/get/) endpoint to check what are the current values for `ssl.type` and `ssl.method`.
134+
135+
<Details header="Check custom hostname TLS settings">
136+
137+
<APIRequest
138+
path="/zones/{zone_id}/custom_hostnames/{custom_hostname_id}"
139+
method="GET"
140+
/>
141+
142+
```json title="Response example" collapse={5-16, 21-40} ""method": "http"," ""type": "dv","
143+
"success": true,
144+
"result": {
145+
"id": "<CUSTOM_HOSTNAME_ID>",
146+
"ssl": {
147+
"id": "<CERTIFICATE_ID>",
148+
"bundle_method": "ubiquitous",
149+
"certificate_authority": "<CERTIFICATE_AUTHORITY>",
150+
"custom_certificate": "",
151+
"custom_csr_id": "",
152+
"custom_key": "",
153+
"expires_on": "",
154+
"hosts": [
155+
"app.example.com",
156+
"*.app.example.com"
157+
],
158+
"issuer": "",
159+
"method": "http",
160+
"settings": {},
161+
"signature": "SHA256WithRSA",
162+
"type": "dv",
163+
"uploaded_on": "2020-02-06T18:11:23.531995Z",
164+
"validation_errors": [
165+
{
166+
"message": "SERVFAIL looking up CAA for app.example.com"
167+
}
168+
],
169+
"validation_records": [
170+
{
171+
"emails": [
172+
173+
174+
],
175+
"http_body": "ca3-574923932a82475cb8592200f1a2a23d",
176+
"http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
177+
"txt_name": "_acme-challenge.app.example.com",
178+
"txt_value": "810b7d5f01154524b961ba0cd578acc2"
179+
}
180+
],
181+
"wildcard": false
182+
},
183+
}
184+
```
185+
186+
</Details>
187+
188+
2. After you take note of these values, make a `PATCH` request to the [Edit Custom Hostname](/api/resources/custom_hostnames/methods/edit/) endpoint, providing both the list of authorized cipher suites and the same `type` and `method` values that you obtained from the previous step.
189+
190+
<APIRequest
191+
path="/zones/{zone_id}/custom_hostnames/{custom_hostname_id}"
192+
method="PATCH"
193+
json={{
194+
ssl: {
195+
method: "http",
196+
type: "dv",
197+
settings: {
198+
"ciphers": ["ECDHE-ECDSA-AES128-GCM-SHA256","ECDHE-RSA-AES128-GCM-SHA256"]
199+
}
200+
}
201+
}}
137202
/>
138203

139204
</Details>

0 commit comments

Comments
 (0)