Skip to content

Commit bafabea

Browse files
MrPrimatejsvd
authored andcommitted
Add more S3 bucket ACLs
1 parent 5f9518f commit bafabea

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/index.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ output {
6464
size_file => 2048 (optional) - Bytes
6565
time_file => 5 (optional) - Minutes
6666
codec => "plain" (optional)
67-
canned_acl => "private" (optional. Options are "private", "public-read", "public-read-write", "authenticated-read". Defaults to "private" )
67+
canned_acl => "private" (optional. Options are "private", "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write". Defaults to "private" )
6868
}
6969

7070

@@ -79,7 +79,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
7979
| <<plugins-{type}s-{plugin}-access_key_id>> |<<string,string>>|No
8080
| <<plugins-{type}s-{plugin}-aws_credentials_file>> |<<string,string>>|No
8181
| <<plugins-{type}s-{plugin}-bucket>> |<<string,string>>|Yes
82-
| <<plugins-{type}s-{plugin}-canned_acl>> |<<string,string>>, one of `["private", "public-read", "public-read-write", "authenticated-read"]`|No
82+
| <<plugins-{type}s-{plugin}-canned_acl>> |<<string,string>>, one of `["private", "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write"]`|No
8383
| <<plugins-{type}s-{plugin}-encoding>> |<<string,string>>, one of `["none", "gzip"]`|No
8484
| <<plugins-{type}s-{plugin}-prefix>> |<<string,string>>|No
8585
| <<plugins-{type}s-{plugin}-proxy_uri>> |<<string,string>>|No
@@ -150,7 +150,7 @@ S3 bucket
150150
[id="plugins-{type}s-{plugin}-canned_acl"]
151151
===== `canned_acl`
152152

153-
* Value can be any of: `private`, `public-read`, `public-read-write`, `authenticated-read`
153+
* Value can be any of: `private`, `public-read`, `public-read-write`, `authenticated-read`, `aws-exec-read`, `bucket-owner-read`, `bucket-owner-full-control`, `log-delivery-write`
154154
* Default value is `"private"`
155155

156156
The S3 canned ACL to use when putting the file. Defaults to "private".

lib/logstash/outputs/s3.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
# size_file => 2048 (optional) - Bytes
7373
# time_file => 5 (optional) - Minutes
7474
# codec => "plain" (optional)
75-
# canned_acl => "private" (optional. Options are "private", "public-read", "public-read-write", "authenticated-read". Defaults to "private" )
75+
# canned_acl => "private" (optional. Options are "private", "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write". Defaults to "private" )
7676
# }
7777
#
7878
class LogStash::Outputs::S3 < LogStash::Outputs::Base
@@ -124,7 +124,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
124124
config :restore, :validate => :boolean, :default => true
125125

126126
# The S3 canned ACL to use when putting the file. Defaults to "private".
127-
config :canned_acl, :validate => ["private", "public-read", "public-read-write", "authenticated-read"],
127+
config :canned_acl, :validate => ["private", "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write"],
128128
:default => "private"
129129

130130
# Specifies wether or not to use S3's server side encryption. Defaults to no encryption.

spec/outputs/s3_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
describe "Access control list" do
4747
context "when configured" do
48-
["private", "public-read", "public-read-write", "authenticated-read"].each do |permission|
48+
["private", "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write"].each do |permission|
4949
it "should return the configured ACL permissions: #{permission}" do
5050
s3 = described_class.new(options.merge({ "canned_acl" => permission }))
5151
expect(s3.upload_options).to include(:acl => permission)

0 commit comments

Comments
 (0)