I am building rest APIs for an application in node.js, where user needs to upload their server details like, HostName UserName PrivateKey
Once the user uploads all the details I am retrieving permissions from the server and display them in table format.
I don't want the user to upload the same server details again and again, so how do I store the private key and other server details securely in MongoDB database.
What kind of encryption techniques should I use? I want to achieve this in node.js.