TAK-OS DNS separates public authoritative DNS, authenticated peer synchronization and an internal management listener. These boundaries have different controls; sharing a host or Service does not make their authorization interchangeable.
Management listener
TLS termination and user authentication for the UI and management API are explicitly outside the application's scope. Deployments are assumed to offload both to an Ingress, reverse proxy or equivalent access layer. TSIG authentication for peer synchronization remains an application responsibility.
The application serves HTTP on HTTP_ADDR (:8080 by default). It implements no user
authentication, account roles, OIDC login or TLS listener. Anyone who can reach the
management API can read the served records/status, manage DNS CRs, peer metadata,
settings and TSIG Secrets, explicitly export the local private key, trigger transfers
and use query validation.
The supplied management Service is internal ClusterIP. The Ingress
example is a routing/TLS template: its placeholder
ingressClassName does not authenticate users. Configure the platform's real TLS
termination and authentication policy for the entire route, including /api/, rather
than only the HTML root. If your platform uses Ipseity, connect it through the
platform's supported authenticated Ingress/proxy flow; TAK-OS DNS has no built-in
Ipseity client or OIDC configuration.
Protect the listener's direct pod and Service paths as well. A cluster-internal client that bypasses the authenticated Ingress otherwise has the same management rights. Adapt NetworkPolicy, firewall and namespace access to admit the intended Ingress controller, monitoring and operator paths. The repository supplies no NetworkPolicy because controller selectors, API addresses and CNI enforcement are site-specific.
The HTTP layer applies same-origin browser write checks, rejects explicitly cross-site writes, sets restrictive content/security headers and limits JSON body sizes. These reduce browser attack surfaces; they are not identity checks or protection against a direct non-browser API client. Optimistic configuration versions prevent silent concurrent overwrites, not unauthorized writes.
Kubernetes pod port-forwarding is another management route:
kubectl -n tak-os-dns port-forward pod/POD_NAME 8080:8080
It binds to loopback by default and bypasses Ingress authentication. Its authority comes from Kubernetes credentials and permission to port-forward that pod. Keep that permission scoped and close the session after diagnostics. Forwarding a Service selects one pod; it does not combine replica state.
Public DNS and peer authorization
Ordinary DNS queries are unauthenticated. The server answers only authoritative data, including imported records, and never recurses or forwards. It keeps RA false even when RD is set. Standard AXFR/IXFR is refused. The server does not implement DNSSEC signing or validation. Public delegation and any upstream DNSSEC policy remain separate operational concerns.
The reserved peer protocol uses TCP TXT queries/NOTIFY for _tak-os-sync. with TSIG
HMAC-SHA256. The current local site key authorizes inbound exports and notifications;
reciprocal PeerSite configuration is not required. Outbound requests use the destination
site’s credential, independently of the local key. UDP transfers, missing or invalid
signatures, wrong algorithms and unsupported protocol versions are rejected. Fetching
also verifies the expected exporting cluster ID, complete payload integrity and accepted
source watermarks before publishing imports.
Authorization is based on key possession, not the incoming client's IP address. There is no application-level peer source-IP ACL and no per-zone export ACL. The local site key authorizes export of the cluster's complete local snapshot, including source definitions masked in the serving view, and signed notification requests. Inbound requests do not establish a separate requester cluster identity beyond that key. Each site has an independent local key, privately supplied to sites allowed to fetch it. Every holder of one site’s key can impersonate that site’s signatures; TSIG is not public-key identity or encryption. Discovery shares metadata only, never credentials, and newly discovered sites wait for provisioned keys.
TSIG authenticates messages and detects alteration; it does not encrypt names, records or transfer metadata. Use trusted network paths or an encrypted network tunnel when confidentiality is required. A trusted peer is allowed to contribute records authoritatively, including overlapping names/zones. A correct signature is not a policy decision that those records are suitable. Coordinate zone ownership and keep peer credentials limited to the intended operators.
Records retained through source outages may become stale indefinitely. That is the intended availability contract, so monitor source freshness and remove or replace records at their owning source when they should stop serving. Ordinary record TTL expiry does not revoke data held by the authoritative server.
Secrets and Kubernetes permissions
The app generates 32 random bytes for a local key only when its Secret is initially absent. Existing objects are not overwritten at startup. Local/remote keys reload each local cycle and after UI key writes; valid rotation replaces the previous accepted key without listener restart. Invalid updates retain the last valid key and expose an error. Secret deletion/error after local initialization retains that local key; a missing remote Secret makes that peer pending.
Credentials are stored in administration-namespace Kubernetes Secrets, or a mode-0600
TSIG file in file mode. They are absent from ordinary configuration, record exports and
discovery. Explicit POST /api/keys/local/export returns the private local key, so
protect every management route. Key summaries expose only name, algorithm, fingerprint,
decoded byte length and weak-key warning (under 16 bytes). Nonempty weak keys are
accepted; generated keys are always strong.
GitOps or ESO can own Secret contents. Rotation does not distribute changes to remote sites and can deliberately revoke future synchronization; already imported records remain retained. There is no automatic dual-key overlap. Kubernetes Secret base64 is encoding, not encryption. Protect Secret RBAC, backups and UI exports, and do not commit production key bundles into unprotected Git. See key rotation.
In-cluster API requests use the projected ServiceAccount token and trusted API CA. Token
files are reread for each request to support Kubernetes token rotation. Local kubeconfig
mode supports bearer tokens/token files and client certificates; exec/auth-provider
plugins and disabled TLS verification are rejected. The scratch image includes CA trust.
An explicitly configured HTTP KUBE_API_URL, such as a loopback kubectl proxy,
delegates transport/authentication to that local endpoint; do not expose the proxy or
development listeners to untrusted clients.
The shipped workload ServiceAccount can read Nodes, Services, Ingresses and optional ExternalIPBindings cluster-wide; manage DNSZone/DNSRecords only in its administration namespace; and get/create/update settings ConfigMaps and Secrets there. It can manage PeerSites there and update their separate status subresource. It cannot write Nodes, Services or Ingresses or ExternalIPBindings, change the DaemonSet/RBAC, or install CRDs. An installer provisions cluster resources and CRDs separately. These permissions intentionally allow UI-driven CR and Secret administration, so the management access boundary also grants substantial Kubernetes write authority. See Kubernetes resources.
Orbit Deploy's own controller privilege and namespace scope are separate from the DNS
ServiceAccount. A platform-level OrbitDeployment in kube-system can manage the
required cluster RBAC; a tenant-mode source cannot. Git/image credentials configured for
Orbit Deploy are also distinct from DNS peer keys.
Network paths
| Source and destination | Required access |
|---|---|
| DNS clients to configured node external IPs | UDP and TCP 53. Both reach the DNS Service; TCP carries fallback for large answers. |
| Peer clusters to each other's configured endpoints | TCP 53 for signed transfer pages and notifications. Preserve a single connection's backend for a paginated transfer. |
| DNS pods to Kubernetes API | HTTPS to the actual API endpoint/port for CR/settings/Secret reads/writes and generated-source lists. |
| Authenticated Ingress controller to management Service/pods | TCP 8080 for console/API. TLS normally terminates at the Ingress. |
| Monitoring and kubelet probe paths to pods | TCP 8080 for metrics and probes; enforcement details depend on the CNI and node traffic treatment. |
| DNS pods to public validation resolvers | UDP/TCP 53 to 8.8.8.8 and 1.1.1.1, only if public query validation is used. |
The application's own public validation destinations are fixed. Do not mistake that optional egress for recursion in the serving path. Cluster DNS resolution or other platform components may require additional policy allowances outside this application's fixed-IP validation paths.
externalTrafficPolicy: Cluster is required for nodes without local DNS pods to forward
traffic to ready replicas. Routing or CNI SNAT can make many public clients appear under
one observed source IP. Account for this when setting rate limits and interpreting logs.
The Service does not allocate, advertise or route previously unreachable external
addresses by itself.
Runtime and resource bounds
The image builds a static Go binary and runs from scratch as UID/GID 65532, with CA
trust but no shell. The DaemonSet uses a read-only root filesystem,
allowPrivilegeEscalation: false, RuntimeDefault seccomp, and drops capabilities except
NET_BIND_SERVICE for port 53. Diagnose with logs and HTTP/Kubernetes inspection rather
than assuming shell/exec tools exist in the container.
The DNS listener bounds query workers and concurrent TCP connections, read/write and idle deadlines, and requests per connection (1,024 by default). Per-observed-IP token buckets use a 4,096-entry LRU table. When full, the least-recently used bucket is evicted in constant time so new sources are not globally denied. Evicted sources obtain a fresh burst when they return; source churn can therefore limit the strength of per-IP tracking. Valid TSIG requests using the current local key bypass ordinary source buckets and remain subject to worker/connection/export bounds.
The cache enforces MAX_RECORDS; transfers, source histories and immutable payloads
have separate bounded budgets. HTTP has request/header/time limits; query validation
accepts a restricted type list and at most four concurrent validation requests per
handler. These controls complement infrastructure DDoS, connection and HTTP access
controls; their suitability depends on workload. See
capacity for exact defaults and acceptance checks.
Diagnostic data and privacy
The console/API reveal DNS data, source ownership/cluster IDs, peer addresses, versions, errors and responding pod identity. Query validation sends the requested name/types to the fixed public resolvers and can follow recursive aliases there. Do not use it for names you are unwilling to disclose to those providers. The local comparison targets the local DNS listener without recursion.
Detailed query logging is a persistent, cluster-wide configuration switch. Logs include queried names/types, response codes and durations; operator or platform logs can also contain endpoint and error context. Enable detailed logging for the needed investigation and disable it afterward. There is no automatic timeout. Control log access, export and retention at the platform layer.
Prometheus metrics avoid query names and client-IP labels, but expose operational
identity/status and remain on the management listener. GET /api/config excludes
runtime key material; this does not make other diagnostics public-safe. Apply the same
authenticated management boundary and least-access policy to consoles, status,
snapshots, backups and monitoring as their contents require.
Use observability for metrics and logging, DNS validation for diagnostic behaviour, and troubleshooting for incident recovery.
