logstash-output-kinesis 0.0.10-java → 0.0.11-java

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODEyMjQ0NzliNDVhODlkNTYyNDdlMWFiMTE1OWMyZGM0NjdhMmUwOQ==
4
+ MTVlN2U1ODJkYjBmNjk4OGJiYjY2MjRiNzhjNDZjYTFhYzk1NTMzMg==
5
5
  data.tar.gz: !binary |-
6
- MzEyYzhhYjIwMjBmYjBhOGYwYzQ4OTUzYjVkYjViODk3ZjMwZWU1Ng==
6
+ YTc2YjNjOTdiNmRjNWI5MWNhZTlkYzVlMzc0NTQyNDc2MGIwZWQ0MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2MwM2ExY2Y0ZTFkODFjZjc5MWZmNWFhMTI5NDYwNzM2OTUzNzcwOTQzNTI5
10
- YWEzNzcyYzNlOWZmMjU2YmJmYzJlNmQ4NjczMmQ0YWY1ZGYwNzIyNjc3MmY2
11
- MTgwM2RmNTgzNzYzMTQyYjRiZTA5ZmZlZjczMTE1ZTE4Y2MyNjc=
9
+ NmJhNjYyYjAwNDEzYTgxYmUyYTgyOWFhNDcxZjhhMThlMzM1NTExY2Y1ZTBm
10
+ Njk5OGU0NWM4YjE0NWY4YmNlMzI4MWQyMGNmNzlmMWVhODU2MDQ3ZDkzNDFk
11
+ MzU1ZGQ0MTIzZDhmOGIzNjQzNzUxOTE3ZDY3MzEzMmNjZjRiZjI=
12
12
  data.tar.gz: !binary |-
13
- YzA2NzQyN2I3MGZkODY1ZjQ4YTRiMDVmMDM5OTViY2ViNDU4YmI2M2JiNjZh
14
- YTIzNDllYjhkMDlhMTI2ODk4NjljMTRhZjg1OWUyMDE3NTViYWUyNTliYTAz
15
- OTFkOWE1ZjliNWE1ZjViYzE3YmQyMTA2YWY5NDE5ZDllYjg1ZDY=
13
+ N2JmMjBmYjA5NjNkZWZjNzA1Y2U1MTM4NDRlMjdlZDM5MmQyMzYyODMzNjBl
14
+ NGNlMTZlNjUzMDhlNmY5ODczMTZjZmI2NWFmZjU2ZTdjN2E1NGQ5N2M0YjBh
15
+ YzY1ZTg0MDhmMjM4MjdhMDNlMDRmOTU0ZDg4ZDdmMjBhMjU4MTU=
@@ -1,3 +1,3 @@
1
1
  module LogstashOutputKinesis
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -32,6 +32,9 @@ class LogStash::Outputs::Kinesis < LogStash::Outputs::Base
32
32
  # If provided, STS will be used to assume this role and use it to authenticate to CloudWatch
33
33
  config :metrics_role_arn, :validate => :string
34
34
 
35
+ config :sts_proxy_host, :validate => :string
36
+ config :sts_proxy_port, :validate => :number
37
+
35
38
  config :aggregation_enabled, :validate => :boolean, :default => true
36
39
  config :aggregation_max_count, :validate => :number, :default => 4294967295
37
40
  config :aggregation_max_size, :validate => :number, :default => 51200
@@ -139,13 +142,26 @@ class LogStash::Outputs::Kinesis < LogStash::Outputs::Base
139
142
  config
140
143
  end
141
144
 
145
+ def create_sts_provider(base_provider, arn)
146
+ client_config = com.amazonaws.ClientConfiguration.new()
147
+ if @sts_proxy_host
148
+ client_config.setProxyHost(@sts_proxy_host)
149
+ end
150
+ if @sts_proxy_port
151
+ client_config.setProxyPort(@sts_proxy_port)
152
+ end
153
+ provider = AWSAuth.STSAssumeRoleSessionCredentialsProvider.new(
154
+ base_provider, arn, "logstash-output-kinesis", client_config)
155
+ provider
156
+ end
157
+
142
158
  def create_credentials_provider
143
159
  provider = AWSAuth.DefaultAWSCredentialsProviderChain.new()
144
160
  if @access_key and @secret_key
145
161
  provider = BasicCredentialsProvider.new(AWSAuth.BasicAWSCredentials.new(@access_key, @secret_key))
146
162
  end
147
163
  if @role_arn
148
- provider = AWSAuth.STSAssumeRoleSessionCredentialsProvider.new(provider, @role_arn, "logstash-output-kinesis")
164
+ provider = create_sts_provider(provider, @role_arn)
149
165
  end
150
166
  provider
151
167
  end
@@ -156,7 +172,7 @@ class LogStash::Outputs::Kinesis < LogStash::Outputs::Base
156
172
  provider = BasicCredentialsProvider.new(AWSAuth.BasicAWSCredentials.new(@metrics_access_key, @metrics_secret_key))
157
173
  end
158
174
  if @metrics_role_arn
159
- provider = AWSAuth.STSAssumeRoleSessionCredentialsProvider.new(provider, @metrics_role_arn, "logstash-output-kinesis")
175
+ provider = create_sts_provider(provider, @metrics_role_arn)
160
176
  end
161
177
  provider
162
178
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-kinesis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: java
6
6
  authors:
7
7
  - Sam Day
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-14 00:00:00.000000000 Z
11
+ date: 2015-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core