“Swiss Cheese” model. Multiple levels of security ensure that if one level fails, there are others offering protection… but even then, there are no guarantees .
There is much to be said for secure middleware and domain separation, but the key to system security is to make every component as secure as it can reasonably be. Even then, security is a continuously evolving game. Hackers don’t stand still just because life has become more difficult – they simply have new challenges to overcome.
No connected system is ever going to be both useful and absolutely impenetrable. It makes sense to protect it proportionately to the level of risk involved if it were to be compromised, and that means applying multiple levels of security so that if one level fails, others are standing guard.
Application code is present throughout any connected system. It is present from the endpoints, to the algorithms handling the systems most critical data, and everywhere in between. Ensuring that it is appropriately secure is therefore of paramount importance.