Skip to content

Commit 17df08e

Browse files
committed
Add create cert API call
1 parent 4e7f215 commit 17df08e

File tree

1 file changed

+20
-0
lines changed
  • src/content/docs/cloudflare-one/connections/connect-devices/user-side-certificates

1 file changed

+20
-0
lines changed

src/content/docs/cloudflare-one/connections/connect-devices/user-side-certificates/index.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ banner:
77
content: The default global Cloudflare root certificate will expire on 2025-02-02. If you installed the default Cloudflare certificate before 2024-10-17, you must <a href="/cloudflare-one/connections/connect-devices/user-side-certificates/#generate-a-cloudflare-root-certificate">generate a new certificate</a> and activate it for your Zero Trust organization to avoid inspection errors.
88
---
99

10+
import { Tabs, TabItem } from "~/components";
11+
1012
Advanced security features such as [HTTPS traffic inspection](/cloudflare-one/policies/gateway/http-policies/tls-decryption/), [Data Loss Prevention](/cloudflare-one/policies/data-loss-prevention/), [anti-virus scanning](/cloudflare-one/policies/gateway/http-policies/antivirus-scanning/), [Access for Infrastructure](/cloudflare-one/applications/non-http/infrastructure-apps/), and [Browser Isolation](/cloudflare-one/policies/browser-isolation/) require users to install and trust a root certificate on their device. You can either install the certificate provided by Cloudflare (default option), or generate your own custom certificate and upload it to Cloudflare.
1113

1214
Gateway [generates a unique root CA](#generate-a-cloudflare-root-certificate) for each Zero Trust account and deploys it across the Cloudflare global network. Alternatively, Enterprise users can upload and deploy their own [custom certificate](/cloudflare-one/connections/connect-devices/user-side-certificates/custom-certificate/).
@@ -26,12 +28,30 @@ Zero Trust will indicate if a certificate is ready for use in inspection based o
2628

2729
To generate a new Cloudflare root certificate for your Zero Trust organization:
2830

31+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
32+
2933
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Settings** > **Resources**.
3034
2. In **Certificates**, select **Manage**.
3135
3. Select **Generate certificate**.
3236
4. Choose a duration of time before the certificate expires. Cloudflare recommends expiration after five years. Alternatively, choose _Custom_ and enter a custom amount in days.
3337
5. Select **Generate certificate**.
3438

39+
</TabItem>
40+
41+
<TabItem label="API">
42+
43+
Send a `POST` request to the [Create Zero Trust certificate](/api/resources/zero_trust/subresources/gateway/subresources/certificates/methods/create/) endpoint. For example:
44+
45+
```sh
46+
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/certificates \
47+
--header "Content-Type: application/json" \
48+
--header "Authorization: Bearer <API_TOKEN>" \
49+
```
50+
51+
The API will respond with the ID and contents of the new certificate.
52+
53+
</TabItem> </Tabs>
54+
3555
The certificate will appear in your list of certificates as **Inactive**. To download a generated certificate, select it, then choose **Download .pem** and/or **Download .crt**. To deploy your certificate and turn it on for inspection, you need to [activate the certificate](#activate-a-root-certificate).
3656

3757
Each Zero Trust account can generate a new root certificate a maximum of three times per day.

0 commit comments

Comments
 (0)