Secure Coding Practices
In addition to the secure coding practices defined by OWASP, as discussed in Chapter 22, another consideration around software applications includes how a software program responds to failures. For example, if you are depositing $1,000 into your bank account and the ATM malfunctions during this process, you don’t want the ATM to lose your money. In this case, you would want the ATM to fail in such a way that your money is still secure. For example, the drawer closes tight so that only a trusted bank employee can access your deposited money.
How systems behave in failure scenarios is crucial for building reliable applications. There are four choices when planning for software failure:
- Fail-secure: When an application is designed with fail-secure features, it prioritizes preventing damage in case of failure. In the event of an error, the system transitions to a safe state, even if it means sacrificing some functionality. For example, an e-commerce...