I've joined a small company which essentially sell one web application. The data in the web app is very sensitive, to the point where all of the data is field level encrypted. App is written in ASP.NET Web API 2(C#), with a html/javascript front and SQL-Server back.
At the moment, they have around 50 clients, and the architecture of the app is that each client gets their own database. They are all deployed into their own IIS virtual directory, which then points to its own DB. The code is exactly the same among all clients.
The owner has told me that this was all by design for security. However, it is an absolute pain to manage, and they are only ever getting more clients.
I've suggested combining it all into one DB, and adding a field on the main table which identifies which client the data belongs to. From here I can filter/join on that field.
The owner does not like this as it introduces a risk: if there is shoddy code, one client may be able to see another clients data. This obviously can't happen with multiple databases, as the connection string won't cross to a different DB.
Is there any possible way to de-risk this? I suggested overriding the authorize class to stop unauthorized users accessing info, but this doesn't solve the whole 'bad code' problem.
Is there anything I can do, or am I stuck maintaining a whole heap of databases?