# Consent: a firewall DSL for ActionController

**URL:** <https://www.ruby-forum.com/t/consent-a-firewall-dsl-for-actioncontroller/156837>\
**Category:** Ruby\
**Created:** [January 3, 2009, 9:39pm UTC](https://www.ruby-forum.com/t/consent-a-firewall-dsl-for-actioncontroller/156837 "2009-01-03T21:39:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![james-calivar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Post date:** [January 3, 2009, 9:39pm UTC](https://www.ruby-forum.com/t/consent-a-firewall-dsl-for-actioncontroller/156837/1 "2009-01-03T21:39:23Z")

</div>

Hey all,

In response to some ideas from a friend, I’ve hacked up Consent, a  
plugin that provides pre-filtering of incoming requests using a  
concise DSL:

> **[GitHub - jcoglan/consent: Access control layer for ActionPack, providing a...](https://github.com/jcoglan/consent)**
>
> Access control layer for ActionPack, providing a DSL for writing a firewall to sit in front of Rails controllers - GitHub - jcoglan/consent: Access control layer for ActionPack, providing a DSL for...

It lets you specify rules that tell your app whether to accept an  
incoming request, redirect or render a 403. If the request is  
rejected, it never hits your controllers; Consent factors all your  
access control logic into a single file that acts as an intermediary  
between your routes and your controllers.

I’ve only been working on it a couple of afternoons but it’s  
reasonably tested and documented to the point where it might be useful  
to others and open to feedback. Let me know if you try it out, and if  
any of it seems in need of improvement.
