-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improvements regarding signed URLs #380
Conversation
URL signing is a way to protect files from unauthorized access with a | ||
key in the URL instead of HTTP header based authorization. The URL | ||
signing key is similar to a password and its inclusion in the URL allows | ||
to download files using simple GET requests supported by a wide range of | ||
programs, e.g. web browsers or download managers. Back-ends are | ||
responsible to generate the URL signing keys and to manage their | ||
appropriate expiration. The back-end MAY indicate an expiration time by | ||
setting the `expires` property. | ||
|
||
setting the `expires` property in the reponse. Requesting this endpoint |
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 would add a recommendation that the expiry time should be order of minutes/hours "to give clients enough time to download all assets, while still mitigating the security risk.
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.
Hmm... I'm not sure how high the security risk is actually. Google uses signed URLs for Docs, Spreadsheets etc. and they seem to not expire at all.
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.
a difference is that the google doc user can stop sharing a doc (invalidate the signed url)
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.
Yes, that is what issue #341 has been opened for.
After pondering some more on this, some thoughts:
I know, the tin foil hat factor of these points is quite high, and it's probably not urgent to tackle these the moment, but it might become a problem in the future. |
As also stated above, I'm not sure how high the security risk is actually, so I'm not sure this is actually required.
I assume that could make sense, but that would need to be tracked in a new issue for 2.0 (breaking for clients).
The wording we add here doesn't necessarily mean that previous signed URLs get invalid, it just means expired links will be renewed. Revoking signed URLs is a different issue: #341 We may decide that re-requesting this endpoint also invalidates previously generated signed URLs, but currently that's not the intention yet. |
I didn't know about #341 , that should indeed tackle most of the concerns raised here. |
Well, to give some background: the current implementation that @laxiwuka is working on for the VITO backend does not allow invalidation (there is no storage, just an added hash in the URL based on a secret to check that the URL hasn't been tampered with). #341 requires more work (because of persistent storage involved) than other alternatives (that do not require persistent storage or state) I am exploring here:
|
Yes, good to merge this already. |
Solves issue #379