dataall icon indicating copy to clipboard operation
dataall copied to clipboard

Make visibility of auto-approval toggle configurable based on confidentiality

Open anushka-singh opened this issue 10 months ago • 3 comments

Is your idea related to a problem? Please describe. Users should be able to disable visibility of auto-approval toggle with code. For example, at our company, we require that shares always go through approval process if their confidentiality classification is Secret. We dont even want to give the option to users to be able to set autoApproval enabled to ensure they dont do so by mistake and end up over sharing.

Describe the solution you'd like Add config in config.json and make changes in dataset import, create and edit forms.

P.S. Don't attach files. Please, prefer add code snippets directly in the message body.

anushka-singh avatar Apr 25 '24 14:04 anushka-singh

https://github.com/data-dot-all/dataall/assets/26413731/a93408aa-5177-42f3-81e0-e683ef30c897

Check the video for a feature demo.

anushka-singh avatar Apr 25 '24 14:04 anushka-singh

Note: Additionally, on the backend we have code to validate “auto_approval_for_confidentiality_level” value for Secret confidentiality. This is to ensure that if someone uses a proxy or curl command and sets the value auto_approval_for_confidentiality_level=true for the confidentiality level, in the backend side we still wont run the auto-approval workflow.

Would recommend anyone using this feature to use the following code to manage the backend side. I have not included it in the PR since this is only needed if one of the auto_approval_for_confidentiality_level is set to false. We keep all of them true by default.

Change in share_object_service.py https://github.com/data-dot-all/dataall/blob/main/backend/dataall/modules/dataset_sharing/services/share_object_service.py#L288

~~if dataset.autoApprovalEnabled:~~ --> if dataset.autoApprovalEnabled and ConfidentialityClassification.get_confidentiality_level( dataset.confidentiality) != ConfidentialityClassification.Secret.value:

  • Instead of using ConfidentialityClassification.Secret.value use whatever confidentiality you want to disable.

anushka-singh avatar Apr 25 '24 14:04 anushka-singh

Pending a follow up PR for backend changes before closing this issue

noah-paige avatar May 01 '24 16:05 noah-paige

Hi @anushka-singh @TejasRGitHub - following up on this issue, I believe there may still be some work on the backend for this issue to handle input validation / not allowing autoapproval for the specified confidentialities in config.json

Is this to be picked up by you all? / Would this be a part of #1261 and can close this issue?

noah-paige avatar May 21 '24 01:05 noah-paige

@noah-paige whats the current status here ? can we close this issue ?

anmolsgandhi avatar Jun 11 '24 02:06 anmolsgandhi

@anushka-singh @TejasRGitHub - can one of you confirm

Hi @anushka-singh @TejasRGitHub - following up on this issue, I believe there may still be some work on the backend for this issue to handle input validation / not allowing autoapproval for the specified confidentialities in config.json

Is this to be picked up by you all? / Would this be a part of #1261 and can close this issue?

@anmolsgandhi still needing to add input validation on backend to mark this issue as fully complete

@anushka-singh @TejasRGitHub - can you all confirm whether you plan to pick this up in the next couple of weeks? If not we will have to find some time to prioritize it

noah-paige avatar Jun 11 '24 03:06 noah-paige

Oops! Sorry to have missed this mention @noah-paige @anmolsgandhi We are going to change how configs look in #1261 which might also change the backend changes required in this PR. Lets pick this up as a part of #1261 to avoid re-work and close this issue.

anushka-singh avatar Jun 11 '24 12:06 anushka-singh