dns

package
v1.801.477 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package dns is your DNS records: the zones and records behind every name you point at Hanzo.

It forwards the console's DNS dashboard traffic (/v1/dns/*) to the Hanzo DNS control plane (dns/plugin/hanzodns), which owns the authoritative zone/record store. cloud serves console.hanzo.ai (the DnsModule) but holds no DNS state of its own, so without this thin head console.hanzo.ai/v1/dns/* 404s and the dashboard shows empty zones.

SHAPE. One prefix (/v1/dns/*), every verb, full path passthrough, forwarded to a service whose base URL comes from env (HANZO_DNS_URL) -- the SAME shape and env convention the domain product uses to reach the same plane. It builds a FRESH upstream request and sets only the headers it means to send, so no inbound header (a stray cookie, a forged X-*, an injected Authorization copy) is blindly relayed.

ISOLATION -- BEARER RELAY, NO STANDING CRED. The DNS plane is OIDC-gated and keys every zone per-org: it re-validates the caller's OWN bearer and derives the org from the `owner` claim. This head relays that identity UNCHANGED -- the caller's validated bearer as Authorization (cloud.CallerBearer), plus the server-validated org as X-Org-Id -- and substitutes NO service credential (which would collapse tenants). So a caller in org A can reach only org A's zones, exactly as if it had called the DNS plane directly. Fail-closed: a request with no validated principal is refused 403 before any byte leaves cloud.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(app cloud.Router, deps cloud.Deps) error

Mount wires the DNS dashboard forward head at /v1/dns/* (all verbs, full path passthrough). Registered as a subsystem in apps.Wire(); on by default.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL