Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Enable Proxy S3 Data #75

Closed
maltegrosse opened this issue Aug 3, 2022 · 10 comments
Closed

Feature Request: Enable Proxy S3 Data #75

maltegrosse opened this issue Aug 3, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@maltegrosse
Copy link

Hi,
in order to avoid exposing s3 bucket to the public, a simple (optional) proxy would be nice:

e.g. https://github.com/maltegrosse/go-minio-indexer/blob/master/controllers/list.go#L30

@Forceu
Copy link
Owner

Forceu commented Aug 3, 2022

Buckets should be set to private, therefore no further proxy is required https://gokapi.readthedocs.io/en/latest/setup.html#cloudstorage

@Forceu Forceu closed this as completed Aug 3, 2022
@Forceu Forceu added the invalid This doesn't seem right label Aug 3, 2022
@maltegrosse
Copy link
Author

all right, thanks for the feedback - got your idea. the idea was just to not provide any public bucket endpoint.

@MalteMagnussen
Copy link

@Forceu - Can we reopen this?

Our company S3 is apparently closed off to anyone not "inside" our network.

So if I want to allow end-users (customers) who are not on our VPN to download files, it doesn't work.

Fx with our internal mozilla/send deployment, which is also backed by our S3, it is downloading through the app:

Screenshot from 2024-05-24 11-32-20

But we can't use mozilla/send, because it is discontinued, and even the timvisee version is not supported very well.

We also don't want anyone to be able to upload files in the version we expose to customers. Only the employees should be able to upload files, get a link, and send that link to customers. That's why we chose Gokapi :)

But sadly now I discover that our S3 is totally private, and that GoKapi isn't proxying the download through itself.

Is there any way we can make the download go "through" GoKapi instead of being directed to S3?

Screenshot from 2024-05-24 11-25-38

@Forceu Forceu reopened this May 24, 2024
Forceu added a commit that referenced this issue May 24, 2024
@Forceu
Copy link
Owner

Forceu commented May 24, 2024

That was quite an easy addition as well. Added in fe3616f, Gokapi will proxy the download now if the env variable GOKAPI_AWS_PROXY_DOWNLOAD is set to true, or the entry ProxyDownload in cloudconfig.yml is set to true.

I will leave this open, as I will add this option to the setup UI as well, and close the issue once it is added.

@MalteMagnussen
Copy link

@Forceu - Thank you very much.

What a G.

hope you have a great weekend man

@Forceu Forceu added enhancement New feature or request and removed invalid This doesn't seem right labels May 24, 2024
Forceu added a commit that referenced this issue May 26, 2024
… setup #165, added option to proxy downloads from s3 to setup #75, rewording in setup
@Forceu
Copy link
Owner

Forceu commented May 26, 2024

Added in 97368ca

@Forceu Forceu closed this as completed May 26, 2024
@MalteMagnussen
Copy link

MalteMagnussen commented Jun 13, 2024

@Forceu - We finally got a public URL for the gokapi service for the company. So now I can access the site, even while off VPN.

So if I disable my VPN (can no longer access our S3 instance) and try to download a file via the site, it just hangs. It is trying to access the S3 bucket directly from "my connection" instead of "gokapi's connection" if that makes sense.

I thought fe3616f would allow the user to download the file "through" gokapi. So if they had access to Gokapi, but not the S3 instance, they could still download files.

This is probably a bad explanation, but I hope you understand what I mean.

I assumed the application would passthru (much like proxying) the data stream within the code and just 'serve' the file itself

@Forceu
Copy link
Owner

Forceu commented Jun 14, 2024

Have you enabled the setting in the setup? By default it is turned off

@MalteMagnussen
Copy link

@Forceu - haha, good question. I think so, but let me double-check on monday, just to be safe.

@MalteMagnussen
Copy link

MalteMagnussen commented Jun 17, 2024

@Forceu - Now it works! Thanks for making me double-check.

I had set it as an env variable, but that wasn't working (maybe I did it wrong).

Changing cloudconfig.yml to this config is now working:

aws:
    Bucket: redacted
    Region: us-east-1
    KeyId: redacted
    KeySecret: redacted
    Endpoint: redacted
    ProxyDownload: true  # <-- added this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants