Skip to content

Direct Download Link for Up- and Download - Was "Broker" #12286

Closed

Description

@karlitschek

Let´s track the Broker requirements and the progress here

Activity

  1. karlitschek commented on Nov 19, 2014

    @karlitschek
    ContributorAuthor
  2. DeepDiver1975 commented on Nov 19, 2014

    @DeepDiver1975
    Contributor

    Is this the direct download link for the client?

  3. karlitschek commented on Nov 19, 2014

    @karlitschek
    ContributorAuthor

    Yes. Download and upload

  4. DeepDiver1975 commented on Nov 19, 2014

    @DeepDiver1975
    Contributor

    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 ....

  5. karlitschek commented on Nov 19, 2014

    @karlitschek
    ContributorAuthor

    Sure

  6. added this to the milestone on Nov 20, 2014
  7. DeepDiver1975 commented on Nov 20, 2014

    @DeepDiver1975
    Contributor

    Yes. Download and upload

    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 ....

  8. karlitschek commented on Nov 21, 2014

    @karlitschek
    ContributorAuthor

    Sure. I´m a big fan of doing things in small steps :-)

  9. ogoffart commented on Nov 24, 2014

    @ogoffart

    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.

  10. DeepDiver1975 commented on Nov 24, 2014

    @DeepDiver1975
    Contributor

    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 .....)
  11. LukasReschke commented on Nov 24, 2014

    @LukasReschke
    Contributor

    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 ;-)

  12. karlitschek commented on Nov 24, 2014

    @karlitschek
    ContributorAuthor

    @LukasReschke yes, this is what it is :-)

  13. karlitschek commented on Nov 24, 2014

    @karlitschek
    ContributorAuthor

    @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

  14. karlitschek commented on Nov 24, 2014

    @karlitschek
    ContributorAuthor

    Http should also cover s3 and swift

  15. 10 remaining items

  16. karlitschek commented on Nov 24, 2014

    @karlitschek
    ContributorAuthor

    I agree with @guruz

  17. icewind1991 commented on Nov 24, 2014

    @icewind1991
    Contributor

    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)

  18. karlitschek commented on Nov 24, 2014

    @karlitschek
    ContributorAuthor

    @icewind1991 true. The idea is that the storage backend handles this somehow. The password could a a one time password for example

  19. DeepDiver1975 commented on Nov 24, 2014

    @DeepDiver1975
    Contributor

    (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.

  20. changed the title [-]Broker[/-] [+]Direct Download Link for Up- and Download - Was "Broker"[/+] on Nov 24, 2014
  21. DeepDiver1975 commented on Dec 2, 2014

    @DeepDiver1975
    Contributor

    @karlitschek @MTRichards can I ask you for the requested feedback as of above? THX

  22. MTRichards commented on Dec 2, 2014

    @MTRichards
    Contributor

    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.

  23. karlitschek commented on Dec 2, 2014

    @karlitschek
    ContributorAuthor

    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.

  24. DeepDiver1975 commented on Dec 3, 2014

    @DeepDiver1975
    Contributor

    Ok - swift and s3 first.

    I'll take care to coordinate this with the client teams.

  25. DeepDiver1975 commented on Dec 3, 2014

    @DeepDiver1975
    Contributor

    Ok - swift and s3 first.

    I'll take care to coordinate this with the client teams.

    @dragotin @danimo @ogoffart @guruz

    Please share your thoughts/ideas regarding integration of C/C++ SDKs for SWIFT and S3 protocols. THX

  26. DeepDiver1975 commented on Dec 3, 2014

    @DeepDiver1975
    Contributor

    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

    https://cloud.example.com/remote.php/direct/{fileId}
    

    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
  27. DeepDiver1975 commented on Jan 7, 2015

    @DeepDiver1975
    Contributor

    closed within the scope of oc8 - we will continue in OC8.1 #13149

  28. locked as resolved and limited conversation to collaborators on Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions