Skip to content

Don't set a public-read ACL on deployed files - #37

Merged
ericmj merged 1 commit into
mainfrom
drop-public-read-acl
Oct 9, 2026
Merged

ericmj merged 1 commit into
mainfrom
drop-public-read-acl

Conversation

@ericmj

@ericmj ericmj commented Oct 9, 2026

Copy link
Copy Markdown
Member

The hexdocs buckets now use uniform bucket-level access (staging since https://github.com/hexpm/hexpm-ops/pull/459, prod next), and Cloud Storage rejects uploads that set an object ACL on those buckets with 400 Cannot insert legacy ACL for an object when uniform bucket-level access is enabled, so the next deploy would fail at the upload step. The buckets also enforce public access prevention, which blocks publicRead.

The ACL isn't needed: Fastly reads the bucket with its own HMAC key and an objectViewer grant, not as a public reader. After staging.hexdocs.pm switched, hexdocs.css and sitemap.xml were still served with x-cache: MISS, MISS, so Fastly fetched them from the bucket. An upload to staging.hexdocs.pm with --predefined-acl=publicRead failed with the 400 above, and the same upload without it succeeded.

The hexdocs buckets use uniform bucket-level access, which rejects uploads that set an object ACL, and enforce public access prevention. Fastly reads them with its own key, so the files don't need to be public.
@ericmj
ericmj merged commit 6c0cde5 into main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant