How to design an app with security in mind?
security
Solution
As the first thing, and starting point of all security considerations, you need to define a threat model: what are the things that you want to happen, what are the things you want to prevent from happening, what are the things that you don't care if they happen?
Then, for each threat, explain how your system prevents that threat. What makes the expertise of security experts is primarily an intuition of what threats occur typically in systems. You learn that by reading literature - it's often the same threats that challenge many systems.
Problem
Over the net I encountered following phrase: Software security isn't a layer on top of your application, it is incorporated in your application from the very beginning. But how do you design a system with security in mind?