Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
revert: verify token to use the previous one that required account read permission
adilson82c7489055d7
diff --git a/backend/src/services/app-connection/cloudflare/cloudflare-connection-fns.ts b/backend/src/services/app-connection/cloudflare/cloudflare-connection-fns.tsindex d881a0fb83..c02788c7c1 100644--- a/backend/src/services/app-connection/cloudflare/cloudflare-connection-fns.ts+++ b/backend/src/services/app-connection/cloudflare/cloudflare-connection-fns.ts@@ -220,10 +220,10 @@ export const listCloudflareR2Buckets = async (appConnection: TCloudflareConnecti};export const validateCloudflareConnectionCredentials = async (config: TCloudflareConnectionConfig) => {- const { apiToken } = config.credentials;+ const { apiToken, accountId } = config.credentials;try {- const resp = await safeRequest.get(`${IntegrationUrls.CLOUDFLARE_API_URL}/client/v4/user/tokens/verify`, {+ const resp = await safeRequest.get(`${IntegrationUrls.CLOUDFLARE_API_URL}/client/v4/accounts/${accountId}`, {headers: getCloudflareAuthHeaders(apiToken)});diff --git a/docs/documentation/platform/secret-rotation/cloudflare-api-token.mdx b/docs/documentation/platform/secret-rotation/cloudflare-api-token.mdxindex 1706fe07ea..78eeaf3374 100644--- a/docs/documentation/platform/secret-rotation/cloudflare-api-token.mdx+++ b/docs/documentation/platform/secret-rotation/cloudflare-api-token.mdx@@ -12,7 +12,11 @@ description: "Learn how to automatically rotate Cloudflare API tokens."## Prerequisites- Create a [Cloudflare Connection](/integrations/app-connections/cloudflare). That connection is used to create and delete API tokens on your behalf during rotation.-- The connection's API token must include the **Account** - **API Tokens** - **Edit** permission. See the **Secret Rotation** tab under [Configure API Token and Account ID for Infisical](/integrations/app-connections/cloudflare#configure-api-token-and-account-id-for-infisical) for the exact configuration.+- The connection's API token must include:+ - **Account** - **API Tokens** - **Edit**, to create and revoke the generated tokens.+ - **Account** - **Account Settings** - **Read**, so Infisical can validate the connection.++ See the **Secret Rotation** tab under [Configure API Token and Account ID for Infisical](/integrations/app-connections/cloudflare#configure-api-token-and-account-id-for-infisical) for the exact configuration.## Create a Cloudflare API Token Rotation in Infisicaldiff --git a/docs/documentation/platform/secret-rotation/cloudflare-r2-access-key.mdx b/docs/documentation/platform/secret-rotation/cloudflare-r2-access-key.mdxindex 4a566daeae..bfadd6ab80 100644--- a/docs/documentation/platform/secret-rotation/cloudflare-r2-access-key.mdx+++ b/docs/documentation/platform/secret-rotation/cloudflare-r2-access-key.mdx@@ -17,6 +17,7 @@ An R2 access key is a Cloudflare API token viewed through R2's S3-compatible API- The connection's API token must include:- **Account** - **API Tokens** - **Edit**, to create and revoke the generated tokens.- **Account** - **Workers R2 Storage** - **Read**, so Infisical can list your buckets for the bucket picker.+ - **Account** - **Account Settings** - **Read**, so Infisical can validate the connection.See the **Secret Rotation** tab under [Configure API Token and Account ID for Infisical](/integrations/app-connections/cloudflare#configure-api-token-and-account-id-for-infisical) for the exact configuration.@@ -56,7 +57,7 @@ An R2 access key is a Cloudflare API token viewed through R2's S3-compatible API- **Allowed IPs** (optional) - The generated key can only be used from these IP addresses or CIDR blocks, one entry per line. Leave empty to allow any IP.- **Disallowed IPs** (optional) - The generated key cannot be used from these IP addresses or CIDR blocks, one entry per line.- + 5. Specify the secret names that the rotated credentials will be mapped to. Then click **Next**.diff --git a/docs/images/app-connections/cloudflare/cloudflare-api-token-configure-permissions.png b/docs/images/app-connections/cloudflare/cloudflare-api-token-configure-permissions.pngindex 4428b9982e..93bfa774b1 100644Binary files a/docs/images/app-connections/cloudflare/cloudflare-api-token-configure-permissions.png and b/docs/images/app-connections/cloudflare/cloudflare-api-token-configure-permissions.png differdiff --git a/docs/images/app-connections/cloudflare/cloudflare-r2-access-configure-permissions.png b/docs/images/app-connections/cloudflare/cloudflare-r2-access-configure-permissions.pngindex 43016b5d62..3670d13180 100644Binary files a/docs/images/app-connections/cloudflare/cloudflare-r2-access-configure-permissions.png and b/docs/images/app-connections/cloudflare/cloudflare-r2-access-configure-permissions.png differdiff --git a/docs/integrations/app-connections/cloudflare.mdx b/docs/integrations/app-connections/cloudflare.mdxindex 1574e27c94..afe27c8a80 100644--- a/docs/integrations/app-connections/cloudflare.mdx+++ b/docs/integrations/app-connections/cloudflare.mdx@@ -87,11 +87,12 @@ Infisical supports connecting to Cloudflare using API tokens and Account ID for**Required Permissions:**- **Account** - **API Tokens** - **Edit**+ - **Account** - **Account Settings** - **Read**The **API Tokens** - **Edit** permission is what allows Infisical to create the replacement token and revoke the previous one on each rotation cycle. Without it, rotation fails when creating the new token.<Note>- Infisical also uses this connection to list the zones and permission groups you can choose from when configuring the rotation. If you plan to scope generated tokens to specific zones, add **Account** - **Account Settings** - **Read** as well.+ **Account Settings** - **Read** is required so Infisical can validate the connection.</Note>The generated tokens are not granted these permissions. Each rotated token only receives the access policies you configure on the [Cloudflare API Token rotation](/documentation/platform/secret-rotation/cloudflare-api-token) itself.@@ -106,9 +107,14 @@ Infisical supports connecting to Cloudflare using API tokens and Account ID for**Required Permissions:**- **Account** - **API Tokens** - **Edit**- **Account** - **Workers R2 Storage** - **Read**+ - **Account** - **Account Settings** - **Read****API Tokens** - **Edit** is what allows Infisical to create the replacement key and revoke the previous one on each rotation cycle. **Workers R2 Storage** - **Read** is used only to populate the bucket picker when you configure the rotation; without it the picker comes back empty and you cannot select buckets.+ <Note>+ **Account Settings** - **Read** is required so Infisical can validate the connection.+ </Note>+The generated keys are not granted these permissions. Each rotated key only receives object access to the buckets you select on the [Cloudflare R2 Access Key rotation](/documentation/platform/secret-rotation/cloudflare-r2-access-key) itself.Add these permissions to your API token and click **Continue to summary**, then **Create Token** to generate your API token.