fluent-plugin-s3 0.8.6 → 0.8.7

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: 17add9c31857c6ce80237346cd1d1c9b04228c42
4
- data.tar.gz: 8fc1df453d0a0ba8c2cee043c8ed5de2082ab12a
3
+ metadata.gz: 9d13dd2a15a01b18147a2772eb8204e77cd5a17e
4
+ data.tar.gz: 4d5155d27eedb6393b53c13b0de02d8c59208c46
5
5
  SHA512:
6
- metadata.gz: 05a92ebf96c7817dd19bbb7804e58352eb502a02387e3d78de4743a2f2725ed13c97b6c00e8956d1c7db47a112d6f54888daf6e17a365a38cdb0e65cae5237c2
7
- data.tar.gz: 24a208b805572239fe1844a8218a7b96c86585bddbc8fc160ddb610cd9bb1a979f212947ca126a6ee8d4d3e5d7d99e1b4aaa43a52c29699a6913b37e9b4c9707
6
+ metadata.gz: cad1c888c86a2b79b347b31245b6d14805c9df93c77a48968e5ce8a8d20de4227b536c941dd203bc78ad7d11029f28af9589c147a1a556959c499110c31b5675
7
+ data.tar.gz: 39ce697d7361c6a73b49ad3bda2a2accea94a8ca5ab69af8bf6cdcb07e82d98740bfdd9fa21531545fe10ddab6ab369ff4e52121174673f9ea57e33a94053bf2
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ Release 0.8.7 - 2017/10/27
2
+
3
+ * out_s3: support for granting a permission to a canonical user id
4
+
5
+
1
6
  Release 0.8.6 - 2017/10/11
2
7
 
3
8
  * out_s3: specified s3_object_key_format is applied when check_object is false
data/README.md CHANGED
@@ -299,6 +299,39 @@ To use cross-account access, you will need to create a bucket policy granting
299
299
  the specific access required. Refer to the [AWS
300
300
  documentation](http://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example3.html) for examples.
301
301
 
302
+ **grant_full_control**
303
+
304
+ Allows grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
305
+ This is useful for cross-account access using IAM roles.
306
+
307
+ Valid values are `id="Grantee-CanonicalUserID"`. Please specify the grantee's canonical user ID.
308
+
309
+ e.g. `id="79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be"`
310
+
311
+ Note that a canonical user ID is different from an AWS account ID.
312
+ Please refer to [AWS documentation](https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html) for more details.
313
+
314
+ **grant_read**
315
+
316
+ Allows grantee to read the object data and its metadata.
317
+ Valid values are `id="Grantee-CanonicalUserID"`. Please specify the grantee's canonical user ID.
318
+
319
+ e.g. `id="79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be"`
320
+
321
+ **grant_read_acp**
322
+
323
+ Allows grantee to read the object ACL.
324
+ Valid values are `id="Grantee-CanonicalUserID"`. Please specify the grantee's canonical user ID.
325
+
326
+ e.g. `id="79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be"`
327
+
328
+ **grant_write_acp**
329
+
330
+ Allows grantee to write the ACL for the applicable object.
331
+ Valid values are `id="Grantee-CanonicalUserID"`. Please specify the grantee's canonical user ID.
332
+
333
+ e.g. `id="79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be"`
334
+
302
335
  **hex_random_length**
303
336
 
304
337
  The length of `%{hex_random}` placeholder. Default is 4 as written in
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.6
1
+ 0.8.7
@@ -100,6 +100,14 @@ module Fluent
100
100
  config_param :format, :string, :default => 'out_file'
101
101
  desc "Permission for the object in S3"
102
102
  config_param :acl, :string, :default => nil
103
+ desc "Allows grantee READ, READ_ACP, and WRITE_ACP permissions on the object"
104
+ config_param :grant_full_control, :string, :default => nil
105
+ desc "Allows grantee to read the object data and its metadata"
106
+ config_param :grant_read, :string, :default => nil
107
+ desc "Allows grantee to read the object ACL"
108
+ config_param :grant_read_acp, :string, :default => nil
109
+ desc "Allows grantee to write the ACL for the applicable object"
110
+ config_param :grant_write_acp, :string, :default => nil
103
111
  desc "The length of `%{hex_random}` placeholder(4-16)"
104
112
  config_param :hex_random_length, :integer, :default => 4
105
113
  desc "Overwrite already existing path"
@@ -278,6 +286,10 @@ module Fluent
278
286
  put_options[:sse_customer_key] = @sse_customer_key if @sse_customer_key
279
287
  put_options[:sse_customer_key_md5] = @sse_customer_key_md5 if @sse_customer_key_md5
280
288
  put_options[:acl] = @acl if @acl
289
+ put_options[:grant_full_control] = @grant_full_control if @grant_full_control
290
+ put_options[:grant_read] = @grant_read if @grant_read
291
+ put_options[:grant_read_acp] = @grant_read_acp if @grant_read_acp
292
+ put_options[:grant_write_acp] = @grant_write_acp if @grant_write_acp
281
293
  @bucket.object(s3path).put(put_options)
282
294
 
283
295
  @values_for_s3_object_chunk.delete(chunk.unique_id)
@@ -142,6 +142,16 @@ EOC
142
142
  assert_match /#{Socket.gethostname}/, d.instance.path
143
143
  end
144
144
 
145
+ def test_configure_with_grant
146
+ conf = CONFIG.clone
147
+ conf << "\grant_full_control id='0123456789'\ngrant_read id='1234567890'\ngrant_read_acp id='2345678901'\ngrant_write_acp id='3456789012'\n"
148
+ d = create_driver(conf)
149
+ assert_equal "id='0123456789'", d.instance.grant_full_control
150
+ assert_equal "id='1234567890'", d.instance.grant_read
151
+ assert_equal "id='2345678901'", d.instance.grant_read_acp
152
+ assert_equal "id='3456789012'", d.instance.grant_write_acp
153
+ end
154
+
145
155
  def test_path_slicing
146
156
  config = CONFIG.clone.gsub(/path\slog/, "path log/%Y/%m/%d")
147
157
  d = create_driver(config)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-11 00:00:00.000000000 Z
12
+ date: 2017-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  requirements: []
171
171
  rubyforge_project:
172
- rubygems_version: 2.6.11
172
+ rubygems_version: 2.6.13
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: Amazon S3 output plugin for Fluentd event collector