Skip to content
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

can't access public link resources with spaces webdav API #3085

Closed
SagarGi opened this issue Feb 2, 2022 · 9 comments
Closed

can't access public link resources with spaces webdav API #3085

SagarGi opened this issue Feb 2, 2022 · 9 comments

Comments

@SagarGi
Copy link
Member

SagarGi commented Feb 2, 2022

Description

Using the new WebDAV API, public link resources are accessed using the link token. But it cannot be performed using the spaces WebDAV since we do not have a proper user to request for the spaceid.

Question

  • Is there any way to access public link resources by public users using the spaces WebDAV API?
  • If not will this feature ever be implemented?
@stale
Copy link

stale bot commented Apr 3, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status:Stale label Apr 3, 2022
@phil-davis
Copy link
Contributor

@SagarGi please check if this is still a problem. If so, then we can add a tag so that the bot does not try to close this.

I guess that a public link should be able to be created and used on a resource in a space!

@stale stale bot removed the Status:Stale label Apr 4, 2022
@SagarGi
Copy link
Member Author

SagarGi commented Apr 5, 2022

@phil-davis for a public accessing the public link for the resource, the space id still cannot be created (when public make a request using spaces WebDav API)

for the below request

When the public lists the resources in the last created public link with depth "0" using the WebDAV API

It says

getPersonalSpaceIdForUser webdav propfind for user cbDEADiQdnFCPsL failed with status 401 - so the personal space id cannot be discovered

@phil-davis
Copy link
Contributor

@SagarGi I wonder why the test code has to try to find a space-id?

I thought that the "last created public link" would have a path like:
http://172.17.0.1:8080/index.php/s/5kNPEAXJgpYCo58

And that accessing that when accessing that "magic string" 5kNPEAXJgpYCo58 "share", the server will do whatever it needs to do in the back-end to find the resources(s) that are part of the public link (find the relevant space...)

I guess it is not relevant/useful for "the public" to discover public links by browsing space-ids and then browsing in the space to find public links that are offered for resources in the space. That would be a breach of public link security - a member of "the public" really has to know the "magic string" like 5kNPEAXJgpYCo58 to be allowed access to the resource(s).

So we should adjust such tests - probably just delete the examples for "public links using spaces webDAV API"?

@micbar or anyone - is my analysis correct?

@SagarGi
Copy link
Member Author

SagarGi commented Apr 5, 2022

@phil-davis i also think it is not relevant for the public as space-id is for a user. we have actually added spaces examples in some suites probably regarding this issue.

@stale
Copy link

stale bot commented Jun 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status:Stale label Jun 10, 2022
@phil-davis
Copy link
Contributor

@butonic @micbar or? cc @individual-it

We have the long-time-existing WebDAV endpoints which have a way to access public links using the public link token (and optional password, if set).

Going forward, will those remain the only ways to access a public link?

The public link may be a share of a "personal" resource, that is in the user's personal space, which has the personal space id of that user. The public link may be a share of a resource in a "project" space, which has a space id that different from any user.

Will there be any ways to access public links somehow via the "spaces" concept and endpoints?

@micbar
Copy link
Contributor

micbar commented Jul 13, 2022

Is there any way to access public link resources by public users using the spaces WebDAV API?

They can only be accessed via the WebDAV endpoint with the link token.

example URL

https://ocis.ocis-traefik.latest.owncloud.works/remote.php/dav/public-files/BjNhZgrkZTWJHej

There are no plans to change this in the future.

@stale
Copy link

stale bot commented Sep 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants