Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is encrypting web.config pointless?

I was reading a blog today (http://somewebguy.wordpress.com/2009/07/20/is-encrypting-your-web-config-a-waste-of-time/) about both how to encrypt your appsettings/connectionstrings etc. using the aspnet_regiis tool.

He has a follow up post with some feedback from others saying this is a waste of time.

My question is, what do you think? Are you totally hosed as soon as anyone gets physical access to your web.config files anyway? Or is this a worthwhile precaution?

like image 434
Kieran Benton Avatar asked Dec 14 '22 03:12

Kieran Benton


2 Answers

I don't think it is pointless. If someone does gain access to your web server, yes you are in a lot of trouble. Does that mean that you need to allow them to gain that same access to your database/middle-tier/application server as well?

like image 176
Andrew Hare Avatar answered Dec 16 '22 18:12

Andrew Hare


You are only as strong as your weakest part. Any measures you can take to improve security are a good thing, although this is not something i do.

I share the view that if people have got access to your web.configs, youve probably got worse issues to worry about.

I always make sure any db usernames/passwords stored within have datareader/datawriter ONLY on the site's database.

One thing you can do is have them encrypted as part of your deploy, using a build tool such as MSBuild, NAnt, Rake etc. this way its not so much of an effort and therefore more likely to be accepted by your team

like image 27
Andrew Bullock Avatar answered Dec 16 '22 16:12

Andrew Bullock