owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.41k stars 184 forks source link

[OCM] sharee cannot access the federation shares via normal webdav paths #10536

Closed saw-jan closed 1 week ago

saw-jan commented 1 week ago

Steps to reproduce

  1. Create a federation share of a folder (remoteFolder)
  2. as sharee, try to do PROPFIND
    
    curl -XPROPFIND 'https://ocis-server:9200/remote.php/dav/files/admin/Shares/remoteFolder' -uadmin:admin -vk

curl -XPROPFIND 'https://ocis-server:9200/remote.php/dav/spaces/{shares-space-id}/remoteFolder' -uadmin:admin -vk

```bash
< HTTP/1.1 404 Not Found

But the share is accessible using mount-point-id and remote-item-id

# mount-point-id
curl -XPROPFIND 'https://ocis-server:9200/remote.php/dav/spaces/89f37a33-858b-45fa-8890-a1f2b27d90e1$6953d7bc-1c57-4f2a-8977-10bdfbcb2ff6' -uadmin:admin -vk

# remote-item-id
curl -XPROPFIND 'https://ocis-server:9200/remote.php/dav/spaces/89f37a33-858b-45fa-8890-a1f2b27d90e1$6953d7bc-1c57-4f2a-8977-10bdfbcb2ff6!Lw%3D%3D' -uadmin:admin -vk
< HTTP/1.1 207 Multi-Status

Since this is a remote share, maybe the behaviour is expected.

Related: https://github.com/owncloud/web/issues/11753 Web using remote id: https://github.com/owncloud/web/pull/11758

ScharfViktor commented 1 week ago

I can confirm. cc @rhafer

rhafer commented 1 week ago
curl -XPROPFIND 'https://ocis-server:9200/remote.php/dav/files/admin/Shares/remoteFolder' -uadmin:admin -vk

curl -XPROPFIND 'https://ocis-server:9200/remote.php/dav/spaces/{shares-space-id}/remoteFolder' -uadmin:admin -vk

Both of these can only work for "normal" user and group shares. As requests to these paths are handled by the sharestorageprovider. Federated shares are handled by a different storageprovider.

AFAICS there is currently no way to list received ocm shares via webdav (or access them by mount path). You can get the id via sharedWithMe on the graph service (like web does)

curl -k -u moss:vista  'https://ocis-federation.owncloud.test/graph/v1beta1/me/drive/sharedWithMe'

Then take the id values of the embedded remoteItem.

saw-jan commented 1 week ago

yes, remoteItem id from sharedWithMe and mount-point id from me/drives both work. If this is expected and there will be no further improvements/changes, then we can close this one.