View Single Post

   
  #4 (permalink)  
Old 02-28-2008, 10:50 AM
Peter H. Coffin
 
Posts: n/a
Default Re: database programming security

On 15 May 2007 17:51:54 -0700, kwan wrote:
> On May 15, 7:26 pm, gordonb.9t...@burditt.org (Gordon Burditt) wrote:
>> >This question has come up numerous times in my career, and I was
>> >hoping some of you out there might have some additional insight.
>> >Essentially, where should the username and password for a database be
>> >kept for an external program that accesses it?

[..]
>> A password file kept out of the web server's document root is pretty
>> good on a non-shared web server against web threats. Now, can
>> people actually log in (not via web server) to that host? That's
>> another threat. How about FTP?
>>
>> If it's a shared web server, you have the problem that other people's
>> PHP (or Perl or Ruby or whatever) scripts can read the password
>> just like your PHP scripts.

>
> Put your password in secure place and do use encryption, disable all
> the services that seem to be no used. call your file from other
> directory that has your password and user in.


Additionally, make a whole lot of user IDs and passwords. Sort out
privileges of those IDs according to reasonable function, and be as
paranoid about it as you can be. There's no reason, for example, that
a web script needs to READ a credit card number from a table. That can
happen from a different process running elsewhere away from the web
space, under an ID that does have authority to select from the the table
in question.

--
8. After I kidnap the beautiful princess, we will be married immediately in a
quiet civil ceremony, not a lavish spectacle in three weeks' time during
which the final phase of my plan will be carried out.
--Peter Anspach's list of things to do as an Evil Overlord
Reply With Quote