Welcome Guest to Defaut site!

Cloudflare Integration

Overview

The Cloudflare integration provides role-based access control for managing DNS records and other Cloudflare features for domains managed by the Comserv2 system. It integrates with the existing site and user management system to ensure that users can only access domains they have permission to manage.

Configuration

The Cloudflare integration is configured using a JSON file located at Comserv/config/cloudflare_config.json. This file contains the following sections:

{
  "cloudflare": {
    "api_token": "YOUR_TOKEN",
    "account_id": "YOUR_ACCOUNT_ID",
    "email": "[email protected]"
  },
  "roles": {
    "admin": {
      "permissions": ["dns:edit", "zone:edit", "ssl:edit", "cache:edit"]
    },
    "developer": {
      "permissions": ["dns:edit", "cache:edit"]
    },
    "editor": {
      "permissions": ["dns:edit"]
    }
  },
  "site_specific_permissions": {
    "beemaster.ca": {
      "editor": ["dns:edit", "cache:edit"]
    }
  }
}

Configuration Sections

Integration with Existing System

The Cloudflare integration uses the existing site and user management system in Comserv2:

Available Features

The Cloudflare integration provides the following features:

Role-Based Access Control

The Cloudflare integration implements role-based access control to ensure that users can only access domains they have permission to manage:

Technical Implementation

The Cloudflare integration consists of the following components:

Dependencies

The Cloudflare integration requires the following dependencies:

Installation

To install the Cloudflare integration:

  1. Install the required dependencies: pip install cloudflare
  2. Configure the cloudflare_config.json file with your Cloudflare API credentials
  3. Restart the Comserv2 application

Usage

To use the Cloudflare integration:

  1. Log in to the Comserv2 application
  2. Navigate to the Cloudflare management interface at /cloudflareapi
  3. Select a site to manage
  4. Select a domain to manage DNS records
  5. Use the interface to view, add, edit, or delete DNS records