|
1 | 1 | --- |
2 | | -title: Customize cipher suites |
| 2 | +title: Customize cipher suites via API |
3 | 3 | pcx_content_type: how-to |
4 | 4 | sidebar: |
5 | | - order: 1 |
6 | | -head: |
7 | | - - tag: title |
8 | | - content: Customize cipher suites |
9 | | - |
| 5 | + order: 2 |
| 6 | + label: Use the API |
10 | 7 | --- |
11 | 8 |
|
12 | | -import { Render, TabItem, Tabs } from "~/components" |
13 | | - |
14 | | -With [Advanced Certificate Manager](/ssl/edge-certificates/advanced-certificate-manager/) or within [Cloudflare for SaaS](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/), you can restrict connections between Cloudflare and clients — such as your visitor's browser — to specific [cipher suites](/ssl/edge-certificates/additional-options/cipher-suites/). |
15 | | - |
16 | | -You may want to do this to follow specific [recommendations](/ssl/edge-certificates/additional-options/cipher-suites/recommendations/), to [disable weak cipher suites](/ssl/edge-certificates/additional-options/cipher-suites/troubleshooting/#ssl-labs-weak-ciphers-report), or to comply with [industry standards](/ssl/edge-certificates/additional-options/cipher-suites/compliance-status/). |
| 9 | +import { Render, TabItem, Tabs } from "~/components"; |
17 | 10 |
|
18 | | -Customizing cipher suites will not lead to any downtime in your SSL/TLS protection. |
| 11 | +<Render file="cipher-suites-definition" /> |
19 | 12 |
|
20 | 13 | :::note |
21 | | -This documentation only refers to connections [between clients and the Cloudflare network](/ssl/concepts/#edge-certificate). For connections between Cloudflare and your origin server, refer to [Origin server > Cipher suites](/ssl/origin-configuration/cipher-suites/). |
| 14 | +<Render file="cipher-suites-saas-linkout" /> |
22 | 15 | ::: |
23 | 16 |
|
24 | | -## How it works |
25 | | - |
26 | | -Custom cipher suites is a hostname-level setting, which implies that: |
27 | | - |
28 | | -* When you customize cipher suites for a [zone](/fundamentals/setup/accounts-and-zones/#zones), this will affect all hostnames within that zone. |
29 | | -* The configuration is applicable to all edge certificates used to connect to the hostname(s), regardless of [certificate type](/ssl/edge-certificates/) (universal, advanced, or custom). |
30 | | -* If you need to use a per-hostname cipher suite customization, you must ensure that the hostname is specified on the certificate. |
31 | | - |
32 | | -### Scope |
33 | | - |
34 | | -Currently, you can only customize cipher suites when using the API: |
35 | | - |
36 | | -* [Zone](/api/resources/zones/subresources/settings/methods/edit/) (using `ciphers` as the setting name in the URI path) |
37 | | -* [Per-hostname](/api/resources/hostnames/subresources/settings/subresources/tls/methods/update/) (regular zones only) |
38 | | -* [Custom hostname](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/enforce-mtls/#cipher-suites) (Cloudflare for SaaS zones only) |
39 | | - |
40 | | -### Settings priority and ciphers order |
41 | | - |
42 | | -Cloudflare uses the [hostname priority logic](/ssl/reference/certificate-and-hostname-priority/) to determine which setting to apply. |
43 | | - |
44 | | -ECDSA cipher suites are prioritized over RSA, and Cloudflare preserves the specified cipher suites in the order they are set. This means that, if both ECDSA and RSA are used, Cloudflare presents the ECDSA ciphers first - in the order they were set - and then the RSA ciphers, also in the order they were set. |
45 | | - |
46 | | -## Set up |
47 | | - |
48 | | - |
49 | | -:::note |
50 | | -For guidance around custom hostnames, refer to [TLS settings - Cloudflare for SaaS](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/enforce-mtls/#cipher-suites). |
51 | | -::: |
52 | | - |
53 | | -### Before you begin |
| 17 | +## Before you begin |
54 | 18 |
|
55 | 19 | Note that: |
56 | 20 |
|
57 | 21 | * Cipher suites are used in combination with other [SSL/TLS settings](/ssl/edge-certificates/additional-options/cipher-suites/#related-ssltls-settings). |
58 | 22 | * You cannot set specific TLS 1.3 ciphers. Instead, you can [enable TLS 1.3](/ssl/edge-certificates/additional-options/tls-13/#enable-tls-13) for your entire zone and Cloudflare will use all applicable [TLS 1.3 cipher suites](/ssl/edge-certificates/additional-options/cipher-suites/supported-cipher-suites/). |
59 | 23 | * Each cipher suite also supports a specific algorithm (RSA or ECDSA) so you should consider the algorithms in use by your edge certificates when making your ciphers selection. You can find this information under each certificate listed in [**SSL/TLS** > **Edge Certificates**](https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls/edge-certificates). |
60 | 24 | * It is not possible to configure minimum TLS version nor cipher suites for [Cloudflare Pages](/pages/) hostnames. |
| 25 | +* If setting up a per-hostname cipher suite customization, make sure that the hostname is specified on the certificate (instead of being covered by a wildcard). |
61 | 26 | * If you use Windows you might need to adjust the `curl` syntax, refer to [Making API calls on Windows](/fundamentals/api/how-to/make-api-calls/#making-api-calls-on-windows) for further guidance. |
62 | 27 |
|
63 | | -### Steps and API examples |
| 28 | +## Steps and API examples |
64 | 29 |
|
65 | 30 | 1. Decide which cipher suites you want to specify and which ones you want to disable (meaning they will not be included in your selection). |
66 | 31 |
|
67 | 32 | Below you will find samples covering the recommended ciphers [by security level](/ssl/edge-certificates/additional-options/cipher-suites/recommendations/) and [compliance standards](/ssl/edge-certificates/additional-options/cipher-suites/compliance-status/), but you can also refer to the [full list](/ssl/edge-certificates/additional-options/cipher-suites/supported-cipher-suites/) of supported ciphers and customize your choice. |
68 | 33 |
|
69 | 34 | 2. Log in to the Cloudflare dashboard and get your Global API Key in [**My Profile** > **API Tokens**](https://dash.cloudflare.com/?to=/:account/profile/api-tokens/). |
70 | | - |
71 | 35 | 3. Get the Zone ID from the [Overview page](https://dash.cloudflare.com/?to=/:account/:zone/) of the domain you want to specify cipher suites for. |
72 | | - |
73 | 36 | 4. Make an API call to either the [Edit zone setting](/api/resources/zones/subresources/settings/methods/edit/) endpoint or the [Edit TLS setting for hostname](/api/resources/hostnames/subresources/settings/subresources/tls/methods/update/) endpoint, specifying `ciphers` in the URL. List your array of chosen cipher suites in the `value` field. |
74 | 37 |
|
75 | 38 | :::note |
@@ -151,7 +114,7 @@ curl --request PATCH \ |
151 | 114 |
|
152 | 115 | </TabItem> </Tabs> |
153 | 116 |
|
154 | | -## Reset to default values |
| 117 | +### Reset to default values |
155 | 118 |
|
156 | 119 | <Tabs> <TabItem label="zone"> |
157 | 120 |
|
@@ -180,4 +143,4 @@ curl --request DELETE \ |
180 | 143 |
|
181 | 144 | </TabItem> </Tabs> |
182 | 145 |
|
183 | | -For guidance around custom hostnames, refer to [TLS settings - Cloudflare for SaaS](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/enforce-mtls/#cipher-suites). |
| 146 | +<Render file="cipher-suites-saas-linkout" /> |
0 commit comments