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

Allow to grant user/group permissions on storage paths #3919

Open
ekazachkova opened this issue Feb 18, 2025 · 0 comments
Open

Allow to grant user/group permissions on storage paths #3919

ekazachkova opened this issue Feb 18, 2025 · 0 comments
Labels
kind/enhancement New feature or request

Comments

@ekazachkova
Copy link
Contributor

ekazachkova commented Feb 18, 2025

Background
At the moment, Cloud Pipeline does not allow to grant permissions directly on storage path and it would be nice to support it.

Approach

API part

  1. a new flag pathPermissionsEnabled shall added for storage object. This flag indicates that path permissions management available for specified storage. This flag shall be available to apply only on storage creation.
  2. a new method to update all permissions for specific user or group shall be implemented:
    POST /datastorage/<storageID>/paths/permissions?sidName=<user/group>&principal=<true/false>
# Request Body
[{
    # to grant permissions on file
    "fileName": "file.txt",
    "mask": 1,
    "folderPath": "path/to/folder"
  },
  {
    # to grant permissions on folder
    "mask": 5,
    "folderPath": "path/to/folder"
  }, ...
]

This method shall be available for admins and storage owners.
If pathPermissionsEnabled flag is switched off for specified storage an error shall be occurred.
This method shall be used when owner/admin desired to grant path permissions for specific user or group. All already existing permissions for specified user/group will be overwrited.

  1. a new method to fetch all path permissions for current user on specified storage shall be implemented:
    GET /datastorage/<storageID>/paths/permissions
# Response Body
[{
    # if permissions granted on file
    "fileName": "file.txt",
    "mask": 1,
    "folderPath": "path/to/folder"
  },
  {
    # if permissions granted on folder
    "mask": 5,
    "folderPath": "path/to/folder"
  }, ...
]

This method shall be available for users with at least READ permissions on storage.
If pathPermissionsEnabled flag is switched off for specified storage an error shall be occurred.
This method shall be useful for pipe storage CLI operations.

  1. all currently implemented API methods for storage files/folders management shall respect permissions on paths:

    • if write permissions are not granted to file/folder deletion shall not be available
    • if permissions are only granted for some of the folders or files in the requested directory folders or files without permissions shall not be listed
    • and so on ...
  2. when storage deletion requested all path permissions shall be removed as well.

  3. a new API method to load users or groups that have path permissions for specified storage:
    GET /datastorage/<storageID>/paths/permissions/sids

[{
    "name": "USER",
    "principal": true 
},
{
    "name": "GROUP",
    "principal": false 
},
]

This method shall be available for admins and storage owners.

  1. a new API method to delete storage path permissions for specified users or groups by storage ID.
    DELETE /datastorage/<storageID>/paths/permissions
# Request Body
[
{
    "name": "USER",
    "principal": true 
},
{
    "name": "GROUP",
    "principal": false 
},
]

If no request body provided all storage path permissions shall be removed.
This method shall be available for admins and storage owners.

  1. a new API methods for admins/owners management shall be implemented. This methods shall provide ability to manipulate path permissions from GUI. - load permissions for storage, user/group (TBD: path)

Pipe CLI part

  1. pipe storage mount shall respect granted paths permissions. This permissions shall be refreshable.
  2. other pipe storage methods shall also respect granted path permissions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant