mirror of
https://github.com/hanzoai/kms.git
synced 2026-11-02 14:23:22 +00:00
- Fix 381 files where branding script corrupted variable names (e.g. isHanzo KMSTemplate -> isKmsTemplate) - Rebrand from "Hanzo KMS" to just "KMS" for white-label support (allows Lux KMS, Hanzo KMS, etc. via configuration) - 856 files, purely string replacements, no logic changes
133 lines
5.4 KiB
Plaintext
133 lines
5.4 KiB
Plaintext
---
|
|
title: "Cloudflare Connection"
|
|
description: "Learn how to configure a Cloudflare Connection for KMS."
|
|
---
|
|
|
|
KMS supports connecting to Cloudflare using API tokens and Account ID for secure access to your Cloudflare services.
|
|
|
|
## Configure API Token and Account ID for KMS
|
|
|
|
<Steps>
|
|
<Step title="Create API Token">
|
|
Navigate to your Cloudflare dashboard and go to **Profile**.
|
|
|
|

|
|
|
|
Click **API Tokens > Create Token** to generate a new API token.
|
|
|
|

|
|
|
|
</Step>
|
|
<Step title="Configure Token Permissions">
|
|
Configure your API token with the necessary permissions for your Cloudflare services.
|
|
|
|
Depending on your use case, add one or more of the following permission sets to your API token:
|
|
|
|
<Tabs>
|
|
<Tab title="Secret Sync">
|
|
<AccordionGroup>
|
|
<Accordion title="Cloudflare Pages">
|
|
Use the following permissions to grant KMS access to sync secrets to Cloudflare Pages:
|
|
|
|

|
|
|
|
**Required Permissions:**
|
|
- **Account** - **Cloudflare Pages** - **Edit**
|
|
- **Account** - **Account Settings** - **Read**
|
|
|
|
Add these permissions to your API token and click **Continue to summary**, then **Create Token** to generate your API token.
|
|
</Accordion>
|
|
<Accordion title="Cloudflare Workers">
|
|
Use the following permissions to grant KMS access to sync secrets to Cloudflare Workers:
|
|
|
|

|
|
|
|
**Required Permissions:**
|
|
- **Account** - **Workers Scripts** - **Edit**
|
|
- **Account** - **Account Settings** - **Read**
|
|
|
|
Add these permissions to your API token and click **Continue to summary**, then **Create Token** to generate your API token.
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
</Tab>
|
|
<Tab title="PKI">
|
|
<AccordionGroup>
|
|
<Accordion title="ACME DNS Verification">
|
|
Use the following permissions to grant KMS access to verify certificates using DNS TXT records with ACME:
|
|
|
|

|
|
|
|
**Required Permissions:**
|
|
- **Account** - **Account Settings** - **Read**
|
|
- **Zone** - **DNS** - **Edit**
|
|
|
|
Add these permissions to your API token and click **Continue to summary**, then **Create Token** to generate your API token.
|
|
</Accordion>
|
|
<Accordion title="Certificate Sync (Custom SSL)">
|
|
Use the following permissions to grant KMS access to sync certificates to Cloudflare as Custom SSL certificates:
|
|
|
|

|
|
|
|
**Required Permissions:**
|
|
- **Account** - **Account Settings** - **Read**
|
|
- **Zone** - **SSL and Certificates** - **Edit**
|
|
|
|
These permissions allow KMS to upload, update, and delete custom SSL certificates in your Cloudflare zones.
|
|
|
|
Add these permissions to your API token and click **Continue to summary**, then **Create Token** to generate your API token.
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
</Step>
|
|
<Step title="Save Your API Token">
|
|
After creation, copy and securely store your API token as it will not be shown again.
|
|
|
|

|
|
|
|
<Warning>
|
|
Keep your API token secure and do not share it. Anyone with access to this token can manage your Cloudflare resources based on the permissions granted.
|
|
</Warning>
|
|
|
|
</Step>
|
|
<Step title="Get Account ID">
|
|
From your Cloudflare Account Home page, click on the account information dropdown and select **Copy account ID**.
|
|
|
|

|
|
|
|
Save your Account ID for use in the next step.
|
|
|
|
</Step>
|
|
</Steps>
|
|
|
|
## Setup Cloudflare Connection in KMS
|
|
|
|
<Steps>
|
|
<Step title="Navigate to App Connections">
|
|
Navigate to the **Integrations** tab in the desired project, then select **App Connections**. 
|
|
</Step>
|
|
<Step title="Add Connection">
|
|
Select the **Cloudflare Connection** option from the connection options
|
|
modal. 
|
|
</Step>
|
|
<Step title="Input Credentials">
|
|
Enter your Cloudflare API token and Account ID in the provided fields and
|
|
click **Connect to Cloudflare** to establish the connection. 
|
|
</Step>
|
|
<Step title="Connection Created">
|
|
Your **Cloudflare Connection** is now available for use in your KMS
|
|
projects. 
|
|
</Step>
|
|
</Steps>
|
|
|
|
<Info>
|
|
API token connections require manual token rotation when your Cloudflare API
|
|
token expires or is regenerated. Monitor your connection status and update the
|
|
token as needed.
|
|
</Info>
|