Skip to content

Commit 9e30cb0

Browse files
[mTLS] Add dedicated section for listing CA hostname associations (#18592)
* [mTLS] Update byo-ca.mdx * Move code block example to new section and link step to it --------- Co-authored-by: Rebecca Tamachiro <[email protected]>
1 parent 2812630 commit 9e30cb0

File tree

1 file changed

+13
-9
lines changed
  • src/content/docs/ssl/client-certificates

1 file changed

+13
-9
lines changed

src/content/docs/ssl/client-certificates/byo-ca.mdx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,7 @@ This is especially useful if you already have mTLS implemented and client certif
6868
If no `mtls_certificate_id` is provided, the action will be performed against a Cloudflare Managed CA.
6969
:::
7070

71-
72-
73-
4. (Optional) Since this process is API-only, and hostnames that use your uploaded CA certificate **are not** listed on the dashboard, you can make a [GET request](/api/operations/client-certificate-for-a-zone-list-hostname-associations) with the `mtls_certificate_id` as a query parameter to confirm the hostname association.
74-
75-
```bash
76-
curl "https://api.cloudflare.com/client/v4/zones/zone_id/certificate_authorities/hostname_associations?mtls_certificate_id={id_from_step_2}" \
77-
--header "X-Auth-Email: <EMAIL>" \
78-
--header "X-Auth-Key: <API_KEY>"
79-
```
71+
4. (Optional) Since this process is API-only, and hostnames that use your uploaded CA certificate **are not** listed on the dashboard, you can make a [GET request](#list-ca-hostname-associations) to confirm the CA hostname associations.
8072

8173
5. Create a custom rule to enforce client certificate validation.
8274
You can do this [via the dashboard](/api-shield/security/mtls/configure/) or [via API](/waf/custom-rules/create-api/).
@@ -98,3 +90,15 @@ If you want to remove a CA that you have previously uploaded, you must first rem
9890
```
9991

10092
2. Use the [Delete mTLS certificate endpoint](/api/operations/m-tls-certificate-management-delete-m-tls-certificate) to delete the certificate.
93+
94+
## List CA hostname associations
95+
96+
You can also use the [API](/api/operations/client-certificate-for-a-zone-list-hostname-associations) to list the hostname associations. Make sure you include the query parameter `mtls_certificate_id`, where `mtls_certificate_id` is the certificate ID of the uploaded CA (step 2 above).
97+
98+
```bash
99+
curl "https://api.cloudflare.com/client/v4/zones/zone_id/certificate_authorities/hostname_associations?mtls_certificate_id={id_from_step_2}" \
100+
--header "X-Auth-Email: <EMAIL>" \
101+
--header "X-Auth-Key: <API_KEY>"
102+
```
103+
104+

0 commit comments

Comments
 (0)