logstash-integration-aws 7.1.7-java → 7.2.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/docs/input-cloudwatch.asciidoc +12 -0
- data/docs/input-s3.asciidoc +12 -0
- data/docs/input-sqs.asciidoc +12 -0
- data/docs/output-cloudwatch.asciidoc +11 -0
- data/docs/output-s3.asciidoc +15 -2
- data/docs/output-sns.asciidoc +12 -0
- data/docs/output-sqs.asciidoc +13 -0
- data/lib/logstash/outputs/s3.rb +1 -1
- data/lib/logstash/plugin_mixins/aws_config/generic.rb +6 -0
- data/lib/logstash/plugin_mixins/aws_config/v2.rb +26 -9
- data/lib/logstash-integration-aws_jars.rb +1 -1
- data/spec/outputs/s3_spec.rb +2 -2
- data/spec/plugin_mixin/aws_config_spec.rb +23 -0
- data/vendor/jar-dependencies/org/logstash/plugins/integration/aws/logstash-integration-aws/7.2.0/logstash-integration-aws-7.2.0.jar +0 -0
- metadata +25 -25
- data/vendor/jar-dependencies/org/logstash/plugins/integration/aws/logstash-integration-aws/7.1.7/logstash-integration-aws-7.1.7.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b93bdb01523611844275ebf3c0b45d3e2cf7cfa437f7320a4be3a7043ee099e
|
4
|
+
data.tar.gz: 045cbc4d15ec6f96f39e555fa1de4aba3a0939a1b0de65333e0b0b0a97d97870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 858539c60b31389ad1e8804402e1c2c785fb8ba8e24a4791458df07c909974b3579ee4b09f6075c17c496db8d94f2ca59da71698dc51a3b8ad35a876dc0ec1b4
|
7
|
+
data.tar.gz: 2014dfe8a375604f37416d8f3f6320d506ca34b7bf19fb1a844d7609b3083ab89c2a1becd1ea7ea8485b282c5be7f1c6a5105689a5fae07a8c6d7f3aae8270b7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 7.2.0
|
2
|
+
- Added an option `web_identity_token_file` to support IRSA (IAM Roles for Service Accounts) [#52](https://github.com/logstash-plugins/logstash-integration-aws/pull/52)
|
3
|
+
|
4
|
+
## 7.1.8
|
5
|
+
- adding all supported storage classes for s3 output [#49](https://github.com/logstash-plugins/logstash-integration-aws/pull/49)
|
6
|
+
|
1
7
|
## 7.1.7
|
2
8
|
- Remove empty temporary dirs at plugin close [#46](https://github.com/logstash-plugins/logstash-integration-aws/pull/46)
|
3
9
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.
|
1
|
+
7.2.0
|
@@ -127,6 +127,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
127
127
|
| <<plugins-{type}s-{plugin}-statistics>> |<<array,array>>|No
|
128
128
|
| <<plugins-{type}s-{plugin}-use_aws_bundled_ca>> |<<boolean,boolean>>|No
|
129
129
|
| <<plugins-{type}s-{plugin}-use_ssl>> |<<boolean,boolean>>|No
|
130
|
+
| <<plugins-{type}s-{plugin}-web_identity_token_file>> |<<string,string>>|No
|
130
131
|
|=======================================================================
|
131
132
|
|
132
133
|
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
@@ -323,6 +324,17 @@ require 'aws-sdk' will load v2 classes.
|
|
323
324
|
Should we require (true) or disable (false) using SSL for communicating with the AWS API
|
324
325
|
The AWS SDK for Ruby defaults to SSL so we preserve that
|
325
326
|
|
327
|
+
[id="plugins-{type}s-{plugin}-web_identity_token_file"]
|
328
|
+
===== `web_identity_token_file`
|
329
|
+
|
330
|
+
* Value type is <<string,string>>
|
331
|
+
|
332
|
+
Absolute path to the file on disk containing OIDC token for https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html[IRSA].
|
333
|
+
Set the path to `"/var/run/secrets/eks.amazonaws.com/serviceaccount/token"` when using Amazon EKS.
|
334
|
+
If specified, <<plugins-{type}s-{plugin}-role_arn>> must not be empty.
|
335
|
+
|
336
|
+
For the details of setting up IAM roles and Kubernetes service accounts, check out https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[userguide]
|
337
|
+
|
326
338
|
|
327
339
|
[id="plugins-{type}s-{plugin}-common-options"]
|
328
340
|
include::{include_path}/{type}.asciidoc[]
|
data/docs/input-s3.asciidoc
CHANGED
@@ -80,6 +80,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
80
80
|
| <<plugins-{type}s-{plugin}-temporary_directory>> |<<string,string>>|No
|
81
81
|
| <<plugins-{type}s-{plugin}-use_aws_bundled_ca>> |<<boolean,boolean>>|No
|
82
82
|
| <<plugins-{type}s-{plugin}-watch_for_new_files>> |<<boolean,boolean>>|No
|
83
|
+
| <<plugins-{type}s-{plugin}-web_identity_token_file>> |<<string,string>>|No
|
83
84
|
|=======================================================================
|
84
85
|
|
85
86
|
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
@@ -351,6 +352,17 @@ you can set this to `true`.
|
|
351
352
|
Whether or not to watch for new files.
|
352
353
|
Disabling this option causes the input to close itself after processing the files from a single listing.
|
353
354
|
|
355
|
+
[id="plugins-{type}s-{plugin}-web_identity_token_file"]
|
356
|
+
===== `web_identity_token_file`
|
357
|
+
|
358
|
+
* Value type is <<string,string>>
|
359
|
+
|
360
|
+
Absolute path to the file on disk containing OIDC token for https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html[IRSA].
|
361
|
+
Set the path to `"/var/run/secrets/eks.amazonaws.com/serviceaccount/token"` when using Amazon EKS.
|
362
|
+
If specified, <<plugins-{type}s-{plugin}-role_arn>> must not be empty.
|
363
|
+
|
364
|
+
For the details of setting up IAM roles and Kubernetes service accounts, check out https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[userguide]
|
365
|
+
|
354
366
|
[id="plugins-{type}s-{plugin}-common-options"]
|
355
367
|
include::{include_path}/{type}.asciidoc[]
|
356
368
|
|
data/docs/input-sqs.asciidoc
CHANGED
@@ -103,6 +103,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
103
103
|
| <<plugins-{type}s-{plugin}-session_token>> |<<string,string>>|No
|
104
104
|
| <<plugins-{type}s-{plugin}-threads>> |<<number,number>>|No
|
105
105
|
| <<plugins-{type}s-{plugin}-use_aws_bundled_ca>> |<<boolean,boolean>>|No
|
106
|
+
| <<plugins-{type}s-{plugin}-web_identity_token_file>> |<<string,string>>|No
|
106
107
|
|=======================================================================
|
107
108
|
|
108
109
|
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
@@ -289,6 +290,17 @@ Use bundled CA certificates that ship with AWS SDK to verify SSL peer certificat
|
|
289
290
|
For cases where the default certificates are unavailable, e.g. Windows,
|
290
291
|
you can set this to `true`.
|
291
292
|
|
293
|
+
[id="plugins-{type}s-{plugin}-web_identity_token_file"]
|
294
|
+
===== `web_identity_token_file`
|
295
|
+
|
296
|
+
* Value type is <<string,string>>
|
297
|
+
|
298
|
+
Absolute path to the file on disk containing OIDC token for https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html[IRSA].
|
299
|
+
Set the path to `"/var/run/secrets/eks.amazonaws.com/serviceaccount/token"` when using Amazon EKS.
|
300
|
+
If specified, <<plugins-{type}s-{plugin}-role_arn>> must not be empty.
|
301
|
+
|
302
|
+
For the details of setting up IAM roles and Kubernetes service accounts, check out https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[userguide]
|
303
|
+
|
292
304
|
|
293
305
|
[id="plugins-{type}s-{plugin}-common-options"]
|
294
306
|
include::{include_path}/{type}.asciidoc[]
|
@@ -108,6 +108,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
108
108
|
| <<plugins-{type}s-{plugin}-unit>> |<<string,string>>, one of `["Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", "Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", "Bits/Second", "Kilobits/Second", "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None"]`|No
|
109
109
|
| <<plugins-{type}s-{plugin}-use_aws_bundled_ca>> |<<boolean,boolean>>|No
|
110
110
|
| <<plugins-{type}s-{plugin}-value>> |<<string,string>>|No
|
111
|
+
| <<plugins-{type}s-{plugin}-web_identity_token_file>> |<<string,string>>|No
|
111
112
|
|=======================================================================
|
112
113
|
|
113
114
|
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
@@ -324,6 +325,16 @@ If provided, this must be a string which can be converted to a float, for exampl
|
|
324
325
|
"1", "2.34", ".5", and "0.67"
|
325
326
|
If you set this option you should probably set the `unit` option along with it
|
326
327
|
|
328
|
+
[id="plugins-{type}s-{plugin}-web_identity_token_file"]
|
329
|
+
===== `web_identity_token_file`
|
330
|
+
|
331
|
+
* Value type is <<string,string>>
|
332
|
+
|
333
|
+
Absolute path to the file on disk containing OIDC token for https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html[IRSA].
|
334
|
+
Set the path to `"/var/run/secrets/eks.amazonaws.com/serviceaccount/token"` when using Amazon EKS.
|
335
|
+
If specified, <<plugins-{type}s-{plugin}-role_arn>> must not be empty.
|
336
|
+
|
337
|
+
For the details of setting up IAM roles and Kubernetes service accounts, check out https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[userguide]
|
327
338
|
|
328
339
|
|
329
340
|
[id="plugins-{type}s-{plugin}-common-options"]
|
data/docs/output-s3.asciidoc
CHANGED
@@ -107,7 +107,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
107
107
|
| <<plugins-{type}s-{plugin}-signature_version>> |<<string,string>>, one of `["v2", "v4"]`|No
|
108
108
|
| <<plugins-{type}s-{plugin}-size_file>> |<<number,number>>|No
|
109
109
|
| <<plugins-{type}s-{plugin}-ssekms_key_id>> |<<string,string>>|No
|
110
|
-
| <<plugins-{type}s-{plugin}-storage_class>> |<<string,string>>, one of `["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA"]`|No
|
110
|
+
| <<plugins-{type}s-{plugin}-storage_class>> |<<string,string>>, one of `["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "GLACIER", "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", "SNOW", "EXPRESS_ONEZONE"]`|No
|
111
111
|
| <<plugins-{type}s-{plugin}-temporary_directory>> |<<string,string>>|No
|
112
112
|
| <<plugins-{type}s-{plugin}-time_file>> |<<number,number>>|No
|
113
113
|
| <<plugins-{type}s-{plugin}-upload_multipart_threshold>> |<<number,number>>|No
|
@@ -115,6 +115,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
115
115
|
| <<plugins-{type}s-{plugin}-upload_workers_count>> |<<number,number>>|No
|
116
116
|
| <<plugins-{type}s-{plugin}-use_aws_bundled_ca>> |<<boolean,boolean>>|No
|
117
117
|
| <<plugins-{type}s-{plugin}-validate_credentials_on_root_bucket>> |<<boolean,boolean>>|No
|
118
|
+
| <<plugins-{type}s-{plugin}-web_identity_token_file>> |<<string,string>>|No
|
118
119
|
|=======================================================================
|
119
120
|
|
120
121
|
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
@@ -375,7 +376,7 @@ http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html
|
|
375
376
|
[id="plugins-{type}s-{plugin}-storage_class"]
|
376
377
|
===== `storage_class`
|
377
378
|
|
378
|
-
* Value can be any of: `STANDARD`, `REDUCED_REDUNDANCY`, `STANDARD_IA`, `ONEZONE_IA`
|
379
|
+
* Value can be any of: `STANDARD`, `REDUCED_REDUNDANCY`, `STANDARD_IA`, `ONEZONE_IA`, `INTELLIGENT_TIERING`, `GLACIER`, `DEEP_ARCHIVE`, `OUTPOSTS`, `GLACIER_IR`, `SNOW`, `EXPRESS_ONEZONE`
|
379
380
|
* Default value is `"STANDARD"`
|
380
381
|
|
381
382
|
Specifies what S3 storage class to use when uploading the file.
|
@@ -447,6 +448,18 @@ full access to write logs.
|
|
447
448
|
In some circumstances, you need more granular permissions on the subfolder. This
|
448
449
|
allows you to disable the check at startup.
|
449
450
|
|
451
|
+
[id="plugins-{type}s-{plugin}-web_identity_token_file"]
|
452
|
+
===== `web_identity_token_file`
|
453
|
+
|
454
|
+
* Value type is <<string,string>>
|
455
|
+
|
456
|
+
Absolute path to the file on disk containing OIDC token for https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html[IRSA].
|
457
|
+
Set the path to `"/var/run/secrets/eks.amazonaws.com/serviceaccount/token"` when using Amazon EKS.
|
458
|
+
If specified, <<plugins-{type}s-{plugin}-role_arn>> must not be empty.
|
459
|
+
|
460
|
+
For the details of setting up IAM roles and Kubernetes service accounts, check out https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[https://docs.aws.amazon.com/eks/latest/userguide/pod-configuration.html[userguide]
|
461
|
+
|
462
|
+
|
450
463
|
[id="plugins-{type}s-{plugin}-common-options"]
|
451
464
|
include::{include_path}/{type}.asciidoc[]
|
452
465
|
|
data/docs/output-sns.asciidoc
CHANGED
@@ -66,6 +66,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
66
66
|
| <<plugins-{type}s-{plugin}-secret_access_key>> |<<string,string>>|No
|
67
67
|
| <<plugins-{type}s-{plugin}-session_token>> |<<string,string>>|No
|
68
68
|
| <<plugins-{type}s-{plugin}-use_aws_bundled_ca>> |<<boolean,boolean>>|No
|
69
|
+
| <<plugins-{type}s-{plugin}-web_identity_token_file>> |<<string,string>>|No
|
69
70
|
|=======================================================================
|
70
71
|
|
71
72
|
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
@@ -169,6 +170,17 @@ Use bundled CA certificates that ship with AWS SDK to verify SSL peer certificat
|
|
169
170
|
For cases where the default certificates are unavailable, e.g. Windows,
|
170
171
|
you can set this to `true`.
|
171
172
|
|
173
|
+
[id="plugins-{type}s-{plugin}-web_identity_token_file"]
|
174
|
+
===== `web_identity_token_file`
|
175
|
+
|
176
|
+
* Value type is <<string,string>>
|
177
|
+
|
178
|
+
Absolute path to the file on disk containing OIDC token for https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html[IRSA].
|
179
|
+
Set the path to `"/var/run/secrets/eks.amazonaws.com/serviceaccount/token"` when using Amazon EKS.
|
180
|
+
If specified, <<plugins-{type}s-{plugin}-role_arn>> must not be empty.
|
181
|
+
|
182
|
+
For the details of setting up IAM roles and Kubernetes service accounts, check out https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[userguide]
|
183
|
+
|
172
184
|
|
173
185
|
[id="plugins-{type}s-{plugin}-common-options"]
|
174
186
|
include::{include_path}/{type}.asciidoc[]
|
data/docs/output-sqs.asciidoc
CHANGED
@@ -98,6 +98,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
98
98
|
| <<plugins-{type}s-{plugin}-secret_access_key>> |<<string,string>>|No
|
99
99
|
| <<plugins-{type}s-{plugin}-session_token>> |<<string,string>>|No
|
100
100
|
| <<plugins-{type}s-{plugin}-use_aws_bundled_ca>> |<<boolean,boolean>>|No
|
101
|
+
| <<plugins-{type}s-{plugin}-web_identity_token_file>> |<<string,string>>|No
|
101
102
|
|=======================================================================
|
102
103
|
|
103
104
|
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
@@ -245,6 +246,18 @@ Use bundled CA certificates that ship with AWS SDK to verify SSL peer certificat
|
|
245
246
|
For cases where the default certificates are unavailable, e.g. Windows,
|
246
247
|
you can set this to `true`.
|
247
248
|
|
249
|
+
[id="plugins-{type}s-{plugin}-web_identity_token_file"]
|
250
|
+
===== `web_identity_token_file`
|
251
|
+
|
252
|
+
* Value type is <<string,string>>
|
253
|
+
|
254
|
+
Absolute path to the file on disk containing OIDC token for https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html[IRSA].
|
255
|
+
Set the path to `"/var/run/secrets/eks.amazonaws.com/serviceaccount/token"` when using Amazon EKS.
|
256
|
+
If specified, <<plugins-{type}s-{plugin}-role_arn>> must not be empty.
|
257
|
+
|
258
|
+
For the details of setting up IAM roles and Kubernetes service accounts, check out https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html[userguide]
|
259
|
+
|
260
|
+
|
248
261
|
[id="plugins-{type}s-{plugin}-common-options"]
|
249
262
|
include::{include_path}/{type}.asciidoc[]
|
250
263
|
|
data/lib/logstash/outputs/s3.rb
CHANGED
@@ -142,7 +142,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
|
|
142
142
|
# More information about the different storage classes can be found:
|
143
143
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
144
144
|
# Defaults to STANDARD.
|
145
|
-
config :storage_class, :validate => ["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA"], :default => "STANDARD"
|
145
|
+
config :storage_class, :validate => ["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "GLACIER", "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", "SNOW", "EXPRESS_ONEZONE"], :default => "STANDARD"
|
146
146
|
|
147
147
|
# Set the directory where logstash will store the tmp files before sending it to S3
|
148
148
|
# default to the current OS temporary directory in linux /tmp/logstash
|
@@ -57,5 +57,11 @@ module LogStash::PluginMixins::AwsConfig::Generic
|
|
57
57
|
# you can use the bundled ca certificate provided by AWS SDK
|
58
58
|
# by setting `use_aws_bundled_ca` to true
|
59
59
|
config :use_aws_bundled_ca, :validate => :boolean, :default => false
|
60
|
+
|
61
|
+
# Absolute path to the file on disk containing OIDC token for IRSA
|
62
|
+
# In AWS EKS, this should be set to "/var/run/secrets/eks.amazonaws.com/serviceaccount/token",
|
63
|
+
# the default location where EKS projects the token.
|
64
|
+
# `role_arn` must be configured when `web_identity_token_file` is used
|
65
|
+
config :web_identity_token_file, :validate => :string
|
60
66
|
end
|
61
67
|
end
|
@@ -2,9 +2,18 @@
|
|
2
2
|
require "logstash/plugin_mixins/aws_config/generic"
|
3
3
|
|
4
4
|
module LogStash::PluginMixins::AwsConfig::V2
|
5
|
+
module RegisterInterceptor
|
6
|
+
# check aws config before plugin.register()
|
7
|
+
def register
|
8
|
+
check_aws_generic_config!
|
9
|
+
super
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
5
13
|
def self.included(base)
|
6
14
|
base.extend(self)
|
7
15
|
base.send(:include, LogStash::PluginMixins::AwsConfig::Generic)
|
16
|
+
base.prepend(RegisterInterceptor)
|
8
17
|
end
|
9
18
|
|
10
19
|
public
|
@@ -67,19 +76,24 @@ module LogStash::PluginMixins::AwsConfig::V2
|
|
67
76
|
alias credentials aws_credentials
|
68
77
|
|
69
78
|
def assume_role(opts = {})
|
70
|
-
|
71
|
-
|
72
|
-
opts[:credentials] = credentials if credentials
|
73
|
-
end
|
79
|
+
creds = aws_credentials
|
80
|
+
opts[:credentials] = creds if creds
|
74
81
|
|
75
82
|
# for a regional endpoint :region is always required by AWS
|
76
83
|
opts[:region] = @region
|
77
84
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
85
|
+
role_credentials_opts = {
|
86
|
+
client: Aws::STS::Client.new(opts),
|
87
|
+
role_arn: @role_arn,
|
88
|
+
role_session_name: @role_session_name
|
89
|
+
}
|
90
|
+
|
91
|
+
if @web_identity_token_file
|
92
|
+
role_credentials_opts[:web_identity_token_file] = @web_identity_token_file
|
93
|
+
Aws::AssumeRoleWebIdentityCredentials.new(role_credentials_opts)
|
94
|
+
else
|
95
|
+
Aws::AssumeRoleCredentials.new(role_credentials_opts)
|
96
|
+
end
|
83
97
|
end
|
84
98
|
|
85
99
|
def symbolize_keys_and_cast_true_false(hash)
|
@@ -97,4 +111,7 @@ module LogStash::PluginMixins::AwsConfig::V2
|
|
97
111
|
end
|
98
112
|
end
|
99
113
|
|
114
|
+
def check_aws_generic_config!
|
115
|
+
raise LogStash::ConfigurationError, "`role_arn` must be set when using `web_identity_token_file`" if @web_identity_token_file && (@role_arn.nil? || @role_arn.empty?)
|
116
|
+
end
|
100
117
|
end
|
data/spec/outputs/s3_spec.rb
CHANGED
@@ -122,7 +122,7 @@ describe LogStash::Outputs::S3 do
|
|
122
122
|
|
123
123
|
describe "Storage Class" do
|
124
124
|
context "when configured" do
|
125
|
-
["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA"].each do |storage_class|
|
125
|
+
["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "GLACIER", "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", "SNOW", "EXPRESS_ONEZONE"].each do |storage_class|
|
126
126
|
it "should return the configured storage class: #{storage_class}" do
|
127
127
|
s3 = described_class.new(options.merge({ "storage_class" => storage_class }))
|
128
128
|
expect(s3.upload_options).to include(:storage_class => storage_class)
|
@@ -211,7 +211,7 @@ describe LogStash::Outputs::S3 do
|
|
211
211
|
context 'us-east-1' do
|
212
212
|
let(:region) { 'us-east-1' }
|
213
213
|
it "sets endpoint" do
|
214
|
-
expect( subject.send(:bucket_resource).client.config.endpoint.to_s ).to eql 'https://s3.
|
214
|
+
expect( subject.send(:bucket_resource).client.config.endpoint.to_s ).to eql 'https://s3.amazonaws.com'
|
215
215
|
end
|
216
216
|
end
|
217
217
|
|
@@ -6,6 +6,7 @@ require 'timecop'
|
|
6
6
|
class DummyInputAwsConfigV2 < LogStash::Inputs::Base
|
7
7
|
include LogStash::PluginMixins::AwsConfig::V2
|
8
8
|
|
9
|
+
def register; end
|
9
10
|
def aws_service_endpoint(region)
|
10
11
|
{ :dummy_input_aws_config_region => "#{region}.awswebservice.local" }
|
11
12
|
end
|
@@ -13,6 +14,7 @@ end
|
|
13
14
|
|
14
15
|
class DummyInputAwsConfigV2NoRegionMethod < LogStash::Inputs::Base
|
15
16
|
include LogStash::PluginMixins::AwsConfig::V2
|
17
|
+
def register; end
|
16
18
|
end
|
17
19
|
|
18
20
|
describe LogStash::PluginMixins::AwsConfig::V2 do
|
@@ -87,6 +89,7 @@ describe LogStash::PluginMixins::AwsConfig::V2 do
|
|
87
89
|
new_temp_credentials
|
88
90
|
end
|
89
91
|
}
|
92
|
+
allow_any_instance_of(Aws::AssumeRoleCredentials).to receive(:parse_account_id).with(any_args).and_return(nil)
|
90
93
|
end
|
91
94
|
|
92
95
|
it 'supports passing role_arn' do
|
@@ -233,4 +236,24 @@ describe LogStash::PluginMixins::AwsConfig::V2 do
|
|
233
236
|
end
|
234
237
|
end
|
235
238
|
|
239
|
+
describe "validate config" do
|
240
|
+
context "setup IRSA" do
|
241
|
+
let(:settings) { {"web_identity_token_file" => "/path/to/token_file"} }
|
242
|
+
|
243
|
+
context "web_identity_token_file and role_arn are set" do
|
244
|
+
let(:settings) { super().merge("role_arn" => 'arn:aws:iam::111122223333:role/a-role',) }
|
245
|
+
|
246
|
+
it "passes validation" do
|
247
|
+
expect{ DummyInputAwsConfigV2.new(settings).register }.to_not raise_error
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
context "only web_identity_token_file is set" do
|
252
|
+
it "fails validation" do
|
253
|
+
expect{ DummyInputAwsConfigV2.new(settings).register }.to raise_error(LogStash::ConfigurationError, /`role_arn` must be set/)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
236
259
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-integration-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.2.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -20,8 +20,8 @@ dependencies:
|
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '2.99'
|
22
22
|
name: logstash-core-plugin-api
|
23
|
-
prerelease: false
|
24
23
|
type: :runtime
|
24
|
+
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
@@ -37,8 +37,8 @@ dependencies:
|
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '0'
|
39
39
|
name: concurrent-ruby
|
40
|
-
prerelease: false
|
41
40
|
type: :runtime
|
41
|
+
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
@@ -51,8 +51,8 @@ dependencies:
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
name: logstash-codec-json
|
54
|
-
prerelease: false
|
55
54
|
type: :runtime
|
55
|
+
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
@@ -65,8 +65,8 @@ dependencies:
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
name: logstash-codec-plain
|
68
|
-
prerelease: false
|
69
68
|
type: :runtime
|
69
|
+
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
@@ -79,8 +79,8 @@ dependencies:
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 3.0.9
|
81
81
|
name: rufus-scheduler
|
82
|
-
prerelease: false
|
83
82
|
type: :runtime
|
83
|
+
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
@@ -93,8 +93,8 @@ dependencies:
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: 0.0.22
|
95
95
|
name: stud
|
96
|
-
prerelease: false
|
97
96
|
type: :runtime
|
97
|
+
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
@@ -107,8 +107,8 @@ dependencies:
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
name: rexml
|
110
|
-
prerelease: false
|
111
110
|
type: :runtime
|
111
|
+
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - ">="
|
@@ -121,8 +121,8 @@ dependencies:
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '3'
|
123
123
|
name: aws-sdk-core
|
124
|
-
prerelease: false
|
125
124
|
type: :runtime
|
125
|
+
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
@@ -135,8 +135,8 @@ dependencies:
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
name: aws-sdk-s3
|
138
|
-
prerelease: false
|
139
138
|
type: :runtime
|
139
|
+
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - ">="
|
@@ -149,8 +149,8 @@ dependencies:
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
name: aws-sdk-sqs
|
152
|
-
prerelease: false
|
153
152
|
type: :runtime
|
153
|
+
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - ">="
|
@@ -163,8 +163,8 @@ dependencies:
|
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
name: aws-sdk-sns
|
166
|
-
prerelease: false
|
167
166
|
type: :runtime
|
167
|
+
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
170
|
- - ">="
|
@@ -177,8 +177,8 @@ dependencies:
|
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
name: aws-sdk-cloudwatch
|
180
|
-
prerelease: false
|
181
180
|
type: :runtime
|
181
|
+
prerelease: false
|
182
182
|
version_requirements: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
184
|
- - ">="
|
@@ -191,8 +191,8 @@ dependencies:
|
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
193
|
name: aws-sdk-cloudfront
|
194
|
-
prerelease: false
|
195
194
|
type: :runtime
|
195
|
+
prerelease: false
|
196
196
|
version_requirements: !ruby/object:Gem::Requirement
|
197
197
|
requirements:
|
198
198
|
- - ">="
|
@@ -205,8 +205,8 @@ dependencies:
|
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '0'
|
207
207
|
name: aws-sdk-resourcegroups
|
208
|
-
prerelease: false
|
209
208
|
type: :runtime
|
209
|
+
prerelease: false
|
210
210
|
version_requirements: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
212
|
- - ">="
|
@@ -219,8 +219,8 @@ dependencies:
|
|
219
219
|
- !ruby/object:Gem::Version
|
220
220
|
version: '0'
|
221
221
|
name: logstash-codec-json_lines
|
222
|
-
prerelease: false
|
223
222
|
type: :development
|
223
|
+
prerelease: false
|
224
224
|
version_requirements: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
226
|
- - ">="
|
@@ -233,8 +233,8 @@ dependencies:
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
name: logstash-codec-multiline
|
236
|
-
prerelease: false
|
237
236
|
type: :development
|
237
|
+
prerelease: false
|
238
238
|
version_requirements: !ruby/object:Gem::Requirement
|
239
239
|
requirements:
|
240
240
|
- - ">="
|
@@ -247,8 +247,8 @@ dependencies:
|
|
247
247
|
- !ruby/object:Gem::Version
|
248
248
|
version: '0'
|
249
249
|
name: logstash-codec-json
|
250
|
-
prerelease: false
|
251
250
|
type: :development
|
251
|
+
prerelease: false
|
252
252
|
version_requirements: !ruby/object:Gem::Requirement
|
253
253
|
requirements:
|
254
254
|
- - ">="
|
@@ -261,8 +261,8 @@ dependencies:
|
|
261
261
|
- !ruby/object:Gem::Version
|
262
262
|
version: '0'
|
263
263
|
name: logstash-codec-line
|
264
|
-
prerelease: false
|
265
264
|
type: :development
|
265
|
+
prerelease: false
|
266
266
|
version_requirements: !ruby/object:Gem::Requirement
|
267
267
|
requirements:
|
268
268
|
- - ">="
|
@@ -275,8 +275,8 @@ dependencies:
|
|
275
275
|
- !ruby/object:Gem::Version
|
276
276
|
version: '0'
|
277
277
|
name: logstash-devutils
|
278
|
-
prerelease: false
|
279
278
|
type: :development
|
279
|
+
prerelease: false
|
280
280
|
version_requirements: !ruby/object:Gem::Requirement
|
281
281
|
requirements:
|
282
282
|
- - ">="
|
@@ -289,8 +289,8 @@ dependencies:
|
|
289
289
|
- !ruby/object:Gem::Version
|
290
290
|
version: '0'
|
291
291
|
name: logstash-input-generator
|
292
|
-
prerelease: false
|
293
292
|
type: :development
|
293
|
+
prerelease: false
|
294
294
|
version_requirements: !ruby/object:Gem::Requirement
|
295
295
|
requirements:
|
296
296
|
- - ">="
|
@@ -303,8 +303,8 @@ dependencies:
|
|
303
303
|
- !ruby/object:Gem::Version
|
304
304
|
version: '0'
|
305
305
|
name: timecop
|
306
|
-
prerelease: false
|
307
306
|
type: :development
|
307
|
+
prerelease: false
|
308
308
|
version_requirements: !ruby/object:Gem::Requirement
|
309
309
|
requirements:
|
310
310
|
- - ">="
|
@@ -408,7 +408,7 @@ files:
|
|
408
408
|
- spec/spec_helper.rb
|
409
409
|
- spec/support/helpers.rb
|
410
410
|
- spec/unit/outputs/sqs_spec.rb
|
411
|
-
- vendor/jar-dependencies/org/logstash/plugins/integration/aws/logstash-integration-aws/7.
|
411
|
+
- vendor/jar-dependencies/org/logstash/plugins/integration/aws/logstash-integration-aws/7.2.0/logstash-integration-aws-7.2.0.jar
|
412
412
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
413
413
|
licenses:
|
414
414
|
- Apache-2.0
|
@@ -432,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
432
432
|
- !ruby/object:Gem::Version
|
433
433
|
version: '0'
|
434
434
|
requirements: []
|
435
|
-
rubygems_version: 3.
|
435
|
+
rubygems_version: 3.3.26
|
436
436
|
signing_key:
|
437
437
|
specification_version: 4
|
438
438
|
summary: Collection of Logstash plugins that integrate with AWS
|