mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
[PR #467] [CLOSED] openssl: do not use -out when generating private keys #845
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dehydrated-io/dehydrated/pull/467
Author: @intelfx
Created: 1/20/2018
Status: ❌ Closed
Base:
master← Head:genrsa-fix-acls📝 Commits (1)
55256beopenssl: do not use -out when generating private keys📊 Changes
1 file changed (+21 additions, -5 deletions)
View changed files
📝
dehydrated(+21 -5)📄 Description
openssl genrsaandopenssl ecparam -genkeytend to chmod the outputfile to make the private key unreadable by group and others. This breaks
a workflow where admin uses POSIX ACLs to manage keys' access rights,
because POSIX ACLs reuse group permissions for the "ACL mask", hence
forcing group permissions to 0 with plain chmod() masks away all
extended ACLs.
By redirecting genrsa output from stdout we avoid this behavior while
staying secure even if ACLs are not used because we explicitly set
umask 077in the beginning of the script.Example of the broken behavior:
Here I run dehydrated as
letsencrypt:letsencryptand use grouphttp-certfor all applications that need access to the certificates and the private key. The output directory is modified as follows:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.