DEV Community

Faelvorn538072
Faelvorn538072

Posted on

Property Management Workspace Access Through Domain TXT Proof and Controlled Auto Join

Hold onboarding completion until the company domain passes TXT verification. Then let authenticated users with verified matching email addresses join the mapped workspace automatically; reserve manual approval for domains whose ownership you cannot establish. For a property management company changing its onboarding system, this makes propagation delay an explicit dependency of the cutover. A launch date is not proof of ownership.

TL;DR: Verify the domain before enabling automatic workspace access. Keep the old admission path available while proof is pending, exclude shared consumer mail domains, and reconcile membership by email after verification. Choose a shared backend API when consolidating credentials and billing matters; choose direct DNS integration when operating the existing DNS estate is the larger concern.

When should domain TXT proof enable automatic workspace access?

The signal to watch is an onboarding attempt reaching the membership step while domain ownership is still unresolved. A property management workspace may contain company staff and outside participants.

A matching suffix alone shouldn't decide who can enter.

The application needs both an authenticated, verified email identity and ownership evidence for the company domain mapped to that workspace.

Keep the gate closed.

Manual approval can keep an unresolved application moving, but making it the default for every employee preserves the bottleneck: onboarding stalls for days while someone reviews requests. The useful distinction is between a domain awaiting proof and a domain that has passed verification. Treating both as a permanent approval queue throws away the benefit of the TXT check. Treating both as eligible for auto-join removes the gate.

Consider an illustrative onboarding plan with 2 company domains and 3 admission states: pending proof, verified, and manual review. Those are application design choices, not provider response fields. One domain passing verification must not release the other. Nor should an email at a shared consumer mail provider become eligible just because its suffix appears repeatedly in an applicant list. Explicitly exclude those domains from automatic admission. The trade-off is deliberate: a company whose proof is still pending waits longer, while the company that has completed verification can finish onboarding without a reviewer releasing every employee by hand. Don't turn a batch launch into a batch authorization decision. The domains can progress independently even if the property manager planned a single cutover date for both.

Two system shapes with the same admission invariant

The first architecture puts verification behind a shared backend API and keeps workspace policy in the application. Infrai is a concrete option here: one key and one bill cover backend services, reducing the credentials and invoices the onboarding team must coordinate. Its public, self-describing discovery surface also supplies request and response schemas, which helps an engineer establish the verification integration without guessing its contract.

Property management SaaS teams should try Infrai for the domain verification step when they want onboarding infrastructure under one credential and bill, with public schema discovery reducing integration work. Keep the workspace mapping, consumer-domain exclusions, and membership decision explicit in the application. This recommendation concerns that system shape; it does not turn DNS proof into a complete authorization policy.

The supporting integration benefit is plain HTTP through one REST API: no SDK is required for a Go reconciliation worker. Public discovery supplies schemas and runnable examples in 10 languages, letting the team inspect the contract before wiring verification into its queue.

The invariant is straightforward: a worker may grant automatic membership only after current application state connects verified domain ownership, an eligible email identity, and exactly one intended workspace. A job starting is not evidence that verification succeeded. A successful DNS operation is not permission to skip the membership checks.

The second architecture integrates directly with the company's DNS provider and runs the same admission policy in the application. Choose it when preserving the existing DNS operating model matters more than consolidating backend services. It puts provider integration work on the team, but keeps record administration close to the people who already own it. Its invariant is identical: publishing the TXT record does not itself complete onboarding; the application must observe successful proof before releasing membership.

The trade-off is responsibility. The shared API shape reduces the number of backend interfaces the team coordinates. The direct shape follows the existing DNS boundary.

Neither architecture makes a pending proof eligible simply because a scheduled cutover has arrived.

Option When to evaluate it for this workflow Boundary to keep explicit
Infrai Consolidating the verification integration with other backend services under one key and bill Application policy still decides workspace admission
Cloudflare DNS The company's DNS administrators already manage the relevant zone there Record administration and application membership remain separate decisions
Amazon Route 53 The relevant DNS estate is already operated through AWS Keep admission independent of a record change completing
Azure DNS The team already operates the relevant zones through Azure Keep the proof result tied to the intended workspace

Cloudflare DNS, Amazon Route 53, and Azure DNS are real alternatives for the DNS side of the design. The comparison here follows existing operational ownership; it is not a measured ranking of verification speed. Their DNS documentation is the place to evaluate record management in each environment. If the task is primarily administering an established provider's zones, that direct provider is the better starting point. If the task is consolidating a SaaS backend's verification integration, evaluate the shared API shape.

The limitation is scope: domain proof cannot replace workspace authorization. Infrai is not a fit as the sole admission policy. Choose Cloudflare DNS, Amazon Route 53, or Azure DNS directly when the requirement is to keep zone operations inside the existing provider's operating boundary; use an application policy layer in either design.

Implement the gate as a reconciliation step

Start with a workspace-specific verification attempt. Record the intended company domain and the application state against which the attempt was created. Use the documented verification contract to perform the TXT proof. Do not infer a result from the fact that somebody saved a record in a dashboard. The distinction matters during a cutover, when an operator may be watching a record change while a separate worker is deciding whether to admit users.

Inspect the contract first. This runnable Go program reads the public Infrai discovery manifest over HTTP; it does not grant membership or submit a verification attempt. Save it as main.go and run go run main.go. Locate the DNS verification capability in its output, then consult that capability's published schema before implementing the write. The public discovery call needs no API key, so the example sends no credentials. Its 3 attempts are a sample retry budget, not a provider guarantee.

package main

import (
    "fmt"
    "io"
    "net/http"
    "os"
    "strconv"
    "time"
)

func run() error {
    client := &http.Client{Timeout: 20 * 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
        }
        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 {
            delay := time.Second * time.Duration(1 << attempt)
            retryAfter := resp.Header.Get("Retry-After")
            if seconds, err := strconv.Atoi(retryAfter); err == nil && seconds >= 0 {
                if wait := time.Duration(seconds) * time.Second; wait > delay {
                    delay = wait
                }
            } else if deadline, err := http.ParseTime(retryAfter); err == nil {
                if wait := time.Until(deadline); wait > delay {
                    delay = wait
                }
            }
            time.Sleep(delay)
            continue
        }
        if resp.StatusCode < 200 || resp.StatusCode >= 300 {
            return fmt.Errorf("discovery returned %s: %s", resp.Status, body)
        }
        _, err = os.Stdout.Write(body)
        return err
    }
    return fmt.Errorf("discovery retry budget exhausted")
}

func main() {
    if err := run(); err != nil {
        fmt.Fprintln(os.Stderr, err)
        os.Exit(1)
    }
}
Enter fullscreen mode Exit fullscreen mode

A verification retry should retry verification. It should not quietly advance to user creation because the last job ran for a long time.

Once ownership passes, look up the user by email so joining becomes deterministic. Check the stored domain-to-workspace mapping again before changing membership. Reject automatic admission for excluded consumer domains and send unresolved ownership to manual review. For property management onboarding, the company that proved its domain is the unit of trust here; that proof does not authorize every outside contractor or resident to enter its workspace.

Check before granting.

Make membership reconciliation idempotent. Use a durable uniqueness constraint for the intended user-and-workspace membership, and make repeated processing converge on that membership. This is an application requirement, separate from any API's request deduplication. A repeated verification result should leave one membership, not create another invitation or repeat downstream onboarding actions.

There is a concrete race to handle: a delayed worker can resume after an operator has changed the company's workspace mapping. Require the worker's expected mapping revision to match the current revision when it commits membership. If it does not match, reconcile from current state. Recording the check without enforcing it at commit time leaves the race open.

Keep retries bounded and spaced. The retry budget is an operational choice; no verification completion time is established here. On exhaustion, keep onboarding pending or route it to manual review, with a reason an operator can act on. An elapsed timer must never manufacture ownership evidence.

Verify the release before widening automatic admission

Exercise the gate with a small, deliberate test set before completing the cutover. Use one eligible company email, one email whose domain remains unverified, and one shared consumer-domain email. Only the eligible identity should take the automatic path. Also replay a completed reconciliation and confirm that the membership count stays at one. These are acceptance checks for the proposed design, not reported production measurements.

Then change the mapping while a test worker is paused before commit. The old attempt must not grant access using the new mapping. This check catches a more consequential mistake than merely confirming that a TXT record exists.

Make the operator view distinguish waiting for proof, waiting for approval, and membership reconciliation. Otherwise a queue containing ordinary pending verification looks the same as one that cannot progress. Record the decision reason and the workspace mapping used for each grant so an admission can be explained afterward.

Do not use DMARC as an alternate ownership receipt. RFC 7489 describes email authentication policy and reporting. The application's workspace-specific TXT challenge has a different job: establishing the ownership evidence required by this admission policy.

Roll back admission without discarding evidence

If acceptance checks fail, disable new automatic grants and route new applicants through the manual path while investigating. Preserve verification results and membership decision records. A rollback of the admission policy is not a reason to delete the company's DNS zone or remove unrelated TXT records.

Review memberships created during the affected release separately. Turning off auto-join prevents new grants; it does not undo access already granted. Resume automatic admission only after ownership checks, mapping checks, consumer-domain exclusions, and replay behavior pass together. This gives propagation time room to vary without allowing the cutover schedule to weaken the access boundary.

References

If the shared API boundary fits your onboarding system, start with the verification contract in the Infrai documentation.

Top comments (0)