-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #374 - Revocation command update and crl renew
An issue was raised informing that the revocation command is incorrect. This was diagnosed to indeed be the case. As the `$name` variable in context of `revoke.pp` does not evalute to `server name` but instead `client name`. The exec for the crl renew was updated to clarify which server it's done for and to prevent duplicate `exec` resource names. `catch_changes` in the acceptance test was taken out because a crl renew is triggrered which is seen as a change.
- Loading branch information
Ruben Bosch
committed
May 18, 2020
1 parent
73725c6
commit 8442a18
Showing
3 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,11 +43,12 @@ | |
local => '', | ||
management => true, | ||
tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA', | ||
} | ||
} | ||
) | ||
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': | ||
|
@@ -62,7 +63,7 @@ | |
tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA', | ||
} | ||
openvpn::client { 'vpnclienta' : | ||
openvpn::client { 'vpnclienta' : | ||
server => 'test_openvpn_server', | ||
require => Openvpn::Server['test_openvpn_server'], | ||
remote_host => $facts['networking']['ip'], | ||
|
@@ -73,6 +74,39 @@ | |
apply_manifest_on(hosts_as('vpnserver'), pp, catch_changes: true) | ||
end | ||
|
||
it 'revokes openvpn client certificate' do | ||
pp = %( | ||
openvpn::server { 'test_openvpn_server': | ||
country => 'CO', | ||
province => 'ST', | ||
city => 'A city', | ||
organization => 'FOO', | ||
email => '[email protected]', | ||
server => '10.0.0.0 255.255.255.0', | ||
local => '', | ||
management => true, | ||
tls_cipher => 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA', | ||
} | ||
openvpn::client { 'vpnclientb' : | ||
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: false) | ||
end | ||
|
||
describe file("#{server_directory}/test_openvpn_server/easy-rsa/revoked/vpnclientb") do | ||
it { is_expected.to be_file } | ||
end | ||
|
||
describe file("#{server_directory}/test_openvpn_server/easy-rsa/keys") do | ||
it { is_expected.to be_directory } | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters