-
-
Notifications
You must be signed in to change notification settings - Fork 197
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 client cert revoke error with easyrsa 3.0 #338
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ | |
apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true) | ||
apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true) | ||
end | ||
|
||
it 'creates openvpn client certificate idempotently' do | ||
pp = %( | ||
openvpn::server { 'test_openvpn_server': | ||
|
@@ -56,7 +57,18 @@ | |
remote_host => $facts['networking']['ip'], | ||
tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA', | ||
} | ||
) | ||
|
||
openvpn::client { 'vpnclientb' : | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the moment the test is failing because the revoke process is not idempotent. So you did a good test. It cached idempotency issue. Great ! It is not idempotent because during the second run some modifications are done:
And so the puppet code of revoke needs an update to become idempotent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The permission change comes from here: https://github.com/voxpupuli/puppet-openvpn/blob/master/manifests/ca.pp#L75 You would then need to ensure that the revoked file is created with the correct permission, you could amend the touch (https://github.com/voxpupuli/puppet-openvpn/blob/master/manifests/revoke.pp#L29) with a chmod to ensure the proper permissions. (You could also replace this with install |
||
server => 'test_openvpn_server', | ||
require => Openvpn::Server['test_openvpn_server'], | ||
remote_host => $facts['networking']['ip'], | ||
tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA', | ||
} | ||
|
||
openvpn::revoke { 'vpnclientb' : | ||
server => 'test_openvpn_server', | ||
} | ||
) | ||
apply_manifest_on(hosts_as('vpnserver'), pp, catch_failures: true) | ||
apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will renew the CRL on every puppet run if there is a "revoke". Can be fixed like that: