DEV Community

IshmaelCole6418
IshmaelCole6418

Posted on

SMS and Email OTP Security Evidence for SaaS Report Attachments Explained

The outcome is an authorized recipient receiving the generated report attachment with an evidence trail the team can explain. Start with one explicitly selected OTP channel and a record connecting the login challenge to the report request. In this proposed B2B SaaS alert, the on-call sees an HR shift report waiting behind an incomplete login, an email OTP marked accepted, and no successful verification. That is a design exercise, not a production incident.

TL;DR: Choose SMS OTP versus email OTP for this workflow by testing completion before the business deadline and documenting the security assumptions of each channel. Neither a send acknowledgment nor an email open establishes that an authorized person completed 2FA. Keep challenge verification and attachment submission as separate events, then page on the deadline at risk.

The reader's HR shift reminder is the trigger; sending a generated shift report as an email attachment is the concrete job. That distinction matters because a successful login still leaves the report delivery obligation unfinished. For a US and EU deployment, the evidence should identify which tested recipient cohort and channel the result describes, without treating geography alone as proof of security or compliance.

What should have fired before the report deadline?

The useful earlier signal is a growing age of unfinished report requests, broken down by the stage blocking progress. In the proposed alert, accepted OTP submissions look healthy while requests wait for verification; a dashboard that counts sends would conceal the exact condition that threatens the report deadline. Count completed work.

Define a report deadline and an authentication completion objective separately. For an illustrative acceptance test, use a 10-minute report deadline and reserve 2 minutes for attachment preparation and submission; these are proposed budgets, not measured delivery times or a general recommendation. Once a request has spent 8 minutes without verification, its remaining budget no longer covers the reserved work. That is a useful intervention boundary even if the sending service has acknowledged every challenge.

A proposed SLO could require 99% of eligible report requests to reach attachment submission before their deadline over a defined reporting window. Specify eligibility before collecting results: include failed challenges and abandoned requests when they represent real attempts, and separate deliberate test traffic. Attachment submission is the selected endpoint here. Actual recipient receipt needs its own evidence definition; the SLO must not silently promise it.

Don't page for every slow challenge.

A single request can instead receive a support-visible status, while an aggregate budget-risk condition triggers an operational alert. The appropriate threshold depends on request volume and the consequences of a late HR report, so a percentage without a denominator and a window is an incomplete alert specification.

What evidence should SMS or email OTP provide for SaaS 2FA login?

For SMS OTP, the evaluation should ask what each transport status actually means, how an attempt is tied to the intended account, and what evidence accompanies a successful verification. For email OTP, ask the same questions, then inspect sender authentication and the temptation to treat open tracking as a receipt. These are acceptance criteria, not claims that either channel supplies a particular guarantee.

RFC 7489 describes DMARC, including alignment between the visible author domain and authenticated identifiers, receiver policy handling, and reporting. That makes it relevant to investigating authenticated email handling. It does not establish that the intended employee entered an OTP or opened a report attachment. DMARC reports belong in the diagnostic record with their actual scope; an authentication decision needs an application verification event. The Mail Privacy Protection guide describes protections that prevent senders from learning information about mail activity, including whether a message was opened. A pixel-based open signal is therefore a poor acceptance criterion for an email OTP or a confidential attachment workflow. Missing tracking activity should not automatically become a delivery incident, and apparent activity should not become proof of an employee's action.

Keep the boundary explicit.

Neither source establishes a universal SMS-versus-email security ranking, comparative delivery latency, or US and EU regulatory compliance. A security review still needs to examine channel enrollment, account recovery, challenge expiry, replay handling, and the evidence required to call the login 2FA. A regional rollout still needs representative tests and a review of data handling obligations. Calling a channel compliant before those questions are answered would outrun the evidence.

For the report itself, verify recipient authorization again at the point where the workflow commits to sending the attachment. A login challenge and a report request should share a correlation identifier, but they should retain separate state transitions: passing one step must not manufacture evidence for the next.

Change the instrumentation around completed work

Record challenge creation, transport acceptance, verification, attachment submission, and deadline expiry as distinct events. Keep timestamps and a channel classification alongside an opaque request identifier. Don't put OTP values, email addresses, phone numbers, or report contents into metric labels; define a separate, access-controlled evidence record and an explicit retention policy for whatever identifiers the review actually requires.

