cfn-vpn 1.5.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03a0a38a10b42f88181de0fe2dc2954d4724f70515fcc3eb529f5a148ff17025
4
- data.tar.gz: fb22c0da59f79dcf2b5175b31bb0b5c1cbf731568e3c99dc5de85bebe50f0240
3
+ metadata.gz: 150d5c310df91f38fb0136841949f85cacfb5e3cce61dde33b6a5d8e5835c6c5
4
+ data.tar.gz: 491ec001fe6e315be750c19003eeb18d3b2fd63a03630477a89531f8454f8938
5
5
  SHA512:
6
- metadata.gz: 424241bf23dd636c2c3930e7475d6840dbd110421160c517fd23b66e08306183f6f398dde96ce3fb595f7bbe3852e1dcb40a45f2a750a00c4f61a76698277217
7
- data.tar.gz: 8d06e2135f609be0b36bf8672bdc1f8d88bf1d31213763741592cd0f511060c925ce872e5081c30c1ad8a09e4465cc49249a652cd3c360a879da310f05a7d7e1
6
+ metadata.gz: 3bc9a43cd62eeb967b52589cfe7e816313cd4d260065e5a17317f1d19e9b9b8afc5d00279800854f0c4f8d319b8d7febf2b0a0ec3f7f79cea0bdbc2853cf16d6
7
+ data.tar.gz: 0d10b220d8fbfb78f53ab0b0f3e0f586f0214b759a7ba6f605b8b8a05c4eeebb718b91618128e2414dd7c2b31792224287363836d5820717718ed5347e6b73fd
data/Dockerfile CHANGED
@@ -9,7 +9,7 @@ RUN apt-get update -qq \
9
9
  ENV EASYRSA=/usr/share/easy-rsa
10
10
  ENV EASYRSA_BATCH=yes
11
11
 
12
- ARG CFNVPN_VERSION="1.5.0"
12
+ ARG CFNVPN_VERSION="1.8.0"
13
13
 
14
14
  COPY . /src
15
15
 
@@ -25,6 +25,7 @@ This will revoke the client certificate and apply to the client VPN endpoint.
25
25
  Note this wont terminate the session but will stop the client from reconnecting using the certificate.
26
26
 
27
27
  ```sh
28
+ # please ensure that you are using the latest cfn-vpn version before revoking cert since previous versions have issues maintaining the CRL
28
29
  cfn-vpn revoke myvpn --client-cn user1 --bucket mybucket
29
30
  ```
30
31
 
@@ -93,4 +94,4 @@ Modify base2-ciinabox.config.ovpn to include the full location of your extracted
93
94
  echo "cert /<path>/user1.crt" >> myvpn.config.ovpn
94
95
 
95
96
  Open myvpn.config.ovpn with your favorite openvpn client.
96
- ```
97
+ ```
data/docs/modifying.md CHANGED
@@ -34,7 +34,7 @@ cfn-vpn params [name] --diff-yaml cfnvpn.[name].yaml
34
34
  cfn-vpn configuration can be managed through a YAML file using the `modify` command to apply the config changes to the vpn stack. See the [YAML docs](yaml-config.md) for config options.
35
35
 
36
36
  ```
37
- cfn-vpn modify [name] --params-yaml cfnvpn.[name].yaml
37
+ cfn-vpn modify [name] --param-yaml cfnvpn.[name].yaml
38
38
  ```
39
39
 
40
40
  a cloudformation changeset is created with the desired changes and approval is asked
data/docs/yaml-config.md CHANGED
@@ -7,7 +7,7 @@ cfn-vpn configuration can be managed through a YAML file using the `modify` comm
7
7
  run the `modify` command and supply the yaml file to apply the changes
8
8
 
9
9
  ```sh
10
- cfn-vpn routes [name] --params-yaml cfnvpn.[name].yaml
10
+ cfn-vpn routes [name] --param-yaml cfnvpn.[name].yaml
11
11
  ```
12
12
 
13
13
  ## Dump Current Config to YAML File
@@ -73,7 +73,8 @@ module CfnVpn::Actions
73
73
 
74
74
  if @options[:param_yaml]
75
75
  CfnVpn::Log.logger.debug "Loading config from YAML file #{@options[:param_yaml]}"
76
- @config = CfnVpn::Config.get_config_from_yaml_file(@options[:param_yaml])
76
+ yaml_config = CfnVpn::Config.get_config_from_yaml_file(@options[:param_yaml])
77
+ @config = @config.merge(yaml_config)
77
78
  else
78
79
  CfnVpn::Log.logger.debug "Loading config from options"
79
80
  @options.each do |key, value|
@@ -38,6 +38,12 @@ module CfnVpn::Actions
38
38
  s3.get_object("#{@cert_dir}/#{@options['client_cn']}.tar.gz")
39
39
  CfnVpn::Log.logger.info "Generating new client certificate #{@options['client_cn']} using openvpn easy-rsa"
40
40
  CfnVpn::Log.logger.debug cert.revoke_client(@options['client_cn'])
41
+
42
+ # persist index.txt which contains previous CRL back to s3
43
+ system("tar xzfv #{@cert_dir}/ca.tar.gz --directory #{@build_dir}")
44
+ FileUtils.cp(["#{@cert_dir}/index.txt"], "#{@build_dir}/pki/")
45
+ system("tar czfv #{@cert_dir}/ca.tar.gz -C #{@build_dir} pki/")
46
+ s3.store_object("#{@cert_dir}/ca.tar.gz")
41
47
  end
42
48
 
43
49
  def apply_rekocation_list
@@ -142,11 +142,12 @@ module CfnVpn
142
142
  system("easyrsa revoke #{client_cn}")
143
143
  system("easyrsa gen-crl")
144
144
  FileUtils.cp("#{@pki_dir}/crl.pem", @cert_dir)
145
+ FileUtils.cp("#{@pki_dir}/index.txt", @cert_dir)
145
146
  else
146
147
  @docker_cmd << "-e EASYRSA_CLIENT_CN=#{client_cn}"
147
148
  @docker_cmd << "-v #{@cert_dir}:/easy-rsa/output"
148
149
  @docker_cmd << @easyrsa_image
149
- @docker_cmd << "sh -c 'revoke-client'"
150
+ @docker_cmd << "sh -c 'revoke-client && cp pki/index.txt output/index.txt'"
150
151
  CfnVpn::Log.logger.debug `#{@docker_cmd.join(' ')}`
151
152
  end
152
153
  end
@@ -83,7 +83,7 @@ module CfnVpn
83
83
  network_assoc_dependson << "ClientVpnTargetNetworkAssociation#{suffix}"
84
84
  end
85
85
 
86
- if config[:default_groups].any?
86
+ if !config[:default_groups].nil? && config[:default_groups].any?
87
87
  config[:default_groups].each do |group|
88
88
  EC2_ClientVpnAuthorizationRule(:"TargetNetworkAuthorizationRule#{group.resource_safe}"[0..255]) {
89
89
  Condition(:EnableSubnetAssociation)
@@ -1,4 +1,4 @@
1
1
  module CfnVpn
2
- VERSION = "1.5.0".freeze
2
+ VERSION = "1.8.0".freeze
3
3
  CHANGE_SET_VERSION = VERSION.gsub('.', '-').freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-vpn
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guslington
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-07 00:00:00.000000000 Z
11
+ date: 2026-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -290,7 +290,7 @@ licenses:
290
290
  metadata:
291
291
  homepage_uri: https://github.com/base2services/aws-client-vpn
292
292
  source_code_uri: https://github.com/base2services/aws-client-vpn
293
- post_install_message:
293
+ post_install_message:
294
294
  rdoc_options: []
295
295
  require_paths:
296
296
  - lib
@@ -306,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
306
  version: '0'
307
307
  requirements: []
308
308
  rubygems_version: 3.1.6
309
- signing_key:
309
+ signing_key:
310
310
  specification_version: 4
311
311
  summary: creates and manages resources for the aws client vpn
312
312
  test_files: []