Skip to content

Commit cdca981

Browse files
authored
RFC: Optionally sign public S3 URLs (#166)
1 parent 8a76163 commit cdca981

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ See [mechanics](mechanics.md) for more detail.
5757
| RFC#153 | [remove the email validation for metadata.owner](rfcs/0153-remove-email-validation-for-metadata-owner.md) |
5858
| RFC#154 | [Migrate Taskcluster to postgres](rfcs/0154-Migrate-taskcluster-to-postgres.md) |
5959
| RFC#155 | [Create an object service](rfcs/Create-object-service.md) |
60+
| RFC#166 | [Sign Public S3 URLs](rfcs/0166-Sign-public-S3-urls.md) |

rfcs/0166-Sign-public-S3-urls.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# RFC 166 - Sign Public S3 URLs
2+
* Comments: [#166](https://github.com/taskcluster/taskcluster-rfcs/pull/166)
3+
* Proposed by: @ricky26
4+
5+
# Summary
6+
7+
At the moment, there are two S3 artifact buckets: one for public artifacts and
8+
one for private artifacts. We will introduce a deploy-time parameter which
9+
configures whether URL signing is used for the public artifacts bucket.
10+
11+
## Motivation
12+
13+
This is primarily targeted at private installations of Taskcluster. As part of
14+
running a private Taskcluster installation, it would be ideal to have no
15+
publicly accessible S3 buckets.
16+
17+
At the moment, the public bucket needs to be exposed globally as we redirect to
18+
public S3 URLs. For the private bucket, we avoid this requirement by using S3
19+
signed URLs.
20+
21+
We already have two code paths for artifact URLs and this would just mean always
22+
using signed URLs in private Taskcluster installations.
23+
24+
# Details
25+
Signed S3 URLs have a drawback compared to public URLs: they have an expiry
26+
time. Introducing this change will lead to a situation where artifact URLs
27+
fetched for public artifacts from a Taskcluster installation with this flag will
28+
expire whereas otherwise they would not.
29+
30+
Implementation:
31+
- Introduce a new deploy-time variable used to determine whether to sign all
32+
S3 URLs.
33+
- `queue.sign_public_artifact_urls` in the deployment config
34+
- `SIGN_PUBLIC_ARTIFACT_URLS` in the environment
35+
- `signPublicArtifactUrls` in the app config
36+
- Change `replyWithArtifact` to use `createSignedUrl` if the artifact is in a
37+
public bucket and `signPublicArtifactURLs` is true.
38+
39+
As it stands, this will disable the CDN and the cache for most requests made for
40+
public artifacts. There are some mitigations for these but they are expected to
41+
be considered as later additions rather than part of this RFC:
42+
- Round the current time used to generate signed requests to produce
43+
the same URL more frequently.
44+
- Implement CloudFront signed URL generation and use it when possible.
45+
46+
These downsides will only affect installations using signed URLs everywhere.
47+
48+
# Implementation
49+

rfcs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@
4545
| RFC#153 | [remove the email validation for metadata.owner](0153-remove-email-validation-for-metadata-owner.md) |
4646
| RFC#154 | [Migrate Taskcluster to postgres](0154-Migrate-taskcluster-to-postgres.md) |
4747
| RFC#155 | [Create an object service](Create-object-service.md) |
48+
| RFC#166 | [Sign Public S3 URLs](0166-Sign-public-S3-urls.md) |

0 commit comments

Comments
 (0)