-
Notifications
You must be signed in to change notification settings - Fork 8
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
Nextcloud OCM compatibility #42
Comments
Nextcloud still doesn't include token in a PROPFIND and we reach a blocker after:
|
Not sure I see the relation with #39574 |
@MahdiBaghbani can you please add more context and how we reproduce this? @ArtificialOwl the relation is with the original issue: we need to prove that Nextcloud as a client is able to access an OCM share by only using OCM-compliant operations (e.g., the PROPFIND must include the shared secret as username, and an empty password) against a non-Nextcloud server. |
i'll have a look, I thought your compatibility issues were only on the discovery endpoint |
I had linked the full list in my submission of the original issue (not on a PC now to be able to post it here too) |
can I still get details on how to reproduce the issue on this app ? |
Today I couldn't do it, I'll make a detailed report in the coming week. |
I've checked the logs again, Nextcloud doesn't include a Token. Successful scenario: owncloud2 requesting the shared file:
owncloud1 receiving:
Nextcloud scenario: nextcloud2 requesting the share:
nextcloud1 receiving the request:
reva on nextcloud1 side:
|
@ArtificialOwl I understand it's not easy to follow those logs, and also running this app with the required infra does involve a bit of tinkering. A way for you to analyze what happens is to look at the traffic generated by Nextcloud as client, i.e. all the calls where the
The last two calls are a deal breaker:
I guess that when you test against a second Nextcloud server, somehow the connection works thanks to the fall-back or other mechanism, but ultimately without respecting the OCM spec. To validate that the access follows the specs you really have to trace the requests served by the remote server. |
Is there some details so I can easily reproduce your issue ? I cannot find enough information in reva's documentation to have it running for nextcloud Maybe we can arrange a call ? |
@ArtificialOwl would you be able to trace the HTTP traffic served by Nextcloud ? All details you need are in my previous comment: any HTTP request different from the OK ones above is a violation of the OCM protocol. You don't need Reva, it would be cumbersome for you to set it up properly to test such scenario, and you ought to be able to understand that your server respects the protocol even when connecting to another Nextcloud - you could e.g. temporarily disable the In principle we could arrange a call but in first approximation you should be able to get some logs without any additional info. As an alternative to a call I could offer you an OCM share served by CERNBox (Reva), which does respect the OCM protocol and does NOT offer the |
I have setup 2 nextcloud on differents server, to helps with the logs, the requests and their origin IPs. From my point of view, it fits the OCM API defined as v1.0 and the sharedSecret is transferred in the protocol entry.
If you want to arrange a call, please send me an invitation at [email protected] (any day, after 11:30 AM, UTC+2) |
Hello Maxence, thanks for this check. Have you got a chance to test the share I sent you by email? We will double check that we're running the top of the branch from nextcloud/server#39574. |
The behavior we observe, compared to your logs from In fact, why do you execute a first
This seems like a redundant call, only the second one is the proper OCM-compliant call. |
Hello, I have received your mail, but I think the main purpose of OCM is to provide, during the creation of a share between instances, a discovery service that set an endpoint to manage the exchange of information about the way to access (protocol, here webdav + token) the shared document. What is happening after the exchange of the token is not supposed to be related to OCM, right ? |
From a user perspective, the access to the remote share must be part of the package. Otherwise, how do we ensure interoperability? The OCM specs do include, on top of the discovery service (the Can we please address this? |
The PROPFIND from your logs returns a 207, which might explain why the second request with token is not sent. The best would be a fully configured reva, would it be on your servers, or a working docker I can run on mine. |
Hi @ArtificialOwl, I think that PROPFIND with 207 is not what we are looking at here. I guess that's instance2 doing a call to itself. please correct me if I'm mistaken. As you have said: when the share is accepted on instance2:
On NC -> Reva
you see that after first 401, unile NC->NC it doesn't retry with a PROPFIND + Secret and goes straight into |
That's why I have sent you a share on a live system, https://sm1.cernbox.cern.ch, where you can test the scenario |
To better show what happens when accessing Reva as remote, as the logs are not very clear, this is what Nextcloud executes:
The first is the "useless" PROPFIND without token, which also fails for Nextcloud. The path is correctly extracted from The PROPFIND that returns 207 in your logs is the correct one, with the token, except that it is never called by Nextcloud. The questions are still:
|
This is coming from the auth digest defined in RFC2617 that we usually set for our curl request. I will see if this is considered safe enough by other engineers to set the auth as basic only when running those specific requests
It called when it seems that the share is not available/deleted and that the remote host have a I will make a new patch that will remove the non-auth request on the webdav so you can run more tests. |
So, I added a new commit 8436359babe37542e59c0de2089be8a1cf6d896e to nextcloud/server#39574 that should remove the first please keep me updated of your new tests |
As also discussed by email, I confirm that worked, and I could see successful calls in my server logs. Hopefully using basic auth straight for the PROPFIND is ok as anyway that's how it ends up working - so it's as safe as the previous implementation. I have one more comment though: now that a federated share was established, I see that Nextcloud probes my server at |
My browser was open on the shared folder, and no cache is set. usually result from ocm-provider is cached for about 24h |
ok, good to know. Meanwhile we tested NC from the top of your branch and I confirm it worked. |
@MahdiBaghbani there is a residual issue with uploads in this scenario, but I believe this is on us and to be tracked separately. I'm closing this issue now. |
Tracking the Nextcloud status in this issue.
Related PR: nextcloud/server#39574
The text was updated successfully, but these errors were encountered: