Edit Technitium zones: switch off and on, and their options

An Edit zone panel on the open zone of a Technitium provider switches the zone
off and on (its records stay) and edits who may ask it (query access), who may
copy it (zone transfer, with the TSIG keys the server has) and who is told when
it changes (notify). Only the groups that apply to the kind of zone are shown,
a mode that goes by a list needs it, and entries must be addresses or networks;
only groups that differ are sent, each whole, and the zone is read again
afterwards so anything else that moved is named on the page and in the audit
log. The server's own zones are not touched. Administrators only, audited.
Zones in the list show when they are off and what kind they are.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-01 23:20:19 +01:00
1 parent 082c524125
commit 6f144b4e36
12 files changed
+1110 -10

No files matched your search

+5 -1
View File
@@ -598,8 +598,12 @@ osTicket's API cannot close a ticket, so this is the one place in the app that *
- **Config fields:** Technitium URL, API Token
- **Auth:** Bearer token
- **Actions used:** list zones, **make a zone**, **delete a zone**, read zone records, add/delete records (an "update" is implemented as delete + add)
- **Actions used:** list zones, **make a zone**, **edit a zone** (switch it off and on, its options), **delete a zone**, read zone records, add/delete records (an "update" is implemented as delete + add)
- **Making a zone** (DNS page → pick the provider → **New zone**, administrators only — it makes the server an authority for a name; it is the one DNS provider that can): a **Primary** zone (a domain name such as `home.lan`, or an address or network such as `192.168.1.0/24`, which Technitium turns into the reverse `…in-addr.arpa` zone), a **Secondary** zone (the servers that hold it, comma-separated) or a **Forwarder** zone (the DNS server to pass questions to — an address, a name, a URL or `this-server` — the protocol, UDP unless told, and whether to check DNSSEC, off unless told). It is `POST /api/zones/create` with the name and the type (and, for a Secondary, `primaryNameServerAddresses`; for a Forwarder, `initializeForwarder`, `forwarder`, `protocol` and `dnssecValidation`). The name is written lower case without a trailing dot and must be ASCII (a name with other letters in its `xn--` form); anything else is refused before Technitium is asked, and what Technitium says when it refuses (a zone that is there already) is shown as it was said. The new zone opens when it is made; a Primary zone has the records Technitium makes for it and the rest are added as usual. It is written in the audit log (who made which zone, of which kind).
- **Editing a zone** (DNS page → open the zone → **Edit zone**, administrators only; the server's own internal zones are never touched):
- **Switch off / on** — `POST /api/zones/disable` and `/api/zones/enable`. Off, the server stops answering for the zone; its records stay, and on brings it all back. A switched-off zone is marked *off* in the zone list, and the Technitium integration does not judge it.
- **Who may ask the zone** (`queryAccess`: everyone, nobody, only private networks, only the zone's name servers, only the networks listed, or the name servers and the networks listed), **who may copy it** (`zoneTransfer`, the same without the private-network choice, and the TSIG keys the server has that a transfer may be limited to) and **who is told when it changes** (`notify`: nobody, the zone's name servers, only the servers listed, or both). A choice that goes by a list needs it: networks are addresses or CIDR networks, one to a line and in order, with `!` in front to refuse one; servers are addresses. It is `GET /api/zones/options/get` (with the TSIG key names) and `POST /api/zones/options/set`.
- **What a kind of zone has:** a Primary or Secondary zone has all three; a Forwarder or Stub or Catalog zone only who may ask it, and a secondary catalog none; anything else is refused with the reason, before Technitium is asked. What is not changed is not sent: only the groups that differ go, each whole (its mode and the list it uses), because the documentation does not say what Technitium does with a setting that is left out of the call. **So afterwards the zone is read again, and anything else it says about the zone that moved (dynamic updates, its catalog …) is named on the page and in the audit log** — a warning, not an undo. Written in the audit log: who switched which zone off or on, and which groups of options were changed (never the lists). The options call needs the token's user to have **Zones: Modify** (and, as the documentation words it, **Zone: Delete** on that zone). **Not verified against a live install.**
- **Deleting a zone** (DNS page → open the zone → **Delete zone**, administrators only): the zone **and every record in it** go, for good — `POST /api/zones/delete` with the zone's name. The zone's name has to be typed, and the server checks it again: it must be the name the zone has now and the provider must list the zone, so a page that is minutes old, a wrong id, or one of the server's own internal zones (which are not listed) cannot be deleted by mistake; an id that is not a zone name as written (lower case, no trailing dot) is refused. What this app has cached of the zone and its records is dropped with it (the registration of the domain on the *Domain names* tab is not touched). What Technitium says when it refuses — a token that may not delete zones — is shown, and then nothing is changed here. It is written in the audit log (who deleted which zone, and how many of its records were cached). **Not verified against a live install**: the calls are as Technitium's API documentation has them.
- **Required access:** A token tied to a Technitium user account with **Zones: View + Modify** permission — view-only will fail on record changes (updates are add/delete calls under the hood) and on making a zone. **Deleting a zone** needs **Zones: Delete**, which is a permission of its own.
- **This is the DNS provider** (zones and records, on the DNS page). How the *server* is doing — queries, blocking, zone health, a real DNS test, alerts — is a separate integration with its own token: see [Technitium DNS](#technitium-dns) under the integrations above.