Skip to content

Conversation

tiago-loureiro
Copy link
Contributor

Currently, the URIs that we hand out to clients to download asset point to an AWS endpoint, namely a S3 or a Cloudfront URL.

In the context of self hosting, and in case users want to host S3 "internally" using minio.io for instance, there should be a publicly addressable URL that cargohold can give out so that they are reachable from the outside world. For instance, let's say that we have the HTTPS endpoint at wire-https.foo.bar and cargohold is configured to talk to a self hosted minio.io at http://fake-s3:9000; obviously these URLs are not useful for clients. Instead, one would need to make an endpoint available at https://wire-fake-s3.foo.bar which simply proxies requests to minio.io.

In order to try this out yourselves, you can set fake-s3 to localhost on your machines.

@neongreen
Copy link
Contributor

So where will the actual rewriting happen?

@tiago-loureiro
Copy link
Contributor Author

tiago-loureiro commented Oct 7, 2018

So where will the actual rewriting happen?

It happens when we sign the URL for downloads, i.e. here: https://github.com/wireapp/wire-server/blob/develop/services/cargohold/src/CargoHold/S3.hs#L181-L182

@neongreen
Copy link
Contributor

You can push an empty commit to re-trigger the CI.

@tiago-loureiro tiago-loureiro merged commit fdbf843 into develop Oct 8, 2018
@tiago-loureiro tiago-loureiro deleted the cargohold-custom-download-link branch October 8, 2018 15:25
king6cong pushed a commit to king6cong/wire-server that referenced this pull request Oct 12, 2018
@fisx fisx mentioned this pull request Oct 25, 2018
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.

2 participants