epam / cloud-pipeline

Cloud agnostic genomics analysis, scientific computation and storage platform
https://cloud-pipeline.com
Apache License 2.0
146 stars 59 forks source link

Ability to share runs via the `pipe` CLI #1156

Open NShaforostov opened 4 years ago

NShaforostov commented 4 years ago

Background For certain use cases, it is beneficial to be able to share applications with other users/groups. Currently, Cloud Pipeline supports the ability to access runs environments for several users, not only for the user, who launched the run (OWNER). On the GUI, it's implemented via the "Sharing" feature that allows to share runs as the interactive tools endpoints and SSH sessions for several users/groups. It would be convenient to allow users to share runs via the pipe CLI.

Approach

This command shall be available only for admin or the run OWNER.

NShaforostov commented 4 years ago

I've tried to verify this. In common, it works well. Some issues, that were encountered:

  1. Attempt to run pipe share get <RUN_ID> prints the error with a traceback, where RUN_ID is the run ID:
    • of the run that isn't accessible for the current user
    • of the completed run
    • of the non-existing/not-found run E.g.: image Is it possible to print only short error message in such cases?
  2. Attempt to run pipe share add <RUN_ID> without additional options prints the error with a traceback: image Is it possible to print only short error message in such cases?
  3. Attempt to run pipe share add <RUN_ID> -su/sg <USER>/<GROUP> without specifying -ssh option (for the run without endpoints) prints the error with a traceback: image Is it possible to print only short error message in such cases?
  4. Attempt to run pipe share remove <RUN_ID> without additional options prints the error, nothing happens: image But without any options this command shall clear all list of the shared users/groups.
  5. Attempt to run pipe share remove -ssh <RUN_ID> without additional options prints the error, nothing happens: image But this command shall remove only SSH-sharing for all users/groups for runs with endpoint(s) or remove all users/groups of the run shared list for runs without endpoints.