enable signature auth in public share auth middleware #2831
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added signature authentication to the public share auth middleware.
Motivation and Context
To support archive downloads in password protected public links we need some way to authenticate the requests.
We can't provide the password via the
Authorization
header because the download is triggered via browser mechanisms like<a href=
and not viafetch
orXmlHttpRequests
.Here the public share signature comes into play. To support archive downloads you can take the
signature
andexpiration
parameters from a filesdownloadURL
and append them to the archive download url.This could look like this:
There are some drawbacks though, like if there are no files, only folders, in the current PROPFIND response then you don't have access to the signature and expiration. One way to solve that could be to add one or two new attributes to the PROPFIND root where we would add the signature and expiration. This way these values would always be present and accessible. Though this would divert from the behavior in ownCloud 10.
/cc @fschade
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: