fluent-plugin-kinesis 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 48189e937b18e7a7ab26165826394ffb37db0f3d
4
- data.tar.gz: 2cc691c0c3f6f57b7472f61edc689b99d8955677
3
+ metadata.gz: 46273afe8f8e8fa0f70931b1f2bbf1893df30256
4
+ data.tar.gz: 55beac91c0b19714355e901ed256dbf16210a930
5
5
  SHA512:
6
- metadata.gz: 0a8d48c3ed01e845ab675b4242f5441af5a8a361f8d557d9bab58be7e8d378900c20f50c9dcb93b1e79863254d3c2e15907e9ed9d06ece30de47a92bda7455f6
7
- data.tar.gz: 3f5556e659c9889efd3f5d47c0482ed31f0bc185e91ae3acf9831d8edd38616e553b16d577f5063abee06a5b143932c5487fcfe28d3a8c389a88ff9ba20029b7
6
+ metadata.gz: 57f4784a5c00763fb358de48d74d161815a90a466f4e8afe895b91485bae1db6a6eba84b994def1ddf6a90f9a60742ac63b4abd91d1fa9eda16d360bb5c0db02
7
+ data.tar.gz: a5b6e7769c7ddce92bd9ee27e603c7bfbe41ac3a53d032b12b5edf30522a1eb98f70e54a75dee6ec33dd8a197f8af8effd3d373a0c98c9bb709e67ecd0d947a0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.1
4
+
5
+ - Bug fix - Instance profile credentials expiring [#58](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/58)
6
+
3
7
  ## 1.0.0
4
8
 
5
9
  To support Firehose and KPL, this was refactored and added more tests.
data/README.md CHANGED
@@ -431,7 +431,7 @@ Verify the endpoint's certificate. Do not disable unless using [**custom_endpoin
431
431
  Default: `true`
432
432
 
433
433
  #### credentials_refresh_delay
434
- Interval seconds for refreshing credentials seding to KPL.
434
+ Interval milliseconds for refreshing credentials seding to KPL.
435
435
 
436
436
  Defalut 5000
437
437
 
@@ -49,4 +49,6 @@ Gem::Specification.new do |spec|
49
49
  spec.add_development_dependency "dummer", ">= 0.4.0"
50
50
  spec.add_development_dependency "rubyzip", ">= 1.0.0"
51
51
  spec.add_development_dependency "mocha", ">= 1.1.0"
52
+ spec.add_development_dependency "webmock", ">= 1.24.2"
53
+ spec.add_development_dependency "fakefs", ">= 0.8.1"
52
54
  end
@@ -16,23 +16,23 @@ module Fluent
16
16
  module KinesisHelper
17
17
  module Credentials
18
18
  def credentials
19
- case
20
- when @assume_role_credentials
21
- Aws::AssumeRoleCredentials.new(
22
- client: Aws::STS::Client.new(region: @region),
23
- role_arn: @assume_role_credentials.role_arn,
24
- external_id: @assume_role_credentials.external_id,
25
- role_session_name: 'aws-fluent-plugin-kinesis',
26
- duration_seconds: 60 * 60,
27
- )
28
- when @shared_credentials
29
- Aws::SharedCredentials.new(
30
- profile_name: @shared_credentials.profile_name,
31
- path: @shared_credentials.path,
19
+ @provider ||= case
20
+ when @assume_role_credentials
21
+ Aws::AssumeRoleCredentials.new(
22
+ client: Aws::STS::Client.new(region: @region),
23
+ role_arn: @assume_role_credentials.role_arn,
24
+ external_id: @assume_role_credentials.external_id,
25
+ role_session_name: 'aws-fluent-plugin-kinesis',
26
+ duration_seconds: 60 * 60,
32
27
  )
33
- else
34
- default_credentials_provider
35
- end
28
+ when @shared_credentials
29
+ Aws::SharedCredentials.new(
30
+ profile_name: @shared_credentials.profile_name,
31
+ path: @shared_credentials.path,
32
+ )
33
+ else
34
+ default_credentials_provider
35
+ end
36
36
  end
37
37
 
38
38
  private
@@ -44,7 +44,7 @@ module Fluent
44
44
  if provider.nil?
45
45
  raise Fluent::ConfigError, "You must specify credentials on ~/.aws/credentials, environment variables or IAM role for default credentials"
46
46
  end
47
- provider.credentials
47
+ provider
48
48
  end
49
49
  end
50
50
  end
@@ -13,5 +13,5 @@
13
13
  # permissions and limitations under the License.
14
14
 
15
15
  module FluentPluginKinesis
16
- VERSION = '1.0.0'
16
+ VERSION = '1.0.1'
17
17
  end
@@ -158,7 +158,7 @@ module KinesisProducer
158
158
  def update_credentials
159
159
  add(make_set_credentials_message)
160
160
  add(make_set_metrics_credentials_message) if @metrics_credentials
161
- sleep @credentials_refresh_delay
161
+ sleep(@credentials_refresh_delay.to_f/1000)
162
162
  end
163
163
 
164
164
  def make_configuration_message
@@ -183,9 +183,9 @@ module KinesisProducer
183
183
  def make_set_credential_message(credentials, for_metrics = false)
184
184
  return nil if credentials.nil?
185
185
  cred = KinesisProducer::Protobuf::Credentials.new(
186
- akid: credentials.access_key_id,
187
- secret_key: credentials.secret_access_key,
188
- token: credentials.session_token
186
+ akid: credentials.credentials.access_key_id,
187
+ secret_key: credentials.credentials.secret_access_key,
188
+ token: credentials.credentials.session_token
189
189
  )
190
190
  set_credentials = KinesisProducer::Protobuf::SetCredentials.new(credentials: cred, for_metrics: for_metrics)
191
191
  make_message(FixnumMax, :set_credentials, set_credentials)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kinesis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-18 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -240,6 +240,34 @@ dependencies:
240
240
  - - ">="
241
241
  - !ruby/object:Gem::Version
242
242
  version: 1.1.0
243
+ - !ruby/object:Gem::Dependency
244
+ name: webmock
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: 1.24.2
250
+ type: :development
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: 1.24.2
257
+ - !ruby/object:Gem::Dependency
258
+ name: fakefs
259
+ requirement: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ version: 0.8.1
264
+ type: :development
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: 0.8.1
243
271
  description:
244
272
  email:
245
273
  executables: []