Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SSL cert and key permissions #119

Merged
merged 2 commits into from
Sep 6, 2013
Merged

Fix SSL cert and key permissions #119

merged 2 commits into from
Sep 6, 2013

Conversation

tombooth
Copy link
Contributor

It is bad practice to use 644 on a private key so we
have migrated the key mode to 0400. The cert is already
avaliable publicly through nginx so we have allowed it
0444.

Nothing should need to write either the cert of the key
after puppet has run, so we have denied any writing.

It is bad practice to use 644 on a private key so we
have migrated the key mode to 0400. The cert is already
avaliable publicly through nginx so we have allowed it
0444.

Nothing should need to write either the cert of the key
after puppet has run, so we have denied any writing.
@abraham1901
Copy link
Contributor

Hello
Thanks for you work.
Yes, read for other isn't good.
But read only user - sometime is trouble, when private key used other application.
0440 - good.

@dcarley
Copy link

dcarley commented Aug 22, 2013

I'm not sure there's any benefit to using 0440 when the default group is "root". Other UID==0 processes will be able to read the file anyway. I'd venture that anything UID>0 and not Nginx should probably have it's own copy outside of Nginx's config dir.

@abraham1901
Copy link
Contributor

You can change group for private key.

@jfryman
Copy link
Contributor

jfryman commented Aug 22, 2013

@dcarley let's go with 0440 in order to potentially avoid any breakage for folks that use group permissions on this file.

@tombooth
Copy link
Contributor Author

I've push a commit to allow the key's group permission to read the file

@jfryman
Copy link
Contributor

jfryman commented Sep 6, 2013

🤘

jfryman pushed a commit that referenced this pull request Sep 6, 2013
Fix SSL cert and key permissions
@jfryman jfryman merged commit 30d6224 into voxpupuli:master Sep 6, 2013
@ghost
Copy link

ghost commented Apr 28, 2014

Is there a way for this module to have parameters like ssl_owner and/or ssl_mode?

I see you've settled on www-data 400... but in my humble opinion, perms on private key must be root - 0400. This is just in case you server gets compromised somehow (i.e.: php shell); it is then not possible for any of your nginx processes to retrieve your private keys. This way, broken code somewhere in your application won't mean an attacker can decrypt your communications... or have you regenerate your expensive certs.

Cheers!

cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants