Secure SQL Login Info
Hi,
I am currently working on a program that will connect MySQL database using MyOLEDB Driver. I used
Dim fdConAs
New
OleDb.OleDbConnection("Provider=MySQLProv;Data
Source=DATABASE;User Id=USERNAME;Password=PASSWORD;")
I am wondering is it secure to hard-code the username and password? If not, how could I secure these info?
Thanks in advance!
[595 byte] By [
WonWon] at [2007-12-24]
No, it is not secure... Ideally you should prompt the user for these the first time your application loads and then store it using DPAPI. If you search around you'll find a few DPAPI libraries for .NET. Also, have a look at the Configuration Management Application Block/Enterprise Library which supports encrypted configuration.