pondersource / sciencemesh-php

Connect your Nextcloud server to Sciencemesh
MIT License
0 stars 1 forks source link

issue accepting share from mesh.pondersource.org (NC) to cloud.pondersource.com (OC-10) #219

Open michielbdejong opened 1 year ago

michielbdejong commented 1 year ago
michielbdejong commented 1 year ago

reproduced this again just now

michielbdejong commented 1 year ago

For starters, I'm seeing that the share is added to oc_share_external with https://remote.php/dav/ocm as the remote. This is the share as it gets sent reva-to-reva:


Sending OCM /shares POST to https://mesh.pondersource.com/ocm/shares: 
{"shareWith":"einstein@mesh.pondersource.com",
"name":"org-to-com",
"description":"","providerId":"\"2\"",
"owner":"einstein@mesh.pondersource.org","sender":"einstein@mesh.pondersource.org",
"ownerDisplayName":"","senderDisplayName":"einstein","shareType":"user","expiration":0,
"resourceType":"folder","protocol":{"name":"multi","options":{},"webdav":
{"sharedSecret":"3AM8uirucmdbzOLxj8xCRcJ6fnPhVvTi","permissions":["read"],
"url":"remote.php/dav/ocm/3AM8uirucmdbzOLxj8xCRcJ6fnPhVvTi"}}}
michielbdejong commented 1 year ago

Weird, I was expecting it to send https://github.com/cs3org/reva/blob/sciencemesh-testing/pkg/ocm/client/client.go#L159-L170

michielbdejong commented 1 year ago

Ah wait! It's actually protocol.webdav.url so that comes from elsewhere.

michielbdejong commented 1 year ago

Maybe it's related to https://github.com/cs3org/ocm-test-suite/blob/main/servers/revad/sciencemesh1.toml#L97 ?

michielbdejong commented 1 year ago

Fixed in https://github.com/cs3org/ocm-test-suite/commit/c1d8b4cb8a1a803fc392d5e21f63ea2aa43ec1c8!


 2023-06-16 09:54:47.698 DBG ../reva/pkg/ocm/client/client.go:200 > Sending OCM /shares POST to https://mesh.pondersource.com/ocm/shares: {"shareWith":"einstein@mesh.pondersource.com","name":"org-to-com","description":"","providerId":"\"3\"","owner":"einstein@mesh.pondersource.org","sender":"einstein@mesh.pondersource.org","ownerDisplayName":"","senderDisplayName":"einstein","shareType":"user","expiration":0,"resourceType":"folder","protocol":{"name":"multi","options":{},"webdav":{"sharedSecret":"cZsNFR35mTAkzZ2vUv9CytSLjc52TyZ9","permissions":["read"],"url":"https://mesh.pondersource.org/remote.php/dav/ocm/cZsNFR35mTAkzZ2vUv9CytSLjc52TyZ9"}}}
michielbdejong commented 1 year ago

Next problem:

"Backends provided no user object for cZsNFR35mTAkzZ2vUv9CytSLjc52TyZ9", where "cZsNFR35mTAkzZ2vUv9CytSLjc52TyZ9" is the token.

michielbdejong commented 1 year ago

Also, before that,


2023-06-16 09:56:08.07 ERR ../reva/internal/grpc/services/ocminvitemanager/ocminvitemanager.go:326 > 
error fetching remote user details error=
"error: not found: einstein" pid=333525 pkg=rgrpc traceid=523255cd0ecff7fe5fbe7e065452e35b
michielbdejong commented 1 year ago

There's also a 500 error somewhere coming from NC when authenticating the token as if it is a username, split that out to #221

michielbdejong commented 1 year ago

Ah! It's because of unkown@unkown:


 2023-06-16 10:13:25.898 INF ../reva/internal/grpc/services/ocminvitemanager/ocminvitemanager.go:320 > 
GetAcceptedUser unknown at unknown pid=334210 pkg=rgrpc traceid=64664d7eaa1e6eaded97cd4ba9c3e81e                                                                                                                                                                                                                                                                                       
2023-06-16 10:13:25.898 ERR ../reva/internal/grpc/services/ocminvitemanager/ocminvitemanager.go:329 > 
error fetching remote user details error="error: not found: einstein" pid=334210 pkg=rgrpc traceid=64664d7eaa1e6eaded97cd4ba9c3e81e                                                                                                                                                                                                                                                    
michielbdejong commented 1 year ago

Fixed! Next issue:


2023-06-16 10:46:01.862 WRN ../reva/internal/grpc/interceptors/auth/auth.go:129 > 
access token is invalid 
error="error: permission denied: 
access to resource not allowed within the assigned scope" pid=334478 pkg=rgrpc traceid=b572941d3553cc7d87842736c74ad1a4
michielbdejong commented 1 year ago
internal/grpc/interceptors/auth/scope.go:61 > Extracting scope from token

internal/grpc/interceptors/auth/scope.go:91 > Token scope is not ok
internal/grpc/interceptors/auth/scope.go:93 > Done extracting scope from token
internal/grpc/interceptors/auth/auth.go:129 > access token is invalid
error="error: permission denied: 
access to resource not allowed within the assigned scope"
gmgigi96 commented 1 year ago

@michielbdejong Can you provide us some more logs?

michielbdejong commented 1 year ago

-> breaking this issue out to https://github.com/cs3org/reva/issues/3988