We have a Word VBA application that is installed in over a 1000 computers and users use it on a daily basis. This VBA addin connects to multiple databases whose credentials are stored in a custom xml file we came up with. Our company now doesn't want to store the password in the xml file as clear text because when the application is installed on a user's machine, the xml file is also pushed to the installation folder as part of the installation and a curious user who digs into the xml can actually find the passwords to databases. They want a security feature implemented in a week, without making wholesale code changes, that will prevent users and QAs/prod support people testing the application from seeing these passwords. Since the timeframe is very limited, I came up with this idea:
- Having substitute strings in the xml file as a password place holder.(example below)
- Have a dictionary in the application itself that maps these values to the actual password.
- Password-protect the file that has the actual application code.
Sample Xml referred to in point 1.
<Database-Passwords>
<DB-Name>DB1</DB-Name>
<Username>Username1</Username>
<Password>FakePassword1</Password>
</Database-Passwords>
Maintain a list of key value pairs in the application code which will have (FakePasword1, RealPassword1)
as key value pairs.
This will prevent the users from knowing the password. But QAs and Prod Support who step through the code and debug the application can still identify the passwords. How could this be overcome? Is there a way to secure the passwords in such a way that the application would seemlessly work with minimal code change, but users/QAs won't be able to crack the password?