Skip to content

poc: User share manager for space membership#2492

Draft
rhafer wants to merge 3 commits intoopencloud-eu:mainfrom
rhafer:share-manager-for-spaces
Draft

poc: User share manager for space membership#2492
rhafer wants to merge 3 commits intoopencloud-eu:mainfrom
rhafer:share-manager-for-spaces

Conversation

@rhafer
Copy link
Member

@rhafer rhafer commented Mar 17, 2026

This is a proof of concept implementation for #2319. (Persisting Space-Membership in the share-manager)

Requires an adjustment to the CS3 API. Basically just an addtional sharefilter-type: rhafer/cs3apis@6333ce5

The required reva changes are here: https://github.com/rhafer/reva/tree/spaces-in-sharemanager. The rest is mainly accomplished by settting use_common_space_root_share_logic to `true. If we decide to move forward with this I'd suggest to remove that option and make the behavior the default. Should get us rid of a bit more code in reva.

As you can see, the changes simplifies the sharing code in the graph service quite a bit as it removes quite a few of the "is this a space root" special cases.

rhafer added 3 commits March 17, 2026 15:13
This gets us rid of quite a bit of special casing for space permission.
Also provides us with "real" permission IDs instead of those faked
"u:<userid>" ones.
@rhafer rhafer changed the title poc: User share manager for space membershop poc: User share manager for space membership Mar 17, 2026
@sonarqubecloud
Copy link

@rhafer
Copy link
Member Author

rhafer commented Mar 17, 2026

cc @aduffeck @butonic @micbar

Copy link
Member

@aduffeck aduffeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really nice as a first step.

I suppose in the future we might want to retrieve the list of shared spaces from the space manager too instead of relying on the grants using ListStorageSpaces (analogous to what we do with "regular" shares), but that's something we can discuss later.

"ocmproviderauthorizersvc": cfg.OCMEndpoint,
"ocmcoresvc": cfg.OCMEndpoint,
"commit_share_to_storage_grant": cfg.CommitShareToStorageGrant,
"use_common_space_root_share_logic": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually being used? I didn't find a reference to it in reva.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used in the gateway:

https://github.com/opencloud-eu/reva/blob/main/internal/grpc/services/gateway/gateway.go#L79

We should probably remove that config switch, if we decide to switch to the share-manager.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I thought it was a new flag being introduced with your change. Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants