My group at work is testing discourse. There have been concerns raised about the requirement in the yml file for a typed password to access an smtp server. How secure is this? Is there an alternative in which the stmp password is stored in an encrypted way?
AI 生成的摘要
Hiding or Encrypting SMTP Password Required in app.yml
A discussion is raised about the security of storing an SMTP password in plaintext in the app.yml file. tmelano expresses concerns about the security of this approach.
Falco suggests allowing passwordless connections from specific IPs, while pfaffman and fefrei point out that the password must be accessible to the server and that encrypting it would still require a decryption method.
elijah proposes a solution using an encryption key stored in a shared memory location, supplied by a human at boot time. However, david and elijah acknowledge that this approach is not 100% secure, as a root user could still access the memory location, but it would require more effort and wouldn’t be accessible through backups.
You can make your SMTP server allow connections without password, and check for a IP white list, for example.
It’s available only to people with root access to the server. If you don’t trust people who have root access to your server, then you have more profound problems than worrying about whether they have access to an SMTP password.
Also, this cannot be fixed: Discourse needs the password to provide it to the SMTP server – so no matter how you store it, there must be a way to read it. (This is similar to how web servers need the private key to their SSL certificate.)
if it is encrypted, how would Discourse decrypt it?
I’ve seen this solved. But the solution is ugly (in the sense that I wouldn’t recommend it for a standard install).
The trick: encryption key in a shared memory location, supplied at boot time by a human.
This was the recommended way to use a credit card number storage tool I worked with a few years ago.
But if it’s in memory, surely a root user could still get access to it. (Granted it’s significantly more effort, but still)
Yes. It’s not 100% secure, but it is also not something you could find with access to the backups.