Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.Net SQL Server Connection String - hide password from other developers

We're migrating one of our sites to ASP.Net. We do not want to use integrated security, which uses the windows account to connect to sql server (not going to get into why, its just out of the question). We created a username and password to connect to SQL Server, and would like to use that username and password, however, we also do not want other developers to see this information (easily read from the web.config).... I know it can be encrypted, but it can just as easily be decrypted by the developers - plus encryption has a performance hit.

Is there any solution to this problem?

like image 481
Chris Klepeis Avatar asked Jun 01 '10 21:06

Chris Klepeis


1 Answers

here's a good tutorial on Encrypting Configuration Information in ASP.NET 2.0 Applications

Just don't give the other developers the key

Alternatively, you can lock down the authentication for SQL via installed certificates. This way you are setting security based on the client not the user. http://msdn.microsoft.com/en-us/library/ff649255.aspx

Our standard practice is to have one "Developer Login" used in the development database that has limited access and have a different username/password for the production box. Developers do not have access to the production box, only the lead developers, and then the production web.config is copied over via the deployment script.

like image 176
Glennular Avatar answered Oct 18 '22 10:10

Glennular