Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Database Password best practices
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
S. Robert James  
View profile  
 More options May 20, 9:27 pm
From: "S. Robert James" <srobertja...@gmail.com>
Date: Wed, 20 May 2009 18:27:43 -0700 (PDT)
Local: Wed, May 20 2009 9:27 pm
Subject: Database Password best practices
We have our cap deploy setup to take a new app server from zero to
working, all automatically.

One issue we're getting stuck with is: Where to store the database
password?

I'll show you what we thought of, and why we don't like it.  I'm sure
some of the pros here have already grappled with this, so I'd like to
here what you say.

1. Store in cap deploy files.
PROBLEM: We don't want every developer who ever had access to cap
deploy source to know the passwords.

2. Store in file on each server.
PROBLEM: This would require manual setup of a new server.
PROBLEM: Even if we accept to do it manually, in the course of doing
so, it's quite likely that the password will get emailed around.
"Anyone remember the pw to setup a new server? The box is down and I
need to do a replacement quick."

3. Use a nonpassword system
Windows supports authentication via user account on a known machine.
I'm not sure how it works, or how secure it is.  Haven't found any
simple, secure way to do this via Linux.  The ideal would be to tell
the database server "If user rails_app on any of the local machines
wants to connect, they don't need a password."   But I'm not sure if
there is a simple and secure way to do this.

4. Use some type of encryption
I'm not sure how to use this to solve problems.  The key needs to go
somewhere, and so we're back to square one, on where to store the key.

What do you do? Is there a best practice? What do the large
enterprise / J2EE shops do?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glenn Rempe  
View profile  
 More options May 20, 10:42 pm
From: Glenn Rempe <gl...@rempe.us>
Date: Wed, 20 May 2009 19:42:11 -0700 (PDT)
Local: Wed, May 20 2009 10:42 pm
Subject: Re: Database Password best practices
You might take a look at the Thoughtbot Suspenders template Rails
app.  It contains a deploy.rb that prompts you for a db password when
you run cap deploy:setup and stores that password in a shared file on
the remote DB server.

http://bit.ly/QcrOl

The database.yml file is then setup to pull the password from this
shared file:

http://bit.ly/svm27

The primary benefit here being that you don't store the password in
your SCM.

Glenn

On May 20, 6:27 pm, "S. Robert James" <srobertja...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Carletti  
View profile  
 More options May 21, 2:48 am
From: Simone Carletti <wep...@gmail.com>
Date: Thu, 21 May 2009 08:48:54 +0200
Local: Thurs, May 21 2009 2:48 am
Subject: Re: [Capistrano] Re: Database Password best practices

I created a standalone recipe months ago.
You can grab it from gist, save the file in your lib folder and load it from
deploy.rb.
http://gist.github.com/2769

It provides a couple of additional options.

-- Simone

--
Simone Carletti

Site & Blog: http://www.simonecarletti.com
Email: wep...@weppos.net
LinkedIn: http://linkedin.com/in/weppos
Nick: weppos | Skype: weppos


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile  
 More options May 21, 5:15 am
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Thu, 21 May 2009 10:15:30 +0100
Local: Thurs, May 21 2009 5:15 am
Subject: Re: [Capistrano] Re: Database Password best practices

Or,
You can condigure passwordless access (tricky?) from the local machine only

GRANT select,delete,update, (anything else you need) ON `` TO
`railsuser`@localhost;
FLUSH PRIVILEGES;

(by excluding the IDENTIFIED BY 'passwd' it should be a passwordless
account)

I'm not condoning this practice, work with it in line with your company's
policy on security & passwords!

- Lee

2009/5/21 Simone Carletti <wep...@gmail.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donovan Bray  
View profile  
 More options May 21, 10:38 am
From: Donovan Bray <donno...@gmail.com>
Date: Thu, 21 May 2009 07:38:16 -0700
Local: Thurs, May 21 2009 10:38 am
Subject: Re: [Capistrano] Database Password best practices
We use a file that's ignored by the scm and we check a template with  
bogus passwords into our deploy scripts. This let's developers use the  
deploy scripts to setup their own environments without divulging  
production env secrets.  Ops maintains the official secrets file and  
it's kept in a central location that only ops has access to.

On May 20, 2009, at 6:27 PM, "S. Robert James"  


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
S. Robert James  
View profile  
 More options May 21, 11:34 am
From: "S. Robert James" <srobertja...@gmail.com>
Date: Thu, 21 May 2009 08:34:15 -0700 (PDT)
Local: Thurs, May 21 2009 11:34 am
Subject: Re: Database Password best practices
On May 21, 10:38 am, Donovan Bray <donno...@gmail.com> wrote:

> We use a file that's ignored by the scm and we check a template with  
> bogus passwords into our deploy scripts. This let's developers use the  
> deploy scripts to setup their own environments without divulging  
> production env secrets.  Ops maintains the official secrets file and  
> it's kept in a central location that only ops has access to.

How does the app get access to it? Is it NFS mountable in a known
location, or do ops manually copy it locally?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donovan Bray  
View profile  
 More options May 21, 8:50 pm
From: Donovan Bray <donno...@gmail.com>
Date: Thu, 21 May 2009 17:50:16 -0700
Local: Thurs, May 21 2009 8:50 pm
Subject: Re: [Capistrano] Re: Database Password best practices
The file is kept with the deploy scripts and tasks reference the  
variables kept in the secrets file.  For example we have a task that  
generates the database.yml based on an erb template and copies it out  
to the deploy location.  The only place that username password exist  
on the remote server is in the generated database.yml.  The only place  
that username and password exist in the deploy scripts is the secrets  
file which is gitignored and only a sample checked in.

On May 21, 2009, at 8:34 AM, "S. Robert James"  


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google