Skip to content

Commit

Permalink
S3: support disabling ACL with none value
Browse files Browse the repository at this point in the history
This change lets you disable ACL when using S3 by using a configuration
value of `none`. This way we maintain backward compatibility with the
default setting being `private`.

Fixes: #1067
  • Loading branch information
wadey authored and randombenj committed Jun 22, 2022
1 parent f61514e commit c9f5763
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ List of contributors, in chronological order:
* Chuan Liu (https://github.com/chuan)
* Samuel Mutel (https://github.com/smutel)
* Russell Greene (https://github.com/russelltg)
* Wade Simmons (https://github.com/wadey)
2 changes: 1 addition & 1 deletion man/aptly.1
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ bucket name
.
.TP
\fBacl\fR
(optional) assign ACL to published files (one of the canned ACLs in Amazon terminology)\. Useful values: \fBprivate\fR (default) or \fBpublic\-read\fR (public repository)\. Public repositories could be consumed by \fBapt\fR using HTTP endpoint (Amazon bucket should be configured for "website hosting"), for private repositories special apt S3 transport is required\.
(optional) assign ACL to published files (one of the canned ACLs in Amazon terminology)\. Useful values: \fBprivate\fR (default), \fBpublic\-read\fR (public repository) or \fBnone\fR (don\(cqt set ACL)\. Public repositories could be consumed by \fBapt\fR using HTTP endpoint (Amazon bucket should be configured for "website hosting"), for private repositories special apt S3 transport is required\.
.
.TP
\fBawsAccessKeyID\fR, \fBawsSecretAccessKey\fR
Expand Down
4 changes: 2 additions & 2 deletions man/aptly.1.ronn.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ and associated settings:
no prefix (bucket root)
* `acl`:
(optional) assign ACL to published files (one of the canned ACLs in Amazon
terminology). Useful values: `private` (default) or `public-read` (public
repository). Public repositories could be consumed by `apt` using
terminology). Useful values: `private` (default), `public-read` (public
repository) or `none` (don't set ACL). Public repositories could be consumed by `apt` using
HTTP endpoint (Amazon bucket should be configured for "website hosting"),
for private repositories special apt S3 transport is required.
* `awsAccessKeyID`, `awsSecretAccessKey`:
Expand Down
2 changes: 2 additions & 0 deletions s3/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func NewPublishedStorageRaw(
) (*PublishedStorage, error) {
if defaultACL == "" {
defaultACL = "private"
} else if defaultACL == "none" {
defaultACL = ""
}

if storageClass == "STANDARD" {
Expand Down

0 comments on commit c9f5763

Please sign in to comment.