|
|
|
|
|
by _8j50
2955 days ago
|
|
A few concerns I have... 1) The logs are not sent encrypted, this exposes them for every smtp server and mitm party between unencrypted hops 2) you have to save a plain text version of your log mailer's smtp password to disk 3) Monitoring by email sucks and future compromise of any recipients' inbox exposes all historical logs I have written something similar in the past as well and seen email monitoring in real world scenarios. You're not doing it "wrong" per se ,but I think modern protocols allow better solutions. For instance,you can POST the logs to a server(ec2 instance or DO droplet) over TLS, have it generate a link and email that link. You can then control link expiry and encrypt the logs so that they are decrypted in-browser via Webcrypto. You can also do some sort of push monitoring(in addition to sending the link via email) by the server which lets you avoid the whole "email messages can be stuck on an smtp hop for 24-48 hours" and having to monitor for NDR's before resending the logs. |
|
2) How else should I store it? Should I encrypt the json file with a master key?
3) This is correct but I just wanted a quick way to do it :) Thanks for the concerns.