dbaman
2007-May-17 14:09 UTC
DB Connections with hardcoded database.yml username? How do I connect as actual user?
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---