logstash-integration-aws 7.1.3-java → 7.1.4-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4cbe08b7343729fa42923adec2223fef762443a605affa60a7cee5dd4f6bd6c
4
- data.tar.gz: 01b5095d1534b0527573fae1c29c7eba3be667754d7162f5122a1cc21d3e8f70
3
+ metadata.gz: a30619ed8bc31761d0134555c20ba7f9e682cce080d89d36e83cbc1a402d4678
4
+ data.tar.gz: f1b9247104f4e1ad28b6bab42696ebf064f9fac37d0cfdcf03a3269bcb25566b
5
5
  SHA512:
6
- metadata.gz: 30b3e667cdbaf3ecd4fdf6768c8ea3740ac9935b2761b42370e459162c7cc38075d41c6501bc4499d25b377a70911f9733ed51a636e019075db3e8bd512e35aa
7
- data.tar.gz: 7eefe2ea51c7b2b84a20148b7fcf55316818fd0b84ec2cd94e54a055abd542ff58c1143a78e1c7685ac3ca07993e2d2f8f44d4902495387749b12985175d8e7d
6
+ metadata.gz: b424d54d88b11c1cdc12b5d27e5da5d6c3900331f4dab53d0f6931ddfa4adaf678251103f3ec7f70ae3a52c632ed83138efe153efd122d84ff916e7091e09fa7
7
+ data.tar.gz: d585032f64c6f9f3ffcc91653bf06446e157e6c2f4f1370f084ab18967b900e64a36f0df76e4b5325380b19ed795fbe4e91a7039737270a106ad9b57d78d1634
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 7.1.4
2
+ - Fix `use_aws_bundled_ca` to use bundled ca certs per plugin level instead of global [#33](https://github.com/logstash-plugins/logstash-integration-aws/pull/33)
3
+
1
4
  ## 7.1.3
2
5
  - Added an option `use_aws_bundled_ca` to use bundled ca certs that ships with AWS SDK to verify SSL peer certificates [#32](https://github.com/logstash-plugins/logstash-integration-aws/pull/32)
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.1.3
1
+ 7.1.4
@@ -130,8 +130,6 @@ class LogStash::Inputs::CloudWatch < LogStash::Inputs::Base
130
130
  raise 'Interval must be divisible by period' unless @interval % @period == 0
131
131
  raise "Filters must be defined for when using #{@namespace} namespace" if @filters.nil? && filters_required?(@namespace)
132
132
 
133
- setup_aws_client_config
134
-
135
133
  @last_check = Time.now
136
134
  end # def register
137
135
 
@@ -100,7 +100,6 @@ class LogStash::Inputs::S3 < LogStash::Inputs::Base
100
100
 
101
101
  @logger.info("Registering", :bucket => @bucket, :region => @region)
102
102
 
103
- setup_aws_client_config
104
103
  s3 = get_s3object
105
104
 
106
105
  @s3bucket = s3.bucket(@bucket)
@@ -99,7 +99,6 @@ class LogStash::Inputs::SQS < LogStash::Inputs::Threadable
99
99
  require "aws-sdk-sqs"
100
100
  @logger.info("Registering SQS input", :queue => @queue, :queue_owner_aws_account_id => @queue_owner_aws_account_id)
101
101
 
102
- setup_aws_client_config
103
102
  setup_queue
104
103
  end
105
104
 
@@ -163,7 +163,6 @@ class LogStash::Outputs::CloudWatch < LogStash::Outputs::Base
163
163
  require "thread"
164
164
  require "aws-sdk-cloudwatch"
165
165
 
166
- setup_aws_client_config
167
166
  @cw = Aws::CloudWatch::Client.new(aws_options_hash)
168
167
 
169
168
  @event_queue = SizedQueue.new(@queue_size)
@@ -209,8 +209,6 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
209
209
  raise LogStash::ConfigurationError, "Logstash must have the permissions to write to the temporary directory: #{@temporary_directory}"
210
210
  end
211
211
 
212
- setup_aws_client_config
213
-
214
212
  if @validate_credentials_on_root_bucket && !WriteBucketPermissionValidator.new(@logger).valid?(bucket_resource, upload_options)
215
213
  raise LogStash::ConfigurationError, "Logstash must have the privileges to write to root bucket `#{@bucket}`, check your credentials or your permissions."
216
214
  end
@@ -58,7 +58,6 @@ class LogStash::Outputs::Sns < LogStash::Outputs::Base
58
58
  def register
59
59
  require "aws-sdk-sns"
60
60
 
61
- setup_aws_client_config
62
61
  @sns = Aws::SNS::Client.new(aws_options_hash)
63
62
 
64
63
  publish_boot_message_arn()
@@ -86,7 +86,6 @@ class LogStash::Outputs::SQS < LogStash::Outputs::Base
86
86
 
87
87
  public
88
88
  def register
89
- setup_aws_client_config
90
89
  @sqs = Aws::SQS::Client.new(aws_options_hash)
91
90
 
92
91
  if @batch_events > 10
@@ -35,11 +35,14 @@ module LogStash::PluginMixins::AwsConfig::V2
35
35
  opts = symbolize_keys_and_cast_true_false(additional_settings).merge(opts)
36
36
  end
37
37
 
38
- return opts
39
- end
38
+ if @use_aws_bundled_ca
39
+ aws_core_library = Gem.loaded_specs['aws-sdk-core']&.full_gem_path or fail("AWS Core library not available")
40
+ opts[:ssl_ca_bundle] = File.expand_path('ca-bundle.crt', aws_core_library).tap do |aws_core_ca_bundle|
41
+ fail("AWS Core CA bundle not found") unless File.exists?(aws_core_ca_bundle)
42
+ end
43
+ end
40
44
 
41
- def setup_aws_client_config
42
- Aws.use_bundled_cert! if @use_aws_bundled_ca
45
+ return opts
43
46
  end
44
47
 
45
48
  private
@@ -1,4 +1,4 @@
1
1
  # AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.
2
2
 
3
3
  require 'jar_dependencies'
4
- require_jar('org.logstash.plugins.integration.aws', 'logstash-integration-aws', '7.1.3')
4
+ require_jar('org.logstash.plugins.integration.aws', 'logstash-integration-aws', '7.1.4')
@@ -152,6 +152,25 @@ describe LogStash::PluginMixins::AwsConfig::V2 do
152
152
 
153
153
  end
154
154
  end
155
+
156
+ end
157
+
158
+ describe 'use aws bundled ca' do
159
+ context 'set to true' do
160
+ let(:settings) { { 'use_aws_bundled_ca' => true } }
161
+
162
+ it 'points ssl_ca_bundle to aws-sdk-core certs' do
163
+ expect(subject[:ssl_ca_bundle]).to match /aws-sdk-core.*ca-bundle\.crt\z/
164
+ end
165
+ end
166
+
167
+ context 'set to false' do
168
+ let(:settings) { { 'use_aws_bundled_ca' => false } }
169
+
170
+ it 'does not include the AWS bundled CA' do
171
+ expect(subject).to_not include :ssl_ca_bundle
172
+ end
173
+ end
155
174
  end
156
175
 
157
176
  describe 'config proxy' do
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.1.3
4
+ version: 7.1.4
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-14 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -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.1.3/logstash-integration-aws-7.1.3.jar
411
+ - vendor/jar-dependencies/org/logstash/plugins/integration/aws/logstash-integration-aws/7.1.4/logstash-integration-aws-7.1.4.jar
412
412
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
413
413
  licenses:
414
414
  - Apache-2.0