|
| 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 | + |
0 commit comments