microsoft / storage-as-a-service

MIT License
12 stars 9 forks source link

Top Level Folder - Manage ACL #33

Closed softcraftsman closed 2 years ago

softcraftsman commented 2 years ago

Current implementation assumes that Owner of the container wants to create Top Level Folders with their own ACL as the Owner. This is a deviation from original implementation.

Makes more sense to allow the Top Level Folders to have other users added/removed in the ACL directly from the web interface.

Challenges:

Approach: There needs to be a balance between accessing the DataLake as a superuser and as the actual user. The application is running as the superuser with RBAC. To calculate if a user has access to a container/folder, the application could evaluate each ACL and determine if the user is listed, but that is simplistic especially when using a group. The calculation to determine group membership would be computationally expensive.

A better approach is to use the built in capabilities of the storage account API. If the user queries the storage account under the right permissions, a list of containers/folders will be returned. If the user is only specified in the ACL, the application will still need to use the superuser to get some information, but then can switch to an on-behalf-of flow to query for the specific folders.

Have the application query the storage account for the file systems. This will return more filesystems than the user has access to then query for the top level folders under the User's context.

In order for the user to have access to the top level folders list, they will require ACL r-x at the root of the container. If the app lists the top level folders for the user at the container level and results return, they have access to the container. This will be true regardless of if they are in RBAC or an ACL group assignment, and not just a user assignment. This will also resolve the guest membership issues.

Changes: