Nowadays, many applications require sensitive information about their users to work properly. Users want to be sure that their data cannot be stolen or leaked and it is the job of the programmer to ensure that their data is stored securely. The task for this week’s laboratory work is to configure a MongoDB database so that it can store sensitive data securely. You will need to pre-populate a MongoDB database with some data. Some of the data you will keep in the database should be considered sensitive (e.g. a user’s email), hence needs to be encrypted via 2-way encryption. After populating and securing the database, create an app that would be able to access the database and output on screen the decrypted version of the data stored.
- Create a MongoDB database which would contain some secured sensitive data (protected via 2-way encryption);
- Create an application which would display the data contained in the database (both common data and the decrypted sensitive data);
- Make sure that the sensitive data can only be accessed via your application (i.e. it is secure).