I am presented with the following scenario:
I have a MySQL-Database with a table of users. The table has two fields:
password. The password is stored as an unsalted hash.
An over 15 year old application uses this database to authenticate access to its services. It is only accessible internally.
Our team is tasked to modernize these services by offering a new application following best practices and lessons learned of the last 15 years (and potentially more that were ignored in the original application). This application shall be accessible from the wide open internet.
We are supposed to reuse the current database for authentication purposes to allow both applications to run in parallel on the underlying same authentication database.
I voiced several concerns regarding security as this application is about handling personal details of my coworkers and me.
We decided that part of our modernization is that password policies are put in place and that passwords are stored both salted and peppered.
This means our database table would get a third field
salt and the
password field now stores our salted and peppered hash.
The problem here is that this will break the authentication in our old application. As the code is very much legacy and we don't even have a working compiler for it anymore changing the code of the original application is out of question.
My question therefore is:
- Is there a secure way to add salt (and pepper) to our authentication database while maintaining the old application's ability to authenticate users? Keep in mind that while the old application is inherently insecure it will not be accessible outside of our intranet, the new application however will be.