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

Propfind should deliver dedicated StorageId property #3345

Closed
AlexAndBear opened this issue Mar 18, 2022 · 6 comments
Closed

Propfind should deliver dedicated StorageId property #3345

AlexAndBear opened this issue Mar 18, 2022 · 6 comments
Labels

Comments

@AlexAndBear
Copy link
Contributor

Is your feature request related to a problem? Please describe.

For various reasons, we need the storageId, which is assigned to a File in the WebUI.

Currently, it might occur in the FileId, which consists of storageId:fileId.
This is not the case if you do a propfind on the trash bin or spaces trash bin.

Therefore it would be good to have the possibility to retrieve the storageId on all propfinds via a dedicated property.

Describe the solution you'd like

Add a storageID DAV property

@AlexAndBear AlexAndBear added the Category:Enhancement Add new functionality label Mar 18, 2022
@C0rby
Copy link
Contributor

C0rby commented Mar 18, 2022

@butonic, do you see any problems with introducing an extra property for the storage id?
Except that it will be oCIS exclusive.

If not I'll just implement it.

@butonic
Copy link
Member

butonic commented Mar 18, 2022

Yes, please! I'd prefer spaceid and fileid. And having that property in oc10 would be great as well.

@butonic butonic changed the title Propfind should deliver StorageId property Propfind should deliver dedicated StorageId property Mar 18, 2022
@butonic
Copy link
Member

butonic commented Mar 18, 2022

hmmm. if you don't get a spaceid in trashbin responses that is a bug.

@butonic
Copy link
Member

butonic commented Mar 18, 2022

In the bigger picture we could take the oc10 numeric storage id as the storageid. But that would create problems when trying to migrate spaces to other storage providers. One solution would be to prefix the numeric storage id with the instance id (if we want to leak that), but that only makes collisions less likely. While spaceids in the form of {instanceid}-{numericstosrageid} might work, I'd prefer a real uuid.

Now regarding a seperate id: makes sense, however the graph api will always take a single id property as the identifier for a resource. It does contain delimiters: ! and $. In C12644A14B0A7750!6180, C12644A14B0A7750 is my userid as well as my personal drive id. 6180 is an autoincrement id for resources in my drive. At least that is how MS implemented it in onedrive.

To clients the fileid is an opaque string. It is made of {spaceid}!{nodeid} so we can efficiently route requests to the rosponsible storage space provider. Clients must not parse it, because the server might change the way the opaqueid is constructed at any time, eg introduce more prefixes for further sharding the spaces.

To let clients link resources to spaces we should add an oc:spaceid property that contains just the spaceid.

@C0rby
Copy link
Contributor

C0rby commented Mar 18, 2022

Ok, I'll implement this next week. 👍

@C0rby
Copy link
Contributor

C0rby commented Mar 30, 2022

This is now included in the current oCIS master.
The new property is called <oc:spaceid/>.

@C0rby C0rby closed this as completed Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants