Skip to content

Reference

Cloudflare

Connect Cloudflare to Alter Vault for secure API access

Use Cloudflare credentials to make authenticated API calls through Alter Vault without exposing API keys in code.

PropertyValue
Provider IDcloudflare
CategoryDeveloper Tools
Credential TypeBearer Token

Log in to the Cloudflare Dashboard

Log in to the Cloudflare Dashboard at dash.cloudflare.com.

Go to My Profile → API Tokens

Go to My Profile → API Tokens at dash.cloudflare.com/profile/api-tokens.

Create a token

Click ‘Create Token’ and select a template or create custom.

Configure permissions

Configure permissions and click ‘Create Token’.

Copy the generated API token

Copy the generated API token (it won’t be shown again).

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Cloudflare

Go to Managed Secrets > Add Provider > Cloudflare.

Enter credentials

Paste your API Token into the credential field.

Save

Click Save. You’ll receive a grant_id to use with the SDK.

response = await alter_app.request(
HttpMethod.GET,
"https://api.cloudflare.com/client/v4/zones",
grant_id="YOUR_GRANT_ID",
)

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
zones-getreadGET/zones
zones-postwritePOST/zones
zones-0-getreadGET/zones/{zone_id}
zones-0-patchadminPATCH/zones/{zone_id}
zones-0-deletedeleteDELETE/zones/{zone_id}
zone-purgedeletePOST/zones/{zone_id}/purge_cache
dns-records-for-a-zone-list-dns-recordsreadGET/zones/{zone_id}/dns_records
dns-records-for-a-zone-create-dns-recordwritePOST/zones/{zone_id}/dns_records
dns-records-for-a-zone-dns-record-detailsreadGET/zones/{zone_id}/dns_records/{dns_record_id}
dns-records-for-a-zone-patch-dns-recordwritePATCH/zones/{zone_id}/dns_records/{dns_record_id}
dns-records-for-a-zone-update-dns-recordwritePUT/zones/{zone_id}/dns_records/{dns_record_id}
dns-records-for-a-zone-delete-dns-recorddeleteDELETE/zones/{zone_id}/dns_records/{dns_record_id}
dns-records-for-a-zone-batch-dns-recordsdelete, writePOST/zones/{zone_id}/dns_records/batch
dns-records-for-a-zone-export-dns-recordsreadGET/zones/{zone_id}/dns_records/export
dns-records-for-a-zone-import-dns-recordswritePOST/zones/{zone_id}/dns_records/import
worker-script-list-workersreadGET/accounts/{account_id}/workers/scripts
worker-script-download-workerreadGET/accounts/{account_id}/workers/scripts/{script_name}
worker-script-upload-worker-modulewritePUT/accounts/{account_id}/workers/scripts/{script_name}
worker-script-delete-workerdeleteDELETE/accounts/{account_id}/workers/scripts/{script_name}
worker-script-get-settingsreadGET/accounts/{account_id}/workers/scripts/{script_name}/settings
worker-script-patch-settingsadminPATCH/accounts/{account_id}/workers/scripts/{script_name}/settings
worker-list-script-secretsreadGET/accounts/{account_id}/workers/scripts/{script_name}/secrets
worker-put-script-secretadminPUT/accounts/{account_id}/workers/scripts/{script_name}/secrets
worker-delete-script-secretadmin, deleteDELETE/accounts/{account_id}/workers/scripts/{script_name}/secrets/{secret_name}
worker-cron-trigger-get-cron-triggersreadGET/accounts/{account_id}/workers/scripts/{script_name}/schedules
worker-cron-trigger-update-cron-triggerswritePUT/accounts/{account_id}/workers/scripts/{script_name}/schedules
worker-deployments-list-deploymentsreadGET/accounts/{account_id}/workers/scripts/{script_name}/deployments
worker-deployments-create-deploymentwritePOST/accounts/{account_id}/workers/scripts/{script_name}/deployments
workers-kv-namespace-list-namespacesreadGET/accounts/{account_id}/storage/kv/namespaces
workers-kv-namespace-create-a-namespacewritePOST/accounts/{account_id}/storage/kv/namespaces
workers-kv-namespace-get-a-namespacereadGET/accounts/{account_id}/storage/kv/namespaces/{namespace_id}
workers-kv-namespace-rename-a-namespacewritePUT/accounts/{account_id}/storage/kv/namespaces/{namespace_id}
workers-kv-namespace-remove-a-namespacedeleteDELETE/accounts/{account_id}/storage/kv/namespaces/{namespace_id}
workers-kv-namespace-list-a-namespace'-s-keysreadGET/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/keys
workers-kv-namespace-read-key-value-pairreadGET/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}
workers-kv-namespace-read-the-metadata-for-a-keyreadGET/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/metadata/{key_name}
workers-kv-namespace-write-key-value-pair-with-metadatawritePUT/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}
workers-kv-namespace-delete-key-value-pairdeleteDELETE/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}
workers-kv-namespace-write-multiple-key-value-pairswritePUT/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/bulk
workers-kv-namespace-delete-multiple-key-value-pairsdeletePOST/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/bulk/delete
workers-kv-namespace-get-multiple-key-value-pairsreadPOST/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/bulk/get

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.