jointakahe / takahe

An ActivityPub/Fediverse server
BSD 3-Clause "New" or "Revised" License
1.1k stars 84 forks source link

Allow non-HTTPS connection to S3 storage #655

Closed ghost closed 8 months ago

ghost commented 8 months ago

At present, the protocol used to connect to an S3 media backend is hardcoded to HTTPS:

https://github.com/jointakahe/takahe/blob/2f546dfa74e38fab5bf47a2f4da04e6008010fd7/takahe/settings.py#L445

I have deployed Takahe in k8s, with S3 storage provided by rook-ceph, so network traffic between Takahe and the S3 backend is over a private network. This is a legitimate use case for HTTP, but it is not currently possible to specify this in the Takahe settings.

andrewgodwin commented 8 months ago

Hmm, that is an interesting use case. I don't think normal S3 allows non-HTTPS access for most things, so it's probably safe to allow a protocol to be specified?

ghost commented 8 months ago

If there are no objections, shall I submit a PR?

andrewgodwin commented 8 months ago

Yes, go for it - I would suggest adding an option for s3-insecure:// as a protocol that Takahē understands for the media URL and then doing the setup based on that.

andrewgodwin commented 8 months ago

Implemented in #658.