-
Notifications
You must be signed in to change notification settings - Fork 479
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
add pre-get hook #483
add pre-get hook #483
Conversation
* Add azure-storage-blob-go dependency * Implement Azure BlobStorage store * Add AzureStore Mock test * Refactor Blob interfaces to use uppercase fields * Refactor and remove the Create function When getting the offset, and we get the status code BlobNotFound, we can say the offset is 0, and start from the beginning * Update the mock * Refactor error checking of GetOffset to actually check the service code * Begin testing azurestore * Write more tests * New feature allows to set access type on new containers and blob access tier * Write more docs * Upgrade azure-storage-blob-go to v0.13.0 * Remove AzError, not needed * Update link to container access type information * Remove ?toc from link in comments * Remove trailing spaces from workflow * Run tests with go1.15 and 1.16 * Don't fail fast This lets all other tests complete, and makes it easier to see if it's just a one-off fail, or on different OSes and versions * Remove darwin 386 from `build_all.sh` script Removed in go1.15 golang/go#37610 * Update go version in `Dockerfile` * Compile for Apple Silicone (darwin arm64) Only go1.16 supports it
The current version Go 1.12 is too old, so Heroku does not compile tusd anymore: https://github.com/tus/tusd/runs/3886723478 We use Go 1.16 and not 1.17 because we always support the two latest major releases.
…s#507) * fix digitalocean spaces fetch * remove log * remove log * remove info.Size check * Add comment * Delete .gitignore Co-authored-by: Marius <marius.kleidl@gmail.com>
* Only determine object type based on name after last separator * modify test to keep in mind directory prefixes with underscores in them * update documentation to reflect support of underscores in gcs object prefix
Thank you for the PR and apologies for my delayed response! I can see the value of a Such a system is more complex to implement but would serve more use cases. What do you think? |
See tus#480 Squashed commit of the following: commit 7439fd84a6103afdedaf94701a65ce4376789380 Author: Marius <marius@transloadit.com> Date: Mon Oct 18 00:27:12 2021 +0200 Docs and test commit 16d9dc67e8c8eefc328b1ce12d7e7ca01a49f9f6 Merge: bae0ffb bea5183 Author: Marius <marius@transloadit.com> Date: Mon Oct 18 00:23:13 2021 +0200 Merge branch 'head_header_check' of https://github.com/s3rius/tusd into s3rius-head_header_check commit bea5183 Author: Pavel Kirilin <win10@list.ru> Date: Thu May 20 19:53:36 2021 +0400 Fixed "Tus-Resumable" header check for HEAD request. Signed-off-by: Pavel Kirilin <win10@list.ru>
Hello! Yes this PR is trying to address the lack of content access control
how is this different from the
could you give some examples or the use cases? I think that |
rebased with master branch and some further changes:
apologies for the commits mess 😅 maybe we can close and re-create the branch/PR |
There are also other scenarios besides the GET request where a user accesses an upload. For example, the HEAD request where a user can get the file size, type and meta data. Such requests should also go through an access control system. Therefore, I think it's a bit weird if we have a system to check access before GET requests but not HEAD or PATCH requests. Having said that, I think it would be beneficial to talk about how such a system should be implemented before we jump straight into code. Does that make sense?
I used authentication in the meaning of access control. Maybe I should have said authorization or something else. However, the idea is that tusd invokes a hook, which then returns where a given request is allowed to access a specific upload. |
Agreed, I understand the need for a unified hook, some points to discuss:
|
That sounds all very good!
I think it would make sense to invoke them after the upload information has been retrieved. This avoids invoking the hook if the upload does not exist while also making the hook more useful. However, I am currently working on a larger refactoring of the entire hook system in #516. There is not much there yet, but I want to make it easier to define response headers and the response body from a hook. Since that would be very useful for this work here, I think it makes sense to wait until that refactoring has been done. |
sounds good! thanks, we can close this one then and create an issue to document the requirements when possible
not sure about this one, if there's no authorization it should not return a 404 just not authorized imho |
Superseeded by #1077, which implements a similar mechanism, which is not restricted to downloads. |
following up on #431
not sure if this feature would be welcomed, please advice @Acconut