Password protecting access to script/console?

Sorry if this is asked and answered before, is there away to password
protected access to script/console ?

I’ve seen a few posts on how to protect/encrypt the db passwords in
database.yml, but that still leaves unprotected access to pretty much
the same data via the console.

On Fri, 2007-03-09 at 02:39 +0100, Erik wrote:

Sorry if this is asked and answered before, is there away to password
protected access to script/console ?

I’ve seen a few posts on how to protect/encrypt the db passwords in
database.yml, but that still leaves unprotected access to pretty much
the same data via the console.


I put the rails_root directory in user space which would mean that you
would have to log on as the user to access the console for a particular
rails application.

Craig

Craig’s solution is best – you can’t really password protect script/
console. Even if you restrict access there, you’ll need to worry
about people who require your RAILS_ROOT/config/environment.rb into
their scripts because that’ll give them access to all your models from
within their scripts.

If you really wanted to password protect the whole thing, you’ll need
to setup some sort of scheme whereby your webserver passes in a key or
something to your rails app on boot. This same key would need to be
provided by script/console and whatever other scripts you have.

All-in-all a huge headache. I’d go with Craig’s solution.

Eden Li wrote:

Craig’s solution is best – you can’t really password protect script/
console. Even if you restrict access there, you’ll need to worry
about people who require your RAILS_ROOT/config/environment.rb into
their scripts because that’ll give them access to all your models from
within their scripts.

All-in-all a huge headache. I’d go with Craig’s solution.

It is a bit of headache, thanks for your answers

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs