This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.1 » Encoded DB access information
Encoded DB access information [message #63023] Mon, 13 October 2008 23:02 Go to next message
demc  is currently offline demc
Messages: 8
Registered: December 2006
Junior Member
Hi guys,

so I'm working on project which will be deployed to customer's inhouse server. Since there are some security requirements I'm going to encode all phps with nusphere php encoder. But the problem is that DB access information is placed in .yml which can not be encoded.

I'm using symf1.1 + doctrine which offers event listeners. So I was wondering if anyone knows if there is a chance to decode DB U/P taken from databases.yml (or cache) in preConnect() event?

Any other suggestion on how to encode DB u/p will be really appreciated.

thank you in advance
SOLVED: Encoded DB access information [message #63024 is a reply to message #63023 ] Tue, 14 October 2008 00:15 Go to previous message
demc  is currently offline demc
Messages: 8
Registered: December 2006
Junior Member
It was easy.

  1. encode every php with php encoder
  2. include secret encode key in ProjectConfiguration.class.php
  3. include decode method in some project class
  4. put encoded username/pass in database.yml
  5. create doctrine preConnect event listener which decrypts u/p and feeds them in doctrine connection object


It's not 100% but better than plain text file.
Previous Topic:sfPropelPager with I18n
Next Topic:1.1 Remote form
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software