Just a general architecture question.
I know that for websites you can use the functions built into IIS to encrypt the connection string section. However, I'm not sure what it is ... If I do this and then copy the web.config file to another project, will the new project decrypt the string of connection strings in the configuration file?
Where this becomes a problem is access to a production database. We do not want anyone to be able to copy the configuration file from production to their project and have access to the blank check in the production database.
My company is currently doing this to save the encrypted connection string in the server registry, and then use a makeshift tool to read the registry and decrypt the value on the fly. This prevents someone from simply looking at the registry or web configuration to see the connection string.
Also, for wide client applications (WinForms, WPF, etc.) this may be a little more problematic because once again I am not sure if the IIS trick will work since the applications will not work in IIS. We currently have a kludgy solution for this, which is related to the same home application, but reading the encrypted string from the binary and decrypting on the fly.
This seems to be very encrypted and we are looking for the best way to do this (e.g. industry standard, current technologies, etc.).
So, a more general question is ...
What approaches did you use to protect your connection strings? Especially when it comes to access to several types of applications, encryption, etc.
security architecture encryption config
Dashtechnical
source share