terrafying-components 1.15.3 → 1.15.4
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 +4 -4
- data/lib/terrafying/components/version.rb +1 -1
- data/lib/terrafying/components/vpn_oidc.rb +87 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d362211008d95a4bd62f5181a67c1d4dad0a2316da9883cfb6aa59a4c2038c0
|
4
|
+
data.tar.gz: d6db4b592001e08129dcb29c47b8e80a350c2fb935351a5e1f4cec091770902d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c61093528dbaa6eb9879d036960137e31fcbf1703ccfe170409b4d12f47d3340468fde524cd302546bde7e186d37a2f3427153dd6a1774246a80dab868c7a779
|
7
|
+
data.tar.gz: 518ce60a8c157293057ef5b0e4430046b2573707fc4c69c2341cf3d8b4eebda7c75ba9bc327c18f3c9b67ef2b3c8f8cf2001bc619baf16f0e8bb5d7e114f4ea9
|
@@ -74,11 +74,18 @@ module Terrafying
|
|
74
74
|
openvpn_service,
|
75
75
|
openvpn_authz_service(@ca, @fqdn, @route_all_traffic, @route_dns_entries, @groups, @client_id, @issuer_url),
|
76
76
|
]
|
77
|
+
|
77
78
|
files = [
|
78
79
|
openvpn_conf,
|
79
80
|
openvpn_env,
|
80
81
|
openvpn_ip_delay,
|
81
82
|
]
|
83
|
+
|
84
|
+
if @ca
|
85
|
+
units += [cert_checking_service, cert_checking_path, cert_checking_timer,restart_openvpn_authz_service]
|
86
|
+
files << cert_checking_conf
|
87
|
+
end
|
88
|
+
|
82
89
|
keypairs = []
|
83
90
|
keypairs.push(@ca.create_keypair_in(self, @fqdn, zone: @zone)) if @ca
|
84
91
|
|
@@ -144,6 +151,86 @@ module Terrafying
|
|
144
151
|
ingress: ingress_rules
|
145
152
|
end
|
146
153
|
|
154
|
+
def cert_checking_conf
|
155
|
+
{
|
156
|
+
path: '/opt/cert_checking.yml',
|
157
|
+
mode: '0644',
|
158
|
+
contents: <<~CERT_CHECKING_CONF
|
159
|
+
casource: #{@ca.name}
|
160
|
+
caname: #{@ca.source}
|
161
|
+
fqdn: #{@fqdn}
|
162
|
+
CERT_CHECKING_CONF
|
163
|
+
}
|
164
|
+
end
|
165
|
+
|
166
|
+
def cert_checking_timer
|
167
|
+
{
|
168
|
+
|
169
|
+
name: 'cert_checking.timer',
|
170
|
+
contents: <<~CERT_CHECKING_TIMER
|
171
|
+
[Unit]
|
172
|
+
Description=Certificate Checking Service Timer
|
173
|
+
[Timer]
|
174
|
+
OnCalendar=*-*-* 00:00:00
|
175
|
+
Unit=cert_checking.service
|
176
|
+
[Install]
|
177
|
+
WantedBy=multi-user.target
|
178
|
+
CERT_CHECKING_TIMER
|
179
|
+
}
|
180
|
+
end
|
181
|
+
|
182
|
+
def cert_checking_service
|
183
|
+
{
|
184
|
+
name: 'cert-checking.service',
|
185
|
+
enabled: false,
|
186
|
+
contents: <<~CERT_CHECKING_SERVICE
|
187
|
+
[Install]
|
188
|
+
WantedBy=multi-user.target
|
189
|
+
[Unit]
|
190
|
+
Description=cert-checking
|
191
|
+
[Service]
|
192
|
+
Type=oneshot
|
193
|
+
ExecStartPre=-/usr/bin/docker rm -f cert-checking
|
194
|
+
ExecStart=/usr/bin/docker run --name cert-checking \
|
195
|
+
-e AWS_REGION=#{aws.region} \
|
196
|
+
-v /etc/ssl/#{@ca.name}:/etc/ssl/#{@ca.name} \
|
197
|
+
-v /opt/cert_checking.yml:/cert_checking.yml quay.io/uswitch/cert-downloader:v0.1
|
198
|
+
CERT_CHECKING_SERVICE
|
199
|
+
}
|
200
|
+
end
|
201
|
+
|
202
|
+
def cert_checking_path
|
203
|
+
{
|
204
|
+
|
205
|
+
name: 'cert_checking.path',
|
206
|
+
contents: <<~CERT_CHECKING_PATH
|
207
|
+
[Unit]
|
208
|
+
Description=Monitor the file for changes
|
209
|
+
[Path]
|
210
|
+
PathChanged=/etc/ssl/#{@ca.name}
|
211
|
+
Unit=restart-openvpn-authz.service
|
212
|
+
[Install]
|
213
|
+
WantedBy=multi-user.target
|
214
|
+
CERT_CHECKING_PATH
|
215
|
+
}
|
216
|
+
end
|
217
|
+
|
218
|
+
def restart_openvpn_authz_service
|
219
|
+
{
|
220
|
+
name: 'restart-openvpn-authz.service',
|
221
|
+
enabled: false,
|
222
|
+
contents: <<~RESTART_OPENVPN_AUTHZ
|
223
|
+
[Install]
|
224
|
+
WantedBy=multi-user.target
|
225
|
+
[Unit]
|
226
|
+
Description=restart openvpn-authz service
|
227
|
+
[Service]
|
228
|
+
Type=oneshot
|
229
|
+
ExecStart=/usr/bin/systemctl restart openvpn-authz.service
|
230
|
+
RESTART_OPENVPN_AUTHZ
|
231
|
+
}
|
232
|
+
end
|
233
|
+
|
147
234
|
def openvpn_service
|
148
235
|
Ignition.container_unit(
|
149
236
|
'openvpn', 'kylemanna/openvpn',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terrafying-components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.15.
|
4
|
+
version: 1.15.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- uSwitch Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|