Skip to content

Conversation

@cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented Apr 5, 2024

closes: #3255

Share File URL now points to Console to facilitate sharing the url in case MinIO endpoint is not exposed.

Changes:

  • Update how we return the share url pointing now to Object Browser API instead of MinIO endpoint
  • Adds new endpoint to validate share link url (base64encoded) and download file
  • unittests to validate url

How it looks:
Screenshot 2024-04-05 at 2 49 32 PM

When url expired:
Screenshot 2024-04-05 at 2 50 58 PM

Test steps:

With an existing bucket, folder and objects.

  • Click share file
  • Copy and paste the new url in the browser
  • The url should contain same url as Object browser
  • Object should be downloaded
  • Test injecting wrong urls (base64encoded)
  • Should return error or forbidden errors if url doesn't point to internal MinIO server

@cesnietor cesnietor self-assigned this Apr 5, 2024
@cesnietor cesnietor marked this pull request as ready for review April 5, 2024 22:02
bexsoft
bexsoft previously approved these changes Apr 9, 2024
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Tested in local env as well as making a custom MinIO build with this fix.

@prakashsvmx
Copy link
Member

prakashsvmx commented Apr 9, 2024

@cesnietor , Do we still need to limit the number of hours as in the screenshot?

Also the subpath based console ui seems to show the minio server url . is this fine?

image

@cesnietor
Copy link
Collaborator Author

cesnietor commented Apr 9, 2024

@cesnietor , Do we still need to limit the number of hours as in the screenshot?

@prakashsvmx yes we still need to do the hour limitation since the url is signed with that expiration.

based console ui seems to show the minio server url

@prakashsvmx it's fine if the new url is using the subpath. Or do you mean the encoded minIO url is using the subpath? could you please give me an example? or what do you mean?

@cesnietor cesnietor requested a review from harshavardhana April 9, 2024 17:22
Copy link
Member

@prakashsvmx prakashsvmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

Make ShareLink URL point to Console instead to MinIO Server

4 participants