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

Make ShareLink URL point to Console instead to MinIO Server #3255

Closed
cesnietor opened this issue Mar 7, 2024 · 8 comments · Fixed by #3284
Closed

Make ShareLink URL point to Console instead to MinIO Server #3255

cesnietor opened this issue Mar 7, 2024 · 8 comments · Fixed by #3284
Assignees
Labels
community enhancement New feature or request

Comments

@cesnietor
Copy link
Collaborator

Currently whenever we want to share a file, the share url contains a default url which if for some reason is not reacheable by the browser it will fail to access it.

The proposal is to make Console handle the GET of the object instead of sending them to MinIO server.
That way it doesn't matter what the MinIO server DNS is, since you can already access Console.

Right now:
Screenshot 2024-03-06 at 5 27 54 PM

Expected Behavior

Share url uses console backend url and port
Use some other endpoint e.g. https://play.min.io:9443/api/v1/get-file/cestest/file-s2.txt?X-Amz-Algorithm=A...

Current Behavior

Share url uses 127.0.0.1 url

Steps to Reproduce (for bugs)

  1. Add an Object
    2.Click on an object
  2. Click on Share File
@bexsoft
Copy link
Collaborator

bexsoft commented Mar 15, 2024

Steps Required:

  • Create local endpoint under console to receive share requests
  • Create a method where we can review the presigned key from share file to validate if request is valid
  • Get the file as if we were in local download through Console UI.

@ravindk89
Copy link
Contributor

To clarify - @harshavardhana @bexsoft based on internal conversations, would this remove the need for us to use MINIO_SERVER_URL at all?

I've seen two user reports from community about having issues when using that envvar, vs not using it at all and simply specifying the FQDN of console to --console-address.

@cesnietor
Copy link
Collaborator Author

cesnietor commented Apr 8, 2024

No @ravindk89 we still need that to communicate with MinIO, this is just sending the share files to console instead of MinIO.

@ravindk89
Copy link
Contributor

Thanks - I thought we had, at one point, discussed behavior where Console would always talk to MinIO over localhost? Or is that the case, and the MINIO_SERVER_URL necessary when MinIO TLS certs do not cover localhost?

@dberardo-com
Copy link

is it possible to generate this URL programmatically, example from the CLI or from the Kubernetes Operator ?

@prakashsvmx
Copy link
Member

prakashsvmx commented May 17, 2024

you can use mc share or any sdk https://github.com/minio/minio-go to generate presigned url

@dberardo-com
Copy link

and can those link be permanent ? as in, never expire ?

@prakashsvmx
Copy link
Member

never expire ?

No.. it is as per s3 Max 7 days

A presigned URL remains valid for the period of time specified when the URL is generated. If you create a presigned URL with the Amazon S3 console, the expiration time can be set between 1 minute and 12 hours. If you use the AWS CLI or AWS SDKs, the expiration time can be set as high as 7 days.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html

for non expiring links, you can use mc anonymous to set bucket policy to download so any object can be accessed with direct link like: <http://host/bucket/object>

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

Successfully merging a pull request may close this issue.

5 participants