Adding Admin OTP Taught Me the Questions That Come After Authentication
A look back at the admin OTP authentication work on Itda SM: a successful authentication screen and the scope of operations protected on the server had to be checked separately.
Joohwan Yu · Founder, Full Stack Developer
Toris · Published
Contents
I once implemented an OTP authentication feature on the Itda SM (잇다 SM) project. The flow of entering a code on screen and confirming it is easy to see. But once I took on the backend as well, what I came to care about more was which requests get allowed after authentication finishes.
A Successful Authentication Screen Does Not Explain the Protected Scope
Confirming that someone is logged in is different from confirming that this person may perform a particular admin operation. Even with the state of having passed OTP, it does not follow that they gain permission to access another user’s data. Hiding a button on screen is likewise not the same as a permission check on the server.
That work gave me the occasion to look at authentication and authorization separately. Looking back, the phrase “OTP feature done” alone cannot sufficiently explain what was protected. You also need to say before which operations an extra check is required and where the verified state is tied in.
The Boundaries I Would Review Again Now
First, I would check the relationship between the login session and the extra-authentication state. I would look at whether the earlier authentication state survives after logout, and whether it is wrongly honored after switching to another account. For important operations, I need to confirm that the same conditions apply even when the request bypasses the screen.
I would also treat failure flows as their own feature. A code that does not match and an authentication method that cannot be used call for different next actions from the user. Just telling people to retry blindly can increase support inquiries, and overly loose recovery can undermine the purpose of extra authentication. I will not settle this balance with a single generic answer.
Explaining the Completion Scope of a Feature
The fact that OTP was implemented alone does not let you say the whole system is safe. You need to distinguish the requests to which extra authentication applies from those that still need separate review. At the time I concentrated on connecting input and verification; now I also ask whether the protected scope is consistent across the whole service.
The standard I am left with is simple. When reviewing an authentication feature, I will look at the list of requests that need protecting before a screenshot of the success screen. “Is it convenient for legitimate users?” and “Does the same rule apply to bypass requests?” must each be checked. Only by separating the two questions can I explain the completion scope of the feature.
Technical reference: OWASP Authentication Cheat Sheet
Advertisement