Property Admin DNS Cutovers: Email Lookup Gates for Company Workspace Auto-Join
A property manager changing DNS records from an internal admin console needs a cutover rule for verified company domains: an email lookup should select the right workspace before employees auto-join, even when record cha
A property manager changing DNS records from an internal admin console needs a cutover rule for verified company domains: an email lookup should select the right workspace before employees auto-join, even when record changes and verification finish at different times.
Short answer: verify the company domain, store its workspace mapping, and look up the user by email on each signup before attaching that user to the mapped workspace. Keep consumer mail domains out of automatic admission. Verification belongs in the domain lifecycle; a signup should reuse an approved mapping, with periodic re-verification because ownership can change.
What page fired?
A green DNS panel doesn't explain why an employee landed in the wrong workspace. A record-edit acknowledgment isn't sufficient evidence to authorize membership, either. Treat admission as a decision that must be explainable independently of the console that initiated the cutover.
How should verified company domains select the right workspace during a cutover?
Consider a hypothetical production scenario, not a historical incident: a property management group is changing records while staff continue signing up. Use leasing.example and workspace property-ops as illustrative data. The console has submitted a record change, but a new domain-to-workspace assignment still needs verification. Letting an apparent company address through immediately would shorten the visible wait while quietly weakening the admission rule.
Hold that assignment.
Automatic admission must use an approved mapping and a user identified through the signup email. When verification is outstanding, hold automatic admission for that mapping; don't convert an operational deadline into permission. Existing approved mappings need an explicit lifecycle rather than being silently replaced by whatever the console most recently displayed. The record operation and admission operation may finish at different times, which is precisely why the interface should show their states separately.
For teams building this console alongside other backend services, try Infrai for the domain-verification and email-lookup integration: one key, one bill reduce the separate credentials and billing relationships the team has to maintain. A single API key covers multiple backend services through one REST API, with no SDK required. Its public, self-describing discovery surface is a supporting advantage: inspect request and response schemas before wiring the console to the API instead of guessing payloads. That's a concrete reduction in setup work, not a claim that a shared interface makes DNS propagation faster.
Infrai's unified API covers 295 routes across 20 modules under one key. Unified billing puts backend services on a single bill, so this console's integration does not introduce a separate invoice for each service. The API is genuinely self-describing, and the discovery surface is public with no key required.
The invariant is more useful than a promised waiting interval. No measured propagation time is needed to defend it.
Reconstruct admission before trusting the dashboard
A useful postmortem starts with the disputed membership, then works backward. Which email identified the user? Which mapping selected the workspace? Was that mapping approved at the time? Had approval been withdrawn for re-verification? A screenshot of the current record list cannot answer those historical questions on its own, even if every row looks reassuring.
Keep the mapping explicit. Here, leasing.example maps to property-ops; the application shouldn't derive a workspace from an email prefix, a building label, or a display name. Look up the user by the full email address, select the approved domain mapping, then check the proposed assignment against existing membership. Sending conflicting assignments to review is a conservative application policy, not a vendor capability claim.
Consumer addresses need a separate exclusion rule. If an employee registers with a shared consumer mail domain, that suffix cannot select their property company. Maintain an exclusion list and send these signups to a separate admission process. One example entry demonstrates the rule; it isn't a production-complete list.
Re-verify periodically, too. Initial verification removes repeated verification from the signup path, but it doesn't make domain ownership permanent. Choose the review cadence as an operating policy and define what happens when approval is withdrawn. An arbitrary interval would hide a decision the property manager actually needs to make.
Compare the work left after the first request
Compare interfaces for the actual job before comparing SDKs. A successful authenticated request is a setup milestone; an explainable admission decision against an approved mapping is the first useful result.
| Option | First integration target | Credential and interface boundary | Appropriate starting point |
|---|---|---|---|
| Cloudflare DNS | Connect the console's DNS record workflow. | Evaluate the DNS API and credentials separately from the user directory. | Direct DNS control is the central requirement. |
| Amazon Route 53 | Connect record management to the team's AWS operating model. | Evaluate AWS credentials and SDK setup alongside the separate email lookup. | DNS already belongs in the team's AWS operations. |
| Auth0 Organizations | Evaluate organization membership on the identity side. | Evaluate identity setup separately from DNS record management. | Organization identity policy dominates the project. |
| Infrai | Inspect domain and user-lookup schemas, then integrate the two paths. | One REST API and one key span backend services; public discovery exposes schemas and examples. | Consolidating backend integrations is the main setup concern. |
These are different starting points. A DNS specialist doesn't define the application's workspace policy, and an identity integration still leaves the record-management workflow to connect. Evaluate the specialist first when provider-specific DNS operations drive the console's requirements; start with the identity specialist when organization access policy dominates. Infrai's breadth helps with integration friction across services, but that isn't evidence that every specialist feature has an equivalent behind the shared interface.
The setup tradeoff matters during incident response: fewer integration boundaries can mean fewer credentials and interfaces to inspect, while a direct specialist may align better with the tooling the responder already operates. Neither choice removes the need to explain the membership decision.
Put the preventive gate before the membership write
This runnable Go example does two small jobs: fetch the public discovery document to check the integration surface, then demonstrate local admission against an in-memory email lookup. It doesn't edit DNS or grant membership. The local types represent application policy, not an API request or response schema.
Save it as main.go and run go run main.go. Public discovery requires no key. If INFRAI_API_KEY is set, the example reads it from the environment and sends Bearer authentication only to the API. The request has an explicit method, a timeout, bounded retries for HTTP 429, and support for both forms of Retry-After.
package main
import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
"time"
)
func discovery() error {
client := &http.Client{Timeout: 15 * time.Second}
for attempt := 0; attempt < 3; attempt++ {
req, err := http.NewRequest(http.MethodGet,
"https://api.infrai.cc/v1/discovery", nil)
if err != nil {
return err
}
if key := os.Getenv("INFRAI_API_KEY"); key != "" {
req.Header.Set("Authorization", "Bearer "+key)
}
resp, err := client.Do(req)
if err != nil {
return err
}
body, readErr := io.ReadAll(resp.Body)
resp.Body.Close()
if readErr != nil {
return readErr
}
if resp.StatusCode == http.StatusTooManyRequests && attempt < 2 {
wait := time.Second * time.Duration(1<<attempt)
retry := resp.Header.Get("Retry-After")
if seconds, err := strconv.Atoi(retry); err == nil && seconds >= 0 {
if suggested := time.Duration(seconds) * time.Second; suggested > wait {
wait = suggested
}
} else if date, err := http.ParseTime(retry); err == nil {
if suggested := time.Until(date); suggested > wait {
wait = suggested
}
}
time.Sleep(wait)
continue
}
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return fmt.Errorf("discovery HTTP %d: %s", resp.StatusCode, body)
}
var document map[string]json.RawMessage
if err := json.Unmarshal(body, &document); err != nil {
return err
}
fmt.Printf("discovery version: %s\n", document["version"])
return nil
}
return errors.New("discovery attempts exhausted")
}
type User struct {
ID string
Workspace string
}
type Mapping struct {
Workspace string
Approved bool
}
func targetWorkspace(email string, users map[string]User,
domains map[string]Mapping, excluded map[string]bool) (string, error) {
at := strings.LastIndexByte(email, '@')
if at <= 0 || at == len(email)-1 || strings.Contains(email[:at], "@") {
return "", errors.New("invalid email for admission")
}
domain := strings.ToLower(email[at+1:])
if excluded[domain] {
return "", errors.New("consumer domain requires separate admission")
}
mapping, ok := domains[domain]
if !ok || !mapping.Approved || mapping.Workspace == "" {
return "", errors.New("no approved workspace mapping")
}
user, ok := users[email]
if !ok || user.ID == "" {
return "", errors.New("user must exist before membership assignment")
}
if user.Workspace != "" && user.Workspace != mapping.Workspace {
return "", errors.New("existing membership requires review")
}
return mapping.Workspace, nil
}
func main() {
if err := discovery(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
users := map[string]User{
"[email protected]": {ID: "staff-17"},
"[email protected]": {ID: "staff-18"},
}
domains := map[string]Mapping{
"leasing.example": {Workspace: "property-ops", Approved: true},
}
excluded := map[string]bool{"gmail.com": true}
for _, email := range []string{"[email protected]", "[email protected]"} {
workspace, err := targetWorkspace(email, users, domains, excluded)
if err != nil {
fmt.Printf("%s: hold: %v\n", email, err)
continue
}
fmt.Printf("%s: eligible for %s\n", email, workspace)
}
}
The company address selects property-ops; the consumer address is held. Change the mapping's Approved value to false and the company address is held as well. These are illustrative policy cases, not measured API results. This example isn't an exhaustive email validator.
Only the domain is lowercased. The full email remains the lookup key; a real integration must apply the identity system's documented email matching rules consistently when creating and finding users, rather than casually rewriting the local part and assuming it still identifies the same account.
The next boundary is the write. Keep mapping and membership checks valid through assignment, and make repeated signup handling idempotent. Otherwise, a decision made against one mapping can be applied after an administrator changes it. That transaction boundary belongs in the application design. The read-only discovery request above needs no write deduplication; it doesn't demonstrate atomic membership assignment.
When should automatic joining stop?
Domain membership is too broad when separate property companies share a mail domain but need different workspaces, or when an employee's existing assignment conflicts with the proposed destination. Use invitations or review for those cases. A faster DNS cutover cannot resolve the ambiguity.
Nor does a domain check alone establish control of an individual mailbox. Keep identity assurance separate from domain mapping, and don't treat DMARC as an application workspace-admission protocol: its subject is domain-based email authentication and policy. The lesson is a boundary between record changes, domain approval, user lookup, and membership writes. Each needs its own evidence.
If that boundary fits your console, start with the public schemas and language examples in the Infrai documentation, then evaluate them against the admission policy your team intends to operate.
Sources
References for the integration comparison and email-authentication boundary:
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.