The following Go example implements only the earlier budget-risk predicate. It makes no network calls and claims no delivery guarantee. A scheduler can evaluate it for pending requests, while the surrounding application records verification and submission using its own durable state.

package evidence

import "time"

type ReportRequest struct {
    Deadline    time.Time
    VerifiedAt  time.Time
    SubmittedAt time.Time
}

func NeedsAttention(now time.Time, r ReportRequest, reserve time.Duration) bool {
    if r.Deadline.IsZero() || !r.SubmittedAt.IsZero() {
        return false
    }
    if reserve < 0 {
        reserve = 0
    }
    if !now.Before(r.Deadline) {
        return true
    }
    return r.VerifiedAt.IsZero() &&
        !now.Before(r.Deadline.Add(-reserve))
}
Enter fullscreen mode Exit fullscreen mode

Before the deadline, an unverified request enters attention state when its reserved preparation window begins. A verified request does not trigger that early authentication condition, but any unsubmitted request triggers at the deadline. Successful submission clears this predicate; a separate late-submission event must preserve an SLO miss instead of letting the current state erase history. The caller must supply a valid deadline, because a missing deadline deliberately produces no decision here and should generate a configuration validation error upstream. The predicate is intentionally smaller than an alerting policy. It cannot tell whether a transport accepted a challenge, whether a retry is safe, or whether a recipient is authorized. Those decisions require application state and documented channel semantics. Mixing them into a boolean named delivered would make the code shorter while making the evidence harder to defend.

Preserve the missed deadline.

Capacity and ownership determine the operational trade

Capacity planning should start with report requests and challenge attempts, then include the additional attempts allowed by the retry policy. For a synthetic test of 100 simultaneous report requests with at most 2 challenge submissions per request, budget for up to 200 submissions during that test window. Those numbers describe a test envelope. They say nothing about real throughput or latency.

Run the same workload separately for the US and EU cohorts the service intends to support, record verification completion and report submission, and include unfinished attempts in the results. Averages alone can hide the requests that miss the deadline. Also inspect attachment generation queues: faster OTP completion cannot rescue a report worker pool that has already consumed the remaining budget.

The buy-versus-build decision belongs beside this capacity model, because someone must operate the evidence pipeline and explain missing events during an incident. The table identifies evaluation work rather than promising capabilities from an unnamed service.

Responsibility Managed transport evaluation Self-operated transport evaluation
Status evidence Verify event meanings, retention, and export access Define event meanings and operate collection
Deadline load Test submission limits and behavior under queue pressure Test worker capacity and own queue saturation response
Incident diagnosis Establish the boundary between internal and external support Staff the transport and application investigation path
Change cost Assess dependence on event formats and identifiers Assess maintenance work and specialist on-call coverage

A managed transport can reduce the scope of infrastructure the team chooses to operate, while leaving the application responsible for its report deadline and authorization evidence. Self-operation shifts more of that operational scope inside the team. Evaluate both against staffing and exportability; a unit price cannot describe the cost of assembling an incident timeline.

Validate the alert before making it a page

Test the predicate just before the reserve boundary, exactly at it, and at the deadline. Then exercise the workflow with a delayed verification event, a duplicate transport event, an unsubmitted but verified request, and a submission recorded after the deadline. These are proposed test cases. Their purpose is to show that transport noise cannot fabricate a completed report or erase a missed objective.

Deploy the instrumentation in observation mode first. Compare candidate alerts with request timelines, verify that the evidence record answers who was authorized to receive which report, and check that replaying an event does not trigger another attachment send. For an ambiguous submission result, define a reconciliation path before permitting an automatic retry; an extra attempt is an operational decision with a duplicate-send consequence.

Close the loop on the original page. If the reserve is too small, the alert arrives after intervention can help. If it is too large, ordinary pending logins repeatedly interrupt the on-call and can provoke unnecessary repeat sends. Choose SMS or email using tested completion evidence and an explicit security review, then tune the alert against the report deadline. The false-positive cost is staff attention and potentially duplicate confidential attachments. Budget for both.

References

RFC 7489 supports the discussion of DMARC alignment, policy, and reporting. The Mail Privacy Protection guide supports the limitation on interpreting email open activity. Neither supplies comparative OTP benchmarks or a compliance certification.

Further reading

Top comments (0)