-
Notifications
You must be signed in to change notification settings - Fork 201
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
feat(sdk): add signed url #4065
Conversation
Stumbled on it while reading the docs and think it reads a bit better without the additional "a". - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [x] Docs updated (only required for features) - [x] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
@subh-cs FYI. |
Hey @kavinpanneer - can you please change the PR title according to these guidelines? Also - the PR description has 2 checklists - can you please delete one and add a description of what your PR does? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The biggest part to be addressed is the signedUrl for the sim. Currently, it doesn't block access after expiring time, one way to solve it is
1- Create an express server to serve the publicUrl & signedUrl files, There is an issue with that, I'll attach the link soon,
2- In the signedUrl method, calculate the time it will be expired and hash it along in the key
3- Create an endpoint to serve the files- it should decode the URL to extract the key and expiry time, if the key was deleted already or the Date.now()
is bigger than the expiry date- throw an error, otherwise serve the file (serving a deleted file should be added to the test)
Sorry for making the issue a bit more complicated, If you can think of an alternative approach, let me know :)
Also, please let me know if any help is needed!
Edit: decided to move the sim implementation to: #4143, so just the other little comments and you're ready to go!
I talked to @revitalbarletz, and we decided to decrease the scope of the task a little bit- so this issue will be for implementing the wing/examples/tests/sdk_tests/bucket/public_url.w Lines 17 to 19 in 57a67cf
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are the few changes should be done, although I'm open discuss different approaches.
Co-authored-by: Subhodip Roy <75121304+subh-cs@users.noreply.github.com>
Co-authored-by: Subhodip Roy <75121304+subh-cs@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ready! 👏 👏 👏
let's take care of the merge conflict :)
(I'm checking if the tests pass on aws and will review again shortly)
@kavinpanneer it seems like you need to run |
Co-authored-by: Tsuf Cohen <39455181+tsuf239@users.noreply.github.com>
This reverts commit 77df9a8.
Signed-off-by: monada-bot[bot] <monabot@monada.co>
Signed-off-by: monada-bot[bot] <monabot@monada.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! Great job!!
Thanks for contributing, @kavinpanneer! This PR will now be added to the merge queue, or immediately merged if |
Congrats! 🚀 This was released in Wing 0.34.14. |
Stumbled on it while reading the docs and think it reads a bit better without the additional "a".
pr/e2e-full
label if this feature requires end-to-end testingBy submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.
Checklist
pr/e2e-full
label if this feature requires end-to-end testingBy submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.