0

This isn't really language specific, but I'm wondering if anyone has any suggestions for a security model securely storing some user details in a way that could be accessed in an automated fashion.

i.e. I want to be able to send users automated emails when certain events happen but I don't want to store that email address or the event description in plain text.

If it wasn't an automated system then I would use some of the users credentials to salt the encryption but as it is, the application needs to be able to access it in some way but not an "intruder".

A solution can involve a second server instance (or separate physical server) but I still see myself presented with the same problems.

migrated from stackoverflow.com Feb 3 '14 at 20:48

This question came from our site for professional and enthusiast programmers.

  • What programming language/platform are you targeting? – Rowland Shaw Jan 26 '14 at 17:25
  • MY language of choice would probably be python, but could easily be perl or php. – t0mmyt Jan 26 '14 at 17:28
  • So the server needs to be able to decrypt it, but not anyone starting some application on that server? I see your trouble there. You could make it hard, but if the intruder has access to raw memory... – Wrikken Jan 30 '14 at 19:42
  • I think if the intruder had access to raw memory then it's too late! I'm more worried about somebody running arbitrary code through an exploit though a non-root user so in that case memory shouldn't be a problem. I guess the best I can do is keep the decryption key in a root owned 0600 file and pass the value to the script that started the server process. The only process that should be listening for anything as root would bee sshd and if that gets exploited (again) then we're all screwed. – t0mmyt Feb 3 '14 at 16:41
1

To make a system like this work you're going to need to either store the users e-mail in plain text somewhere, or store it in encrypted format and then store the key for that in plain text somewhere.

It's inescapable that in an automated system sometimes somewhere the server has to be able to decrypt the data and send it.

If you're interested in "high security" options, you could look at storing the users information in encrypted format on disk and then make use of an HSM to handle the decryption in a more secure manner than just having the key on disk.

0

The preferable model is that all the users have a public (and private) key pair. The automation server has the public key for each user and encrypts a message with the user's public key. When the user receives the message, they decrypt it with their private key.

However, no one has been able to force their users to have public keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.