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

[Server v3] What to do when unsharing with a revoked user? #7118

Closed
vxgmichel opened this issue Apr 19, 2024 · 1 comment
Closed

[Server v3] What to do when unsharing with a revoked user? #7118

vxgmichel opened this issue Apr 19, 2024 · 1 comment
Labels
A-Server Area: Server application I-Postgresql Impact: Postgresql issue
Milestone

Comments

@vxgmichel
Copy link
Contributor

There is no status RealmUnshareStoreBadOutcome.RECIPIENT_REVOKED, is that on purpose?

match await self.user._check_user(conn, organization_id, certif.user_id):
case CheckUserBadOutcome.USER_NOT_FOUND:
return RealmUnshareStoreBadOutcome.RECIPIENT_NOT_FOUND
case CheckUserBadOutcome.USER_REVOKED:
pass # TODO: Is that OK to pass here?
case (UserProfile(), DateTime()):
pass

The memory does not check for this case:

if certif.user_id not in org.users:
return RealmUnshareStoreBadOutcome.RECIPIENT_NOT_FOUND

@mmmarcos mmmarcos added I-Postgresql Impact: Postgresql issue A-Server Area: Server application labels Apr 22, 2024
@mmmarcos mmmarcos added this to the v3.0 milestone Apr 24, 2024
@touilleMan
Copy link
Member

touilleMan commented Apr 24, 2024

There is no status RealmUnshareStoreBadOutcome.RECIPIENT_REVOKED, is that on purpose?

No, we should add a RECIPIENT_REVOKED status, good catch 👍

Note the situation is different with unshare command, where the client is allowed to unshare with a revoked user

EDIT: I've misread, realm share is obviously not allowed with a revoked user, however realm unshare is allowed.
This way, the realm key rotation should only deal with realm unshare certificates (instead of ream unshare + user revoke)

So we have (considering Alice OWNER of wksp1):

  • wksp1 unshared with Bob -> Alice does a key rotation of wksp1
  • Bob revoked by Mallory -> ALice unshare wksp1 with Bob -> Alice does a key rotation wksp1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Server Area: Server application I-Postgresql Impact: Postgresql issue
Projects
None yet
Development

No branches or pull requests

3 participants