"In a system without a 'Signature' and 'Non-repudiation', every transaction record that looks real is only a castle built on sand."
We recently got involved in an unusual case. Plenty of systems in Taiwan use a similar design, but this one really struck a chord, so I decided to share it as a story. Here it goes...
In a digital nation called "Pointland", everyone uses points to buy and sell virtual goods. There is a large points trading platform called Alice. Alice has a popular app that lets users redeem points for goods. But Alice does not want to handle the transaction flow for every product herself, so she brings in Bob, a third-party developer.
🧩 The transaction flow
Bob builds a transaction website for Alice. Its defining feature is that it only runs inside the WebView of Alice's app. In other words, the site does not accept direct visits from an ordinary browser; it only works when opened from Alice's app. Bob believes this ensures transactions only happen inside Alice's ecosystem.
🔒 The hidden risk
However, every points deduction and transaction request is initiated and completed through a front-end JS SDK inside this WebView. Alice handles all of those details, and she puts as many security checks and safeguards into the app as she can. But as a third-party site, Bob's back end never receives any information to verify the transaction. Put simply, Bob's server has no idea whether a transaction is real or fake. It can only trust the WebView in Alice's app when it says the transaction succeeded.
⚠️ The problem surfaces
One day, a security tester found that a simple MITM attack on the WebView traffic was enough to obtain the user token. By then simulating a points deduction, they could easily forge transaction requests. With no back-end verification, these transactions could be "faked" with little effort. Only then did Bob realise that the whole flow was missing a back-end verification step, and he had no way at all to check whether these transactions were legitimate.
The conclusion is... there is no fix
The SA on Bob's development team, probably with a boost from a large language model, designed a very complex verification scheme that greatly increased the development attack difficulty. It was so complex that possibly everyone on both Alice's and Bob's teams believed the problem had been solved.
I remember that the Bob & Alice diagrams in my old cryptography textbook covered something very like this. So when I saw this case, my first reaction was: as long as Alice does not change anything, however elaborate Bob makes his side, he will most likely add far more bugs than he solves. Simply put, Alice is the only party in the whole system who knows whether a transaction exists and what its full details are. If she does not give that information to Bob, Bob cannot confirm whether the transaction data is genuine.
Two remedies
Back to the textbook again. What it taught was that Alice only needs to attach a short signature to her letter. Only Alice can produce this signature, and Bob can verify it using an algorithm Alice gave him earlier. If the signature is wrong, we at least know Alice's letter has been altered and can discard what it says. Alternatively, the more common approach in the working world is for Alice to send the letter through a separate channel, a path only the two of them know about and that cannot be tampered with.
Both methods are common and very effective. In this case, though, Alice's development team presumably had reasons they could not talk about. Their default position was not to change anything. Adding a digest could be under discussion for half a year, and even basic webhook events would not be built. Then they blamed Bob's team for not telling them about the design problem sooner. When I heard this I did not know whether to laugh or cry. It was like watching someone point at a passer-by on the street and shout... "Why didn't you tell me I'm an idiot?"
I think Bob is fine; he found it early. As for John, William, Bill and whatever other third-party developers come later, good luck to them!
Perpetual motion
When Bob's team designed their solution, they eagerly came up with all sorts of tricks and asked me to review them. After reading it, the first thing that came to mind was a perpetual motion machine. If you know the second law of thermodynamics, you would not spend time on things that are very hard, or even impossible, in theory. I am a little grateful that the teachers at my old university were demanding about these foundation courses. Otherwise, given my personality, I would probably have built a perpetual motion machine too.
What does this have to do with SQA?
Quite a lot!
Because we raised this problem in the middle of development. We do not do security testing as such, but this is more of a basic system design flaw, so during API testing we confirmed that these problems would exist... Yes, plural. Alice does not yet know it is "these" problems.
Security testing is not part of our services, but when we see a security concern, we still warn the client verbally, by email or in our reports not to go live with no protection at all. Whether they accept the risk and whether they want to fix it is entirely down to the wisdom of their management.