# Admin authentication

**URL:** <https://www.ruby-forum.com/t/admin-authentication/92112>\
**Category:** Rails\
**Created:** [April 16, 2007, 9:52am UTC](https://www.ruby-forum.com/t/admin-authentication/92112 "2007-04-16T09:52:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rajo](https://www.ruby-forum.com/u/rajo)\
**Post date:** [April 16, 2007, 9:52am UTC](https://www.ruby-forum.com/t/admin-authentication/92112/1 "2007-04-16T09:52:14Z")

</div>

Hello, I was wondering if anyone could point me in the right direction  
in getting very simple admin authentication functionality in a protected  
back end, either as a method or plug-in. I am making a product catalog  
which needs to have just one admin user to be able to log in with a  
username and password to access the main CRUD.

I have tried acts\_as\_authenticated and the simple http authentication  
plugins but they seem to be overkill or not entirely safe (AAA seems  
more for a large number of users with no admin functionality and the  
http authentication plugin seemed to only be for temporary testing, and  
would not be totally secure without inclusion of SSL).

I’m sure this problem comes up quite a bit, the only method I could  
think of so far would be to hard code a admin username and password into  
a model and then use before filters on the appropriate controllers but  
this also seems unsafe and maybe bad practice. Thanks for anyone’s help  
in advance and please excuse my “newbie-ness”.

---

<div class="post-metadata">

**Author:** ![rajo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rajo](https://www.ruby-forum.com/u/rajo)\
**Post date:** [April 16, 2007, 9:55am UTC](https://www.ruby-forum.com/t/admin-authentication/92112/2 "2007-04-16T09:55:25Z")

</div>

one more thing, another reason AAA didn’t seem viable was because it  
seemed to allow anyone to sign up for an account, maybe I’m wrong  
though.
