Reputation: 21440
Here are my connections strings:
<connectionStrings>
<add name="ArticleDbContext" connectionString="Data Source=|DataDirectory|MyBlog.sdf" providerName="System.Data.SqlServerCe.4.0" />
<add name="BlogDbContext" connectionString="Data Source=|DataDirectory|MyBlog.sdf" providerName="System.Data.SqlServerCe.4.0" />
<add name="CompanyDbContext" connectionString="Data Source=|DataDirectory|MyBlog.sdf" providerName="System.Data.SqlServerCe.4.0" />
<add name="UserProfileDbContext" connectionString="Data Source=|DataDirectory|MyBlog.sdf" providerName="System.Data.SqlServerCe.4.0" />
<add name="ApplicationServices" connectionString="Data Source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb1.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>
I was reading this http://msdn.microsoft.com/en-us/library/ms181873(v=vs.90).aspx on Considerations for Implementing Applications.
I believe I should put passwords on these and then encrypt. Is that correct, and how do I do it after the fact? Is there any concern with putting passwords in my web.config file? I read something about decompilers being able to read your passwords... Is this a real threat? What can I do to secure this app?
Upvotes: 3
Views: 361
Reputation: 35925
You should always encrypt sensitive information stored in a config file. You can do it programmaticaly or via aspnet_regiis
(see docs for more details).
Because people can download a web.config file in plain text through different vulnerabilities and then they can read all the connection strings, user names, passwords etc.
Possible attack list:
Upvotes: 3
Reputation: 7148
Probably not. The passwords in a web.config file usually expose authentication details for connecting to remote SQL servers (or other database). This is the sort of thing you'd want to protect.
Your database files are of the file variety (stored locally ) and your SQL Express database is accessible using integrated security, so I'd say that you're okay to leave thing as you are.
Upvotes: 1