puppet-openvpn
puppet-openvpn copied to clipboard
Fix of deprecation warning
Pull Request (PR) description
Fix of deprecation warning:
Warning: The source_permissions parameter is deprecated. Explicitly set owner, group, and mode.
(file: .../manifests/ca.pp, line: 127)
This Pull Request (PR) fixes the following issues
Replaced: source_permissions => 'use', With: owner => 'root', mode => '0755',
This is tested on puppet-agent 5.5.7-1 on Ubuntu Xenial, puppetserver 5.3.6-1 Ubuntu Xenial.
There is a bunch of failing tests because proposed code is not idempotent.
@Dan33l Do you know why though? Does the service automatically chmod some files when it starts or something?
@Dan33l Do you know why though? Does the service automatically chmod some files when it starts or something?
@alexjfisher This PR force mode => '0755', and the client key is created by easyrsa with mode 0600 and changed during the second run to 0755.
More than idempotency issue, it is safe that a private key use mode 0600 and not 0755.
@amorphina are you yet interested by this PR ?
@Dan33l I am still interested by it. Can we create a separate file resource to manage the keys directory, something like:
file { "${etc_directory}/openvpn/${name}/easy-rsa/keys" :
ensure => directory,
mode => '0600',
}
This way we will change the mode for all files/dirs to 755 without the keys directory.
Also by default puppet pushes the mode for directories from 6(rw) to 7(rwx), thus the directory ${etc_directory}/openvpn/${name}/easy-rsa/keys will automatically be set to 700, while the files inside it should remain with 600.
The source_permissions parameter will be undeprecated :
https://tickets.puppetlabs.com/browse/PUP-10253
The
source_permissionsparameter will be undeprecated : https://tickets.puppetlabs.com/browse/PUP-10253
Has that been agreed?
Since status is ACCEPTED, i supposed yes.
And also the comment on ticket i opened : https://tickets.puppetlabs.com/browse/PUP-9332?focusedCommentId=724011&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-724011