Skip to content

Commit d787dd8

Browse files
committed
aws_s3: add TLS config option (input/output/cache)
This change makes TLS configurable for the S3 components (input, output, and cache). There are more callers to GetSession(), but if I understand it correctly, these are AWS-specific services (DynamoDB, Bedrock, ...) and using those components with drop-ins might not be as common as having a different, compatible S3 endpoint. Signed-off-by: Stephan Renatus <[email protected]>
1 parent dd20a72 commit d787dd8

File tree

7 files changed

+521
-1
lines changed

7 files changed

+521
-1
lines changed

docs/modules/components/pages/caches/aws_s3.adoc

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ aws_s3:
5757
initial_interval: 1s
5858
max_interval: 5s
5959
max_elapsed_time: 30s
60+
tls:
61+
enabled: false
62+
skip_cert_verify: false
63+
enable_renegotiation: false
64+
root_cas: ""
65+
root_cas_file: ""
66+
client_certs: []
6067
region: "" # No default (optional)
6168
endpoint: "" # No default (optional)
6269
credentials:
@@ -161,6 +168,166 @@ max_elapsed_time: 1m
161168
max_elapsed_time: 1h
162169
```
163170
171+
=== `tls`
172+
173+
Custom TLS settings can be used to override system defaults.
174+
175+
176+
*Type*: `object`
177+
178+
179+
=== `tls.enabled`
180+
181+
Whether custom TLS settings are enabled.
182+
183+
184+
*Type*: `bool`
185+
186+
*Default*: `false`
187+
188+
=== `tls.skip_cert_verify`
189+
190+
Whether to skip server side certificate verification.
191+
192+
193+
*Type*: `bool`
194+
195+
*Default*: `false`
196+
197+
=== `tls.enable_renegotiation`
198+
199+
Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you're seeing the error message `local error: tls: no renegotiation`.
200+
201+
202+
*Type*: `bool`
203+
204+
*Default*: `false`
205+
Requires version 3.45.0 or newer
206+
207+
=== `tls.root_cas`
208+
209+
An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
210+
[CAUTION]
211+
====
212+
This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info].
213+
====
214+
215+
216+
217+
*Type*: `string`
218+
219+
*Default*: `""`
220+
221+
```yml
222+
# Examples
223+
224+
root_cas: |-
225+
-----BEGIN CERTIFICATE-----
226+
...
227+
-----END CERTIFICATE-----
228+
```
229+
230+
=== `tls.root_cas_file`
231+
232+
An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
233+
234+
235+
*Type*: `string`
236+
237+
*Default*: `""`
238+
239+
```yml
240+
# Examples
241+
242+
root_cas_file: ./root_cas.pem
243+
```
244+
245+
=== `tls.client_certs`
246+
247+
A list of client certificates to use. For each certificate either the fields `cert` and `key`, or `cert_file` and `key_file` should be specified, but not both.
248+
249+
250+
*Type*: `array`
251+
252+
*Default*: `[]`
253+
254+
```yml
255+
# Examples
256+
257+
client_certs:
258+
- cert: foo
259+
key: bar
260+
261+
client_certs:
262+
- cert_file: ./example.pem
263+
key_file: ./example.key
264+
```
265+
266+
=== `tls.client_certs[].cert`
267+
268+
A plain text certificate to use.
269+
270+
271+
*Type*: `string`
272+
273+
*Default*: `""`
274+
275+
=== `tls.client_certs[].key`
276+
277+
A plain text certificate key to use.
278+
[CAUTION]
279+
====
280+
This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info].
281+
====
282+
283+
284+
285+
*Type*: `string`
286+
287+
*Default*: `""`
288+
289+
=== `tls.client_certs[].cert_file`
290+
291+
The path of a certificate to use.
292+
293+
294+
*Type*: `string`
295+
296+
*Default*: `""`
297+
298+
=== `tls.client_certs[].key_file`
299+
300+
The path of a certificate key to use.
301+
302+
303+
*Type*: `string`
304+
305+
*Default*: `""`
306+
307+
=== `tls.client_certs[].password`
308+
309+
A plain text password for when the private key is password encrypted in PKCS#1 or PKCS#8 format. The obsolete `pbeWithMD5AndDES-CBC` algorithm is not supported for the PKCS#8 format.
310+
311+
Because the obsolete pbeWithMD5AndDES-CBC algorithm does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.
312+
[CAUTION]
313+
====
314+
This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info].
315+
====
316+
317+
318+
319+
*Type*: `string`
320+
321+
*Default*: `""`
322+
323+
```yml
324+
# Examples
325+
326+
password: foo
327+
328+
password: ${KEY_PASSWORD}
329+
```
330+
164331
=== `region`
165332
166333
The AWS region to target.

docs/modules/components/pages/inputs/aws_s3.adoc

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ input:
8383
delay_period: ""
8484
max_messages: 10
8585
wait_time_seconds: 0
86+
tls:
87+
enabled: false
88+
skip_cert_verify: false
89+
enable_renegotiation: false
90+
root_cas: ""
91+
root_cas_file: ""
92+
client_certs: []
8693
```
8794
8895
--
@@ -349,4 +356,164 @@ Whether to set the wait time. Enabling this activates long-polling. Valid values
349356
350357
*Default*: `0`
351358
359+
=== `sqs.tls`
360+
361+
Custom TLS settings can be used to override system defaults.
362+
363+
364+
*Type*: `object`
365+
366+
367+
=== `sqs.tls.enabled`
368+
369+
Whether custom TLS settings are enabled.
370+
371+
372+
*Type*: `bool`
373+
374+
*Default*: `false`
375+
376+
=== `sqs.tls.skip_cert_verify`
377+
378+
Whether to skip server side certificate verification.
379+
380+
381+
*Type*: `bool`
382+
383+
*Default*: `false`
384+
385+
=== `sqs.tls.enable_renegotiation`
386+
387+
Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you're seeing the error message `local error: tls: no renegotiation`.
388+
389+
390+
*Type*: `bool`
391+
392+
*Default*: `false`
393+
Requires version 3.45.0 or newer
394+
395+
=== `sqs.tls.root_cas`
396+
397+
An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
398+
[CAUTION]
399+
====
400+
This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info].
401+
====
402+
403+
404+
405+
*Type*: `string`
406+
407+
*Default*: `""`
408+
409+
```yml
410+
# Examples
411+
412+
root_cas: |-
413+
-----BEGIN CERTIFICATE-----
414+
...
415+
-----END CERTIFICATE-----
416+
```
417+
418+
=== `sqs.tls.root_cas_file`
419+
420+
An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.
421+
422+
423+
*Type*: `string`
424+
425+
*Default*: `""`
426+
427+
```yml
428+
# Examples
429+
430+
root_cas_file: ./root_cas.pem
431+
```
432+
433+
=== `sqs.tls.client_certs`
434+
435+
A list of client certificates to use. For each certificate either the fields `cert` and `key`, or `cert_file` and `key_file` should be specified, but not both.
436+
437+
438+
*Type*: `array`
439+
440+
*Default*: `[]`
441+
442+
```yml
443+
# Examples
444+
445+
client_certs:
446+
- cert: foo
447+
key: bar
448+
449+
client_certs:
450+
- cert_file: ./example.pem
451+
key_file: ./example.key
452+
```
453+
454+
=== `sqs.tls.client_certs[].cert`
455+
456+
A plain text certificate to use.
457+
458+
459+
*Type*: `string`
460+
461+
*Default*: `""`
462+
463+
=== `sqs.tls.client_certs[].key`
464+
465+
A plain text certificate key to use.
466+
[CAUTION]
467+
====
468+
This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info].
469+
====
470+
471+
472+
473+
*Type*: `string`
474+
475+
*Default*: `""`
476+
477+
=== `sqs.tls.client_certs[].cert_file`
478+
479+
The path of a certificate to use.
480+
481+
482+
*Type*: `string`
483+
484+
*Default*: `""`
485+
486+
=== `sqs.tls.client_certs[].key_file`
487+
488+
The path of a certificate key to use.
489+
490+
491+
*Type*: `string`
492+
493+
*Default*: `""`
494+
495+
=== `sqs.tls.client_certs[].password`
496+
497+
A plain text password for when the private key is password encrypted in PKCS#1 or PKCS#8 format. The obsolete `pbeWithMD5AndDES-CBC` algorithm is not supported for the PKCS#8 format.
498+
499+
Because the obsolete pbeWithMD5AndDES-CBC algorithm does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.
500+
[CAUTION]
501+
====
502+
This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info].
503+
====
504+
505+
506+
507+
*Type*: `string`
508+
509+
*Default*: `""`
510+
511+
```yml
512+
# Examples
513+
514+
password: foo
515+
516+
password: ${KEY_PASSWORD}
517+
```
518+
352519

0 commit comments

Comments
 (0)