cloudfoundry / diego-notes

Diego Notes
Apache License 2.0
23 stars 7 forks source link

Hardcoded auth parameters in DesiredLRPs #26

Closed onsi closed 9 years ago

onsi commented 9 years ago

The droplet download URLs hardcode the basicauth username and password.

This is bad. It is a two-fold concern: security (one user/pass to rule them all) and, more importantly it's a disaster in hiding:

A deploy that modifies these credentials will fail catastrophically - the CC will roll and the subsequent Cell deployment will fail (new containers won't be able to download their droplets).

An Idea

  1. We teach the DownloadStep about HTTP headers.
  2. The CC creates a random token when the droplet is uploaded and associates this token with the app.
  3. We add an internal unprotected endpoint that one can use to download droplets. You must provide the correct random token as a header to fetch the droplet.

Pros:

Cons:

onsi commented 9 years ago

@sykesm makes the excellent point that this is basically just a non-expiring signed URL. Will add a story to that effect.

onsi commented 9 years ago

Added https://www.pivotaltracker.com/story/show/93733722