Chapter 7. Designing with Security in Mind

Almost everyone talks about security. There are possibly more books and articles on security than any other single topic in computer science. Industry pundits have viewed the security issue from every potential angle and a few angles that some of us had never considered. Of course, the issue in nearly every developer's mind is whether all the fuss is worth it — whether any application can reach that magical state of complete protection. The answer is yes. If you design the application such that it has no outside access, no access by the user, no interchange with the network, and doesn't rely on any outside data whatsoever, you can make it completely safe. Unfortunately, no one can use the application, but it's quite safe.

It seems then that true security is a matter of making it difficult to gain unauthorized access and then providing some type of monitoring to make sure that the security measures work. Most applications today go through a vicious cycle where:

  1. An expert attempts to break in (and always succeeds because it's easier to break down the wall than to build it).

  2. The vendor attempts to constrain new attacks while creating a fix.

  3. The fix is bungled.

  4. The vendor creates an improved fix.

  5. The vendor says the application is now bulletproof — as if it ever could be under the current circumstances.

The vendors usually ask that the experts not spend all their time breaking their applications, while the experts claim that the public has a need ...

Get Expert One-on-One™ C# Design and Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.