
Security Basics mailing list archives
Re: script credentials
From: Ansgar Wiechers <bugtraq () planetcobalt net>
Date: Fri, 19 Feb 2010 22:12:36 +0100
On 2010-02-19 Bryce Verdier wrote:
So I've been writing a Perl script for my job. The script will be run from a cron job (interval not yet set) and deposit some information to a database. The database has a user with minimal rights to insert data. So my question is with regards to how should the database user credentials be kept. So far the discussion has had three options: 1) credentials within the script 2) command line 3) config file Each one has their own advantages & disadvantages but I would like to get the opinion of the community as to which one gets the label of "best practices".
If by "command line" you mean "as a command line argument": that's out of the question, as it would expose the password to tools like ps. The other two options are more or less equivalent, although personally I'd prefer to put credentials into a config file. That way you have the configuration separated from the code, which is a cleaner design (IMHO), and it also allows you to hand out your script without exposing credentials. Regards Ansgar Wiechers -- "All vulnerabilities deserve a public fear period prior to patches becoming available." --Jason Coombs on Bugtraq ------------------------------------------------------------------------ Securing Apache Web Server with thawte Digital Certificate In this guide we examine the importance of Apache-SSL and who needs an SSL certificate. We look at how SSL works, how it benefits your company and how your customers can tell if a site is secure. You will find out how to test, purchase, install and use a thawte Digital Certificate on your Apache web server. Throughout, best practices for set-up are highlighted to help you ensure efficient ongoing management of your encryption keys and digital certificates. http://www.dinclinx.com/Redirect.aspx?36;4175;25;1371;0;5;946;e13b6be442f727d1 ------------------------------------------------------------------------
Current thread:
- script credentials Bryce Verdier (Feb 19)
- Re: script credentials Ansgar Wiechers (Feb 19)