RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: authorization xSecurity x
Authorization from Scratch Part 2
Episode #386 – Oct 11, 2012 – 97 comments

Authorization from Scratch Part 2

This finishes the series on building authorization from scratch by refactoring the permission logic into a DSL, restricting authorization with attributes, and combining with strong_parameters to protect params. (20 minutes)
Authorization from Scratch Part 1
Episode #385 – Oct 07, 2012 – 82 comments

Authorization from Scratch Part 1

Authorization can be difficult to implement and test because it often involves complex logic that exists throughout the entire app. Here I demonstrate how to test and implement authorization from scratch. (15 minutes)
Securing an API
Episode #352 – May 23, 2012 – 74 comments

Securing an API

There are many approaches to locking down an API. Here I start off with HTTP Basic authentication then move on to generating a unique token which can be passed through a URL parameter or HTTP header. (7 minutes)
Dynamic attr_accessible
Episode #237 – Oct 25, 2010 – 65 comments

Dynamic attr_accessible

It is important to use attr_accessible for security with mass assignment, but what if you need it to be dynamic based on user permissions? See how in this episode. (9 minutes)
7 Security Tips
Episode #178 – Sep 07, 2009 – 64 comments

7 Security Tips

Security is important! Here I show seven different security flaws which are common to Rails applications ranging from mass assignment to CSRF protection. (14 minutes)
Restricting Access
Episode #20 – Apr 18, 2007 – 53 comments

Restricting Access

In this second part of the series on administration, you will learn how to lock down the site to keep the public from accessing the administration features. (4 minutes)