Skip to content

Conversation

kinclay
Copy link

@kinclay kinclay commented Mar 3, 2025

Update the readme to match the template.

Signed-off-by: Clay King [email protected]

Update the readme to match the template.

Signed-off-by: Clay King <[email protected]>
# Document Cloud Drive Use-Case

Envision a cloud-based document sharing system, like Google Drive or Dropbox. This system can be used by a single user, who is working on documents across multiple of their personal computers, by multiple users, who are collaborating on a shared set of documents, or by the public as a hosting solution. Users need to be able upload, delete, and modify the sharing permissions on their documents. Users also need to be able to view, comment on, and and modify documents that they have access to, while the system enforces correct access control logic. Since this is a multi-tenant system, it must be robust to cross-user abuse. This system includes a blocklist feature to prevent that.
This examnple explores the authorizazation model for a cloud-based sharing system.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This examnple explores the authorizazation model for a cloud-based sharing system.
This example explores the authorization model for a cloud-based sharing system.


## Use-case

Envision a cloud-based document sharing system, like Google Drive or Dropbox. This system can be used by a single user who is working on documents across multiple computers, by multiple users who are collaborating on a shared set of documents, or by the public as a hosting solution. Users need to be able to upload, delete, and modify the sharing permissions on their documents. Users also need to be able to view, comment on, and modify documents that they have access to. The system enforces correct access control logic. Since this is a multi-tenant system, it must have a mechanism to protect against cross-user abuse. This system includes a blocklist feature to accomplish this.
Copy link
Contributor

Choose a reason for hiding this comment

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

We could be more precise and say "Since this is a multi-tenant system, it must have a mechanism to prevent unauthorized cross-tenant access."

* Public: Can the public view/edit/comment on the document

It is always enforced that only the owner can delete or edit the sharing state of a document
* Access-control List (ACL): List of users/groups that are allowed view, groups allowed to comment, groups allowed to edit, groups allowed to manage.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Access-control List (ACL): List of users/groups that are allowed view, groups allowed to comment, groups allowed to edit, groups allowed to manage.
* Access-control List (ACL): List of users/groups that are allowed to view, groups allowed to comment, groups allowed to edit, groups allowed to manage.

Copy link
Contributor

Choose a reason for hiding this comment

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

On a second thought, maybe we can avoid repeating "groups allowed to" here? I suppose ACLs are really just a way to define users/groups allowed view, comment, edit or manage documents.

Comment on lines -96 to +123
* `EditPublicAccess`: Anyone who has manage access can do this.
* `EditPublicAccess`: Anyone who has edit access can do this.
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't sound right.

Comment on lines +94 to +96
* `viewACL` a `DocumentShare`
* `modifyACL` a `DocumentShare`
* `manageACL` a `DocumentShare`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* `viewACL` a `DocumentShare`
* `modifyACL` a `DocumentShare`
* `manageACL` a `DocumentShare`
* `viewACL`: a `DocumentShare`
* `modifyACL`: a `DocumentShare`
* `manageACL`: a `DocumentShare`

* `blocked` a set of EUIDs of type `User`.
* memberOf: `Group`, can be a member of any group.
* `personalGroup` a `Group`, links to the group containing exactly this user
* `blocked` a set of `User` entities.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* `blocked` a set of `User` entities.
* `blocked` a set of `User` entities.

Comment on lines +34 to +38
### `CreateDocument`
Create a new document in the system. Any authenticated user can do this.

### `ViewDocument`
Users must be on the ACL for the document.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure we should be using subsections here.

Finally, let's look at the policies for permission management.
## Policies

### Creating Documents:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Creating Documents:
### Creating Documents

Comment on lines -129 to -134
Any authenticated user should be able to make a document. Since the only valid principal-type here is `User`, this accomplishes that. However, the “authenticated” part isn’t anywhere *in* the policy, and isn’t checked at runtime.
There are a couple of solutions here:

1. Create an entity `Users::"AllUsers"` that every user is a part of. This makes the graph rather big, but maybe we don’t care.
2. An `is` operator, ex: `principal is User`
3. Runtime enforcement of action types.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we removing all this content?

**Note**: `alice_personal` doesn't need to be a child of this because Alice owns the documents she creates by default.
* There is 1 `Document` entity, `alice_public`.

Here are some authz requests to test, included in the `ALLOW` and `DENY` folders:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why abbreviate here?

Suggested change
Here are some authz requests to test, included in the `ALLOW` and `DENY` folders:
Here are some authorization requests to test, included in the `ALLOW` and `DENY` folders:

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