-
Notifications
You must be signed in to change notification settings - Fork 11
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
Document current translation that happens for webdav #70
Comments
It happens in https://github.com/nextcloud/server/blob/2eab2ffa22451851601d68bd73e0285a8803990e/apps/files_sharing/lib/External/Storage.php#L88 for instance So the URL is https://nc1.docker/public.php/webdav/ and the token as the user, with empty password. The /public.php/webdav/ comes from https://nc1.docker/ocm-provider ["resourceTypes"][0]["protocols"]["webdav"] |
From nc2.docker:
|
So it's:
|
Thanks Michiel for this input. A few more things to clarify:
|
|
Eventually, we have learned "the hard way" that both OC and NC do query the OCS stands for Open Collaboration Services, a standard that predates OCM.
An example of a full payload from NC:
|
Keeping the issue open for now until we have incorporated those findings |
An update following our latest tests and findings from @mirekys. It appears that neither OC10 nor NC are respecting the above algorithm, and include bits of hardcoded paths e.g. here for OC and Indeed, a Nextcloud server appears to make the following calls (where
An ownCloud 10 server appears to make the following calls:
|
For OC, I've tried to track down webdav endpoint discovery paths here: https://codimd.web.cern.ch/tAkryD79RYiq4QS3-y_Rtw. That hardcoded webdav protocol paths are basically used in OC/NC's responses to But other way around, when a remote federated share is added, atleast for OC, it tries to query share remote host for webdav endpoint path, and stores the result in ownCloud's in-memory cache (if enabled & configured). That flow also uses
(unless 'PHPUNIT_RUN' env variable is set) Is there anything else specific that we should try to track down and focus on? The whole federatedfilessharing app seems to be a lot to make a sense of |
Just to be sure: did you intend In both cases, we tried to expose the path correctly but OC10 used a malformed URL:
So at least OC10 is not hardcoding
I guess @michielbdejong and/or Mahdi are looking at a full reverse engineering of the code path used to access a remote share. Possibly easier with OC10 - we need to understand where that extra |
I meant it first tries
I think I can see what is the problem here...it expects webdav protocol field to contain just a path, not a full url. In your case, you should try exposing it like:
The additional |
That's what we thought too, and I did change /ocm-provider to expose just the path (hacking my nginx in front of Reva). I will change Reva for good, but that remains unexplained. |
Update: the nginx hack obviously confused OC as now with the patched |
I'm a bit embarrassed that I don't know this by heart but I'm just experimentally observing how to access a webdav share from say nc1.docker. I see my nc2.docker make requests like:
PROPFIND
https://nc1.docker/remote.php/dav/files/einstein/asdf/qwer/asdfAnd with a
'requesttoken' => '2oCY+AwkE9BKYBynQflAS+G4RnQcU3yyHgkewQblqNw=:q6v2ikhhSZR+I1aTcL0kGNjgCxUrfBSHcH5Q8ESPza8='
header (I'm still figuring out if this is what carries the sharedSecret and if so, how this is put into what looks like two base64-encoded strings).I see https://nc1.docker/ocm-provider advertises https://nc1.docker/remote.php/webdav/ as the webdav root so I think that was then redirected to https://nc1.docker/remote.php/dav/
I'll get to the bottom of this so we can add it to the spec.
The text was updated successfully, but these errors were encountered: