feat: registry-driven DNS provider type discovery
Phase 1 of Custom DNS Provider Plugin Support: the /api/v1/dns-providers/types endpoint now returns types dynamically from the dnsprovider.Global() registry instead of a hardcoded list. Backend handler queries registry for all provider types, metadata, and fields Response includes is_built_in flag to distinguish plugins from built-ins Frontend types updated with DNSProviderField interface and new response shape Fixed flaky WAF exclusion test (isolated file-based SQLite DB) Updated operator docs for registry-driven discovery and plugin installation Refs: #461
This commit is contained in:
@@ -151,6 +151,47 @@ When running Charon in Docker:
|
||||
|
||||
Once a plugin is installed and loaded, it appears in the DNS provider list alongside built-in providers.
|
||||
|
||||
### Discovering Loaded Plugins via API
|
||||
|
||||
Query available provider types to see all registered providers (built-in and plugins):
|
||||
|
||||
```bash
|
||||
curl https://charon.example.com/api/v1/dns-providers/types \
|
||||
-H "Authorization: Bearer YOUR-TOKEN"
|
||||
```
|
||||
|
||||
**Response:**
|
||||
|
||||
```json
|
||||
{
|
||||
"types": [
|
||||
{
|
||||
"type": "cloudflare",
|
||||
"name": "Cloudflare",
|
||||
"description": "Cloudflare DNS provider",
|
||||
"documentation_url": "https://developers.cloudflare.com/api/",
|
||||
"is_built_in": true,
|
||||
"fields": [...]
|
||||
},
|
||||
{
|
||||
"type": "powerdns",
|
||||
"name": "PowerDNS",
|
||||
"description": "PowerDNS Authoritative Server with HTTP API",
|
||||
"documentation_url": "https://doc.powerdns.com/authoritative/http-api/",
|
||||
"is_built_in": false,
|
||||
"fields": [...]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Key fields:**
|
||||
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
| `is_built_in` | `true` = compiled into Charon, `false` = external plugin |
|
||||
| `fields` | Credential field specifications for the UI form |
|
||||
|
||||
### Via Web UI
|
||||
|
||||
1. Navigate to **Settings** → **DNS Providers**
|
||||
@@ -224,6 +265,19 @@ The plugin automatically configures Caddy's DNS challenge for Let's Encrypt:
|
||||
|
||||
### Listing Loaded Plugins
|
||||
|
||||
**Via Types Endpoint (Recommended):**
|
||||
|
||||
Filter for plugins using `is_built_in: false`:
|
||||
|
||||
```bash
|
||||
curl https://charon.example.com/api/v1/dns-providers/types \
|
||||
-H "Authorization: Bearer YOUR-TOKEN" | jq '.types[] | select(.is_built_in == false)'
|
||||
```
|
||||
|
||||
**Via Plugins Endpoint:**
|
||||
|
||||
Get detailed plugin metadata including version and author:
|
||||
|
||||
```bash
|
||||
curl https://charon.example.com/api/admin/plugins \
|
||||
-H "Authorization: Bearer YOUR-TOKEN"
|
||||
|
||||
Reference in New Issue
Block a user