Forum: Ruby on Rails DB Connections with hardcoded database.yml username? How do

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
dbaman (Guest)
on 2007-05-17 18:10
(Received via mailing list)
I'm a bit (OK..a lot) confused about the way Rails establishes a DB
connection with the login/passwd that is hardcoded in database.yml,
even in production mode.

I'm using Rails to develop internal, inward-facing apps for my
company, rather than an external, outward-facing public
web site.

Once an end-user of my app authenticates w/ his login and passwd, I
want him to connect to the database with *his* login, rather than some
generic database.yml login that everyone uses.  Different users have
different DB privileges, and diagnosing back-end DB issues is easier
when I am seeing unique logins rather than a generic one.  (I'm a
DBA).

I can certainly understand that, for a public web site, with
potentially hundreds or thousands of users, you don't want each user
to have an official OS-level login that they can connect to the DB
with.  But in my case, each of my several dozen users already has an
OS-level login.  I use DB2, and its logins are based on those in the
OS.

Am I missing something here?  Can Rails be influenced to conect to the
DB in this way?

Any help appreciated.

aj
This topic is locked and can not be replied to.