The Lazy Programmer's Guide to Secure Computing
Why Stack Overflow recommends it
Stack Overflow users link it when explaining capability-based security and secure design patterns such as revocable accessors and the sealer/unsealer pattern.
Recommended by 2 people across 2 different months, 2010 to 2012.
What it is
A Google Tech Talk by Marc Stiegler of HP Labs on writing secure code by following the Principle of Least Authority. A lazy programmer is pushed toward modular, encapsulated OO designs that end up enforcing POLA and defense in depth, and the talk closes with tools for JavaScript, Java and distributed systems.
Cited in 1 Wikipedia article, including Marc Stiegler.
What people said
Strong rec Omnifarious · 2010-09 · Stack Overflow · on “How should I savely store encrypted user data on my server, and serve it only to the right user?”
Use option one and make the URL for the data contain a long random string. Anybody who knows the random string can get the data. Of course, only the client who created the data is going to have that URL right off. If someone wants to give someone else revokable access, allow them to generate a new random URL and provide a means for them to name that random URL and revoke its ability to get at the data. Capability based security [LINK] is easier to get right, more flexible and makes more sense to users. There is a really excellent YouTube video about capability based security [this video] and a nice website with some essays about it [LINK] .
Recommends Thomas · 2010-10 · Stack Overflow · on “Good Guide For Web App Security?”
Javascript: This might be a very interesting video for you: [this video] Don't go crazy on logins and passwords. Be professionally lazy - know what you are doing! JSON is great for data transfer, XML has to much overhead in my opinion. Use JSON.parse never use eval. PHP Always use mysql_real_escape_string [LINK] or mysqli_escape_string [LINK] . Use htmlspecialchars [LINK] before displaying user input or use strip_tags [LINK] before saving user input. Never trust anything coming from the user/browser.
Cites Mike Samuel · 2011-06 · Stack Overflow · on “What design pattern does this follow?”
It looks similar to the revocable accessor described in this secure design patterns talk : "The Lazy Programmer's Guide to Secure Computing" [this video] Maybe call it an expiring accessor.
Cites Mike Samuel · 2012-04 · Stack Overflow · on “Clarification about this Caja( secure JavaScript ) code?”
The throw bit is pseudocode. The real code is available via svn [LINK] . Marc Stiegler describes the sealer/unsealer pattern and other secure decomposition patterns at [this video]