I've been thinking about how to architect an infrastructure for one of our business applications with the following requirement:
- Data written by some user can only be read by that user and his superior and a 3rd person yet to be defined
I'm thinking in using some sort of asymmetric algorithm, such as RSA for data encryption.
We can generate a public-private key pair for each user and store the public key of each one openly on a database, but how should we handle the private key ?
If we just let the users manage their private key one day we will have a big headache if one of them loses his key.
If the private key becomes public somehow then the data would become public too, rendering the architecture invalid.
Our infrastructure is heavily Microsoft-oriented: All applications are ASP.Net MVC3, our dabatase is SQL Server 2005 and we use Active Directory for user authentication and basic data, such as e-mail/phone number.
How would you guys architect a solution to solve this problem ?
Bottom-line: This is not a banking or financial application, it's some kind of 360-degree personal feedback system.
EDIT: Adding more requirements, hoping to make it more clear:
- This database will be in production environment, where developers don't have access;
- When the database is restored, developers should not be able to recover the data;
- The DBA should not be able to view the data by SELECT'ing the rows on the tables;
EDIT 2: Bounty info. Bounty went to the answer with more upvotes, although my personal feel is that none of the answers provided addressed the question correctly. For this reason, I'm granting the bounty but not marking the answer as correct.