CryptoPust

· Security

The OTP service was working. Users could not sign in.

A false positive affecting mobile sign-in after a firewall and WAF migration.

Ekin Yegül


During a firewall and WAF migration, we prepared the new infrastructure in advance, backed up the existing configuration and kept the old system available for rollback. For a week after the transition, nothing appeared wrong. One evening, SMS OTP and soft OTP flows started failing. As CTO, I handled the initial response.

The OTP service logs showed that codes were being generated and the operation was triggered. The SMS provider’s API was accepting calls. Yet the mobile flow did not complete.

Acceptance by the provider does not establish delivery to the phone. There are several stages between generating an OTP and establishing a user session. We needed to find which stage was failing.

The layer that had changed

My first suspicion was the WAF because we had recently changed the infrastructure. At that point I had no logs confirming the hypothesis. I requested inspection access or a direct investigation by the infrastructure team.

We found that the WAF’s automatic learning mechanism was blocking mobile traffic. I have limited information I can disclose about the specific rule, its activation time and the data behind its decision. I will not speculate about the product or rule engine.

Legitimate traffic that had been accepted initially was later classified as harmful and blocked. In security terms, this was a false positive.

Can the user actually sign in?

Google SRE’s distinction between white-box and black-box monitoring is useful here. White-box monitoring examines a service’s internal state, logs and metrics. Black-box monitoring examines outcomes observable from outside.

An illustrative synthetic OTP check could work as follows:

  1. Start a mobile login with a controlled test account.
  2. Correlate OTP generation with the delivery instruction.
  3. Observe SMS delivery or the outcome on an appropriate test channel.
  4. Verify the code and make a request that confirms the session exists.
  5. Record the elapsed time and the stage that failed.

Soft OTP needs a separate check appropriate to its mechanism. Isolate test accounts from customers, avoid logging secret codes and control unnecessary SMS costs.

Internal metrics are useful for locating the fault. What was missing in this case was the connection between those metrics and whether the user could complete the operation.

When would I accept a WAF change?

I would introduce new rules in a controlled manner and monitor blocks and error rates on legitimate flows. Detection or log-only modes, where supported, may help establish the impact before enforcement. Whether to use them depends on the threat and the organisation’s security policy. Keep exceptions narrowly scoped and retest them.

For a security system whose behaviour can change over time, the first successful UAT may be insufficient. Critical user journeys should be tested regularly during a defined observation period after the migration.

The person accountable for production also needs visibility into relevant logs and incident records. This does not require unrestricted administrator privileges. Read-only access, audit trails and an escalation path can be designed together. Otherwise, turning a technical hypothesis into evidence depends on another team’s availability.

For the next WAF migration, I would want to see mobile login success, failures correlated with WAF decisions and a tested rollback plan in the acceptance record. A successful response from the OTP service is only one stage of that process.

Originally published: 2026-07-23. Revised edition: 3 December 2026.

Sources


Related articles

All articles