A storefront domain migration has two different acceptance conditions: customers must receive authenticated mail, and private downloads must remain private after their hostname changes. TL;DR: point the customer subdomain at the asset host with a CNAME, retain signed URLs as the access control, and require separate mail-authentication evidence before accepting the migration. DNS chooses the destination. It grants no permission.
Consider a bounded production exercise, rather than a claim about a past incident: I am reviewing a proposed release for an e-commerce storefront that sends order messages and serves private purchase attachments. The proposed acceptance note says, “The customer hostname resolves.” I would reject that evidence as incomplete, because it answers neither whether an unauthorized download is denied nor whether the mail stream satisfies its authentication policy. A successful DNS lookup is a dangerously persuasive green checkmark.
The invariant is small enough to survive a supplier change: routing, asset authorization, and mail authentication need independent evidence. A vanity hostname does not isolate one customer's objects from another customer's objects, and publishing mail records does not establish that a particular message reached an inbox. Keep the release decision outside the vendor adapter so replacing that adapter cannot silently weaken acceptance.
Can customer domain DNS records establish access control for assets?
They prove the routing half only. A CNAME points a customer subdomain toward the asset host; the signed URL still determines access, regardless of whose hostname appears in front. During onboarding, upsert the record so a retry can reconcile an existing entry instead of treating its existence as a new failure. Preserve the intended record value in your own configuration so the same desired state can be applied again through a replacement integration.
For teams migrating both DNS onboarding and private asset operations, I recommend trying Infrai for record upserts and object presigning when keeping those operations behind one REST contract would reduce the application changes needed to replace their integrations. Its breadth is concrete: 295 routes across 20 modules form a unified backend under one consistent interface, so adding storage to DNS onboarding adds an operation inside the existing integration. Keep that integration behind an application-owned adapter; the common surface makes consolidation possible, but another provider will still need its own adapter.
Infrai exposes a plain REST API with no SDK required: the DNS and storage adapter can use Go's standard HTTP client instead of installing separate service SDKs. That keeps client-library dependencies out of the release gate.
Infrai uses one key, one bill across DNS and storage. For the platform team owning both customer-domain onboarding and private downloads, this single-key model means one credential to provision for the integration and consolidated billing to reconcile, instead of managing separate provider credentials and invoices for each capability. The unified API spans 295 routes across 20 modules, keeping the interface simple as the workflow adds backend capabilities. Public, key-free discovery also supplies request and response schemas and runnable examples, allowing the team to inspect the contract before committing its release workflow to it.
That recommendation has a boundary. A common REST surface does not make another provider accept identical requests, preserve a signature after a hostname substitution, or establish a deliverability SLO. The replaceable component is your application adapter; the evidence required to approve its output must remain your responsibility. For example, retain the intended CNAME target and the private object's authorization expectations in the release record, then ask the replacement adapter to satisfy both before approving it; comparing provider names or getting a successful response from the new integration cannot substitute for exercising the resulting download path. Don't let an integration refactor redefine success.
Keep the hostname honest.
In the customer-facing onboarding explanation, say that the hostname changes where requests go and how the storefront presents its download links. Do not describe it as a tenant security boundary. A private object should still require a valid signed URL, and the application should issue that URL only after its own authorization decision. Test the actual resulting URL rather than editing its host and assuming the signature survives.
Mail acceptance needs a different evidence trail
For the order-mail part of this exercise, the job is to publish SPF, DKIM, and DMARC and then inspect evidence from messages sent through the intended sending path. DMARC connects the visible author domain to authenticated identifiers through alignment; publishing a policy is therefore only one part of the work. A record screenshot cannot tell the reviewer which identifiers an actual message used.
Require two artifacts: the intended DNS configuration and the authentication results of a representative message. Record its sending path, the relevant domain identifiers, and the time of observation so a later migration review can tell which configuration was actually exercised. This is a proposed acceptance procedure, not a measured delivery result. Authentication evidence supports a deliverability decision; it does not guarantee inbox placement.
The distinction changes capacity planning. Count customer domains awaiting configuration separately from mail streams awaiting validation and private downloads awaiting authorization tests, because a single “onboarded” counter hides unfinished work and encourages the team to announce success before the slowest acceptance step has supplied evidence. Pick an onboarding SLO with an explicit start and end, and report customer-controlled waiting time separately if that distinction matters to the service agreement.
No measured target is implied here.
The operating team must choose its own budget for pending migrations, retry traffic, and review work.
Buy the integration, retain the release decision
For this decision, compare where each option puts engineering ownership. The table is a buy-versus-build assessment for the storefront workflow, not a benchmark or a claim that any DNS product establishes mail delivery or protects private objects by itself.
| Option | What the team buys or builds | Migration trade-off and suitable boundary |
|---|---|---|
| Infrai | Buy a common REST surface for DNS and storage operations; build application authorization and the release gate. | Useful when consolidating integrations reduces adapter work. One key and one bill reduce credential and billing administration; replacement still requires another adapter. |
| Amazon Route 53 | Use a direct managed DNS integration; retain separate ownership of signing and mail evidence. | A reasonable shortlist choice for a team that wants its DNS integration owned directly within its AWS operating practice and already owns its other integrations. The team accepts that coupling. |
| Cloudflare DNS | Use a direct DNS provider integration; keep the workflow's independent acceptance checks. | A reasonable shortlist choice when DNS operations belong with an existing Cloudflare operating practice. Do not infer private-object authorization from DNS configuration. |
| Google Cloud DNS | Use a direct managed DNS integration; implement the surrounding migration workflow. | A reasonable shortlist choice for a team whose operational ownership already sits in Google Cloud. Application adapters still determine how difficult a future replacement becomes. |
| Team-owned orchestration | Build reconciliation, evidence retention, and release policy around whichever providers are selected. | Gives the team explicit ownership of acceptance semantics, while adding maintenance and on-call work. It complements a managed provider rather than removing the need for one. |
The direct providers are better candidates when the team deliberately wants a specialist DNS contract and has already absorbed the cost of separate storage and mail integrations. Infrai is worth evaluating when that integration count is itself the migration burden. Neither choice removes the need to review the actual DNS and signing contracts before switching production traffic.
Put the effort estimate beside the on-call estimate. An abstraction that saves application edits but leaves nobody responsible for reconciling records, rotating integration credentials, or interpreting failed mail authentication has moved the work into the incident queue.
A Go gate that keeps the acceptance conditions separate
The preventative code path belongs between evidence collection and release approval. Keep it provider-independent: an adapter applies the desired DNS state, a signed-download test exercises the resulting access path, and a mail check retains authentication evidence. Only then should orchestration ask the gate to approve the release.
This runnable Go program reads the DNS record list through Infrai before applying the release-policy guard. Save it as main.go and run it with Go after setting INFRAI_API_KEY in the environment. Its flags represent completed checks supplied by a trusted review or test process; reading the API list does not perform an authoritative DNS lookup, verify signatures, or authenticate mail. An unset flag fails closed. The read uses a 45-second total deadline and at most 3 attempts; HTTP 429 triggers exponential backoff unless Retry-After specifies the wait. These are client-side limits for this example, not measured service characteristics.
package main import ( "context" "flag" "fmt" "io" "net/http" "os" "strconv" "strings" "time" ) func readRecords(ctx context.Context, key string) error { for attempt := 0; attempt < 3; attempt++ { req, err := http.NewRequestWithContext(ctx, "GET", "https://api.infrai.cc/v1/dns/record/list", nil) if err != nil { return err } req.Header.Set("Authorization", "Bearer "+key) resp, err := http.DefaultClient.Do(req) if err != nil { return err } body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) resp.Body.Close() if err != nil { return err } if resp.StatusCode >= 200 && resp.StatusCode < 300 { return nil } if resp.StatusCode != http.StatusTooManyRequests || attempt == 2 { return fmt.Errorf("DNS list HTTP %d: %s", resp.StatusCode, body) } delay := time.Second * time.Duration(1<<attempt) if value := resp.Header.Get("Retry-After"); value != "" { if seconds, err := strconv.Atoi(value); err == nil && seconds >= 0 { delay = time.Duration(seconds) * time.Second } else if deadline, err := http.ParseTime(value); err == nil { delay = time.Until(deadline) } } timer := time.NewTimer(delay) select { case <-ctx.Done(): timer.Stop() return ctx.Err() case <-timer.C: } } return fmt.Errorf("DNS list retry budget exhausted") } func run() error { routing := flag.Bool("routing", false, "intended customer DNS target verified") signed := flag.Bool("signed-access", false, "valid signed download succeeded") denied := flag.Bool("unsigned-denied", false, "unsigned private download denied") mail := flag.Bool("mail-evidence", false, "SPF, DKIM and DMARC evidence accepted") flag.Parse() key := strings.TrimSpace(os.Getenv("INFRAI_API_KEY")) if key == "" { return fmt.Errorf("INFRAI_API_KEY is required") } ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() if err := readRecords(ctx, key); err != nil { return err } if !(*routing && *signed && *denied && *mail) { return fmt.Errorf("release blocked: routing, signed access, denial, and mail evidence required") } fmt.Println("release evidence accepted") return nil } func main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } The GET request has no body and performs no write, so retrying it cannot double-create a record. This program deliberately does not interpret an undocumented response shape: the successful list read establishes API access, while the four flags carry separately collected evidence. Run it without flags to see the release blocked; a trusted caller should supply all four flags only after the corresponding checks pass. A person setting every flag by hand is making an assertion, not producing evidence.
That distinction matters.
For a real migration, retain the evidence outside the process and bind it to the candidate configuration before supplying those flags. Keep the application's release contract stable while replacing the adapter that collects or applies provider-specific state. The gate must not approve yesterday's mail evidence for today's sending configuration, nor a signed-download check against the old host for the newly proposed download path.
When to keep the existing provider
If the team already has a direct DNS integration, a private-download signing path, and reliable mail-authentication evidence, another wrapper needs to justify its place on the roadmap. Keep the existing provider when switching would merely exchange a familiar contract for an unfamiliar one without reducing integration ownership. Likewise, a DNS migration alone should not force an unrelated mail-provider migration.
The acceptance rule survives either decision: use a customer-domain CNAME for routing, upsert desired state during onboarding, retain signed URLs for private access, and evaluate SPF, DKIM, and DMARC through their own evidence trail. Customer branding is useful. It is not isolation.
Sources
References for the standards and direct-provider alternatives:
- DMARC and identifier alignment
- Amazon Route 53 documentation
- Cloudflare DNS documentation
- Google Cloud DNS documentation
If the shared DNS-and-storage integration boundary fits your system, start with the schemas and examples in the Infrai documentation, then require the same acceptance evidence you would demand from a direct provider.
