feat: manage TLSA records
Test / test (push) Successful in 28m4s
Build and publish image / image (push) Successful in 28m43s

This commit is contained in:
bryanpedini committed 2026-11-22 11:31:59 +01:00
1 parent 9c2fb9d15b
commit a67183b646
14 files changed
+141 -15

No files matched your search

+3 -2
View File
@@ -9,7 +9,7 @@ The same binary starts the HTTP server when run without arguments and provides s
- Login with local users, sessions and password change.
- Two roles: `admin` sees and does everything, `user` sees and operates only on the zones delegated to them.
- Zone creation (SOA and NS records in one transaction) and deletion, by admins.
- Creation, editing and deletion of records of every type the plugin serves: `A`, `AAAA`, `CNAME`, `NS`, `MX`, `TXT`, `SRV`, `CAA` and `SOA`. Wildcard names are supported. Bulk deletion of records.
- Creation, editing and deletion of records of every type the plugin serves: `A`, `AAAA`, `CNAME`, `NS`, `MX`, `TXT`, `SRV`, `CAA`, `TLSA` and `SOA`. Wildcard names are supported. Bulk deletion of records.
- Automatic SOA serial management.
- A zone check that reports every row the plugin cannot serve correctly, with a repair path in the UI.
- Zone file export and import (RFC 1035 master file format).
@@ -53,7 +53,7 @@ The application's own tables live in the same database, prefixed with `<prefix>w
- `zone`: the zone apex, lowercase, with the trailing dot (`example.org.`). The plugin lists zones with `SELECT DISTINCT zone`, so a zone exists as soon as one row carries it.
- `name`: the owner name relative to the zone, lowercase, without trailing dot. The empty string is the apex. `*` as the complete leftmost label is a wildcard.
- `ttl`: an integer from 0 to 2147483647. Never `NULL`, never negative.
- `record_type`: one of the nine uppercase type names.
- `record_type`: one of the ten uppercase type names.
- `content`: a JSON object in canonical form (keys in the order below, no other keys). Rows written by other writers are read tolerantly (any key order, extra keys ignored) and rewritten in canonical form only when edited.
- Every host, target, `ns` and `MBox` is stored as a lowercase FQDN with the trailing dot, because the plugin does not make `NS`, `MX`, `SRV` and `SOA` names fully qualified and packing fails on names without it.
@@ -67,6 +67,7 @@ The application's own tables live in the same database, prefixed with `<prefix>w
| `TXT` | `{"text": "v=spf1 -all"}`, 1 to 4096 bytes of printable ASCII without backslash |
| `SRV` | `{"priority": 10, "weight": 5, "port": 443, "target": "host.example.org."}`, the owner name starts with `_service._proto` |
| `CAA` | `{"flag": 0, "tag": "issue", "value": "ca.example.net"}`, flag `0` or `128` |
| `TLSA` | `{"usage": 3, "selector": 1, "matching_type": 1, "certificate": "0123...cdef"}`, usage, selector and matching type 0 to 255, certificate association data as lowercase even-length hex (32 bytes for matching type `1`, 64 bytes for `2`); served only by a plugin build with TLSA support |
| `SOA` | `{"ns": "ns1.example.org.", "MBox": "hostmaster.example.org.", "refresh": 3600, "retry": 600, "expire": 604800, "minttl": 300, "serial": 2026111700}`, only at the apex |
After field validation every record is converted to the `miekg/dns` RR the plugin builds from it and packed into a message; a record that does not pack is refused.