You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Direct Download Link for Up- and Download - Was "Broker" #12286
Ok - please keep Klaas and myself in the loop. We have talked about this the past days as this was subject of discussions with our friends here in Switzerland ....
Hmm - can we do this in small steps and first start with download?
I'm assuming we already get enough to work on to get download properly working under all circumstances (various protocols and various auth mechanisms in addition to the fact that in some cases direct download will not be allowed (e.g. with enabled encryption)).
Furthermore with upload the logic is not longer straight forward with respect to chunking, encryption, general hooks processing and so on ....
Here is what the desktop client does already in mirall 1.7:
Mirall understands two new webdav properties in the http://owncloud.org/ns namespace:
dDU: stands for "direct download URL" and is just an url that points to the file, it needs to be an url specific for this version of this file (that etag)
dDC: stands for "direct download Cookie" and is the cookies that will be sent with the GET request. That is just the raw cookie header (example: 541bf4fc82bd8=8ebbl4istpe83qk3o70dak2647) and it replaces any other cookies.
Notes:
We don't read the etag from the GET reply, the etag has to be the one that was sent in the propfind and the file must not have changed.
We don't issue Ranges header to resume when direct URL is used (because the server we implemented this feature for did not support it)
(Don't blame me for the name of the properties, that's how it is)
Of course, everything can be changed. But this is how it is in mirall 1.7 if we want to keep compatibility with it.
Thinking about the great variety of external systems we support we need to enhance this a bit:
support of multiple protocols (ftp, sftp, samba, swift, s3 ....)
each protocol comes with it's own way of authentication (user and password @LukasReschke questionable from a sec pov I guess, cookies, oauth headers, for S3 it would be some kind of secret+key .....)
I actually don't quite get what this broker feature is about - I assume it should allow clients to upload to the storage backend directly instead piping it through ownCloud?
Can't comment on something that I don't know what it is about. Let me comment on that once we have a specification ready ;-)
@DeepDiver1975 I think we can concentrate on http with basic auth for now. The providing the right link and credentials is in the responsibility of the storage backend
Another issue with authentication is that the user should not always have full access to the storage, if an admin sets up a webdav mount for a user which is restricted to a subfolder on the webdav server we cant simply give the client authentication info for the webdav server (whether it be a cookie or user/pw)
(mirall supports URL + HTTP cookie at the moment. Maybe it's better to focus on backends that can do this before trying to be super generic and never finishing the feature. I don't know what the requirements for the broker where. It's an optional feature after all)
Besides using owncloud via a dav mount there is no single backend which allows cookies - and as per pure webdav spec we even should not allow session cookies - this is not really an option from my pov.
Regarding "super generic and never finished" - we better think about what we want to have/want before implementing something we can throw away later.
The password could a a one time password for example
One time password will require a second call as described above.
@karlitschek@MTRichards can we define a list of storages that we want to support? Attached to the items we should have a priority/release assignment. And then we search for a storage specific solution which holds some freedom of extensibility.
Hmm. not sure FTP, Sharepoint CIFS will work. We would have to implement the corresponding protocols in our clients. But even then this won´t work because they are usually firewalled and not accessible via the internet.
So I suggest to start with focusing on http protocols like SWIFT and S3. And let´s also keep in mind the custom backend that are used be certain education institutions.
In the first implementation the direct download link (for s3 and swift backends) will contain an link to the owncloud instance itself which will generate a temporary/one time access token.
The final target url will be generated and returned as redirect to the client - the client will follow the redirect accordingly.
Furthermore in case the redirected url is unreachable or the owncloud server returns with an error (e.g. token could not be generated) the client shall fallback to the regular webdav based download.
This approach will work as long as tokens can be generated.
There is no need to add any additional libraries in the client.
We have to think about a solution for systems where no token can be generated (for whatever reason).
let's generate explicit tickets now for
S3 - generating token on GET
SWIFT - generating token on GET
mirall - allow redirect on direct download link @guruz
Activity
karlitschek commentedon Nov 19, 2014
@icewind1991
DeepDiver1975 commentedon Nov 19, 2014
Is this the direct download link for the client?
karlitschek commentedon Nov 19, 2014
Yes. Download and upload
DeepDiver1975 commentedon Nov 19, 2014
Ok - please keep Klaas and myself in the loop. We have talked about this the past days as this was subject of discussions with our friends here in Switzerland ....
karlitschek commentedon Nov 19, 2014
Sure
DeepDiver1975 commentedon Nov 20, 2014
Hmm - can we do this in small steps and first start with download?
I'm assuming we already get enough to work on to get download properly working under all circumstances (various protocols and various auth mechanisms in addition to the fact that in some cases direct download will not be allowed (e.g. with enabled encryption)).
Furthermore with upload the logic is not longer straight forward with respect to chunking, encryption, general hooks processing and so on ....
karlitschek commentedon Nov 21, 2014
Sure. I´m a big fan of doing things in small steps :-)
ogoffart commentedon Nov 24, 2014
Here is what the desktop client does already in mirall 1.7:
Mirall understands two new webdav properties in the
http://owncloud.org/nsnamespace:dDU: stands for "direct download URL" and is just an url that points to the file, it needs to be an url specific for this version of this file (that etag)dDC: stands for "direct download Cookie" and is the cookies that will be sent with the GET request. That is just the raw cookie header (example:541bf4fc82bd8=8ebbl4istpe83qk3o70dak2647) and it replaces any other cookies.Notes:
Of course, everything can be changed. But this is how it is in mirall 1.7 if we want to keep compatibility with it.
DeepDiver1975 commentedon Nov 24, 2014
Thinking about the great variety of external systems we support we need to enhance this a bit:
LukasReschke commentedon Nov 24, 2014
I actually don't quite get what this broker feature is about - I assume it should allow clients to upload to the storage backend directly instead piping it through ownCloud?
Can't comment on something that I don't know what it is about. Let me comment on that once we have a specification ready ;-)
karlitschek commentedon Nov 24, 2014
@LukasReschke yes, this is what it is :-)
karlitschek commentedon Nov 24, 2014
@DeepDiver1975 I think we can concentrate on http with basic auth for now. The providing the right link and credentials is in the responsibility of the storage backend
karlitschek commentedon Nov 24, 2014
Http should also cover s3 and swift
10 remaining items
karlitschek commentedon Nov 24, 2014
I agree with @guruz
icewind1991 commentedon Nov 24, 2014
Another issue with authentication is that the user should not always have full access to the storage, if an admin sets up a webdav mount for a user which is restricted to a subfolder on the webdav server we cant simply give the client authentication info for the webdav server (whether it be a cookie or user/pw)
karlitschek commentedon Nov 24, 2014
@icewind1991 true. The idea is that the storage backend handles this somehow. The password could a a one time password for example
DeepDiver1975 commentedon Nov 24, 2014
Besides using owncloud via a dav mount there is no single backend which allows cookies - and as per pure webdav spec we even should not allow session cookies - this is not really an option from my pov.
Regarding "super generic and never finished" - we better think about what we want to have/want before implementing something we can throw away later.
One time password will require a second call as described above.
@karlitschek @MTRichards can we define a list of storages that we want to support? Attached to the items we should have a priority/release assignment. And then we search for a storage specific solution which holds some freedom of extensibility.
[-]Broker[/-][+]Direct Download Link for Up- and Download - Was "Broker"[/+]DeepDiver1975 commentedon Dec 2, 2014
@karlitschek @MTRichards can I ask you for the requested feedback as of above? THX
MTRichards commentedon Dec 2, 2014
I think the real question is what sorts of external storage solutions can support this approach.
Clearly SWIFT and S3 make sense, so I would start there.
After that, can you get something like this from FTP, SharePoint and CIFS/Windows Network Drives? That would be great...but not sure it is possible.
karlitschek commentedon Dec 2, 2014
Hmm. not sure FTP, Sharepoint CIFS will work. We would have to implement the corresponding protocols in our clients. But even then this won´t work because they are usually firewalled and not accessible via the internet.
So I suggest to start with focusing on http protocols like SWIFT and S3. And let´s also keep in mind the custom backend that are used be certain education institutions.
DeepDiver1975 commentedon Dec 3, 2014
Ok - swift and s3 first.
I'll take care to coordinate this with the client teams.
DeepDiver1975 commentedon Dec 3, 2014
@dragotin @danimo @ogoffart @guruz
Please share your thoughts/ideas regarding integration of C/C++ SDKs for SWIFT and S3 protocols. THX
DeepDiver1975 commentedon Dec 3, 2014
In the first implementation the direct download link (for s3 and swift backends) will contain an link to the owncloud instance itself which will generate a temporary/one time access token.
Sample direct download url
The final target url will be generated and returned as redirect to the client - the client will follow the redirect accordingly.
Furthermore in case the redirected url is unreachable or the owncloud server returns with an error (e.g. token could not be generated) the client shall fallback to the regular webdav based download.
This approach will work as long as tokens can be generated.
There is no need to add any additional libraries in the client.
We have to think about a solution for systems where no token can be generated (for whatever reason).
let's generate explicit tickets now for
DeepDiver1975 commentedon Jan 7, 2015
closed within the scope of oc8 - we will continue in OC8.1 #13149