Closed nrser closed 5 years ago
Yes, it is a todo item to change the file permissions. Currently our operations team does that automatically for us. If anyone wants to submit a pull request to change the permission directly within the ruby code it would be gladly accepted.
These are some of the notes I have, but they need to be double checked:
# Re-secure files after key rotation:
chmod 500 /etc/symmetric-encryption
chmod 400 /etc/symmetric-encryption/ *
chown <owner>:< group> -R /etc/symmetric-encryption
One other item, there is a todo in the source code, to throw an exception if the files are globally accessible, or just to automatically fix the file permission when the application reads the file on startup.
Hi, I've submitted a PR to address this issue. Here are some of my assumptions:
Am I making any wrong assumptions or missing something? Thanks in advance!
Thank you @nesteves for the pull request
Environment
Provide at least:
2.3.6
4.0.1
SymEnc CLI
N/A
Expected Behavior
I would not expect generated private key files to be world readable.
I would kind of expect the program to refuse to even deal with world-readable files and directories.
Actual Behavior
These are the actual private keys, right?
I know the next line in the guide suggests changing the file permissions, but I'm wondering why a security program would want to ever create world-readable private key files?
symmetric-encryption --generate ...
was totally fine creating world-readable key files in a world-readable/etc/symmetric-encryption
. This feels really weird to me...