-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DA v2: fix default permissions and update migrations scripts (#728)
### Feature or Bugfix - Bugfix ### Detail There are some issues with the permissions that appear in the invitation request Original: ![image](https://github.com/awslabs/aws-dataall/assets/71252798/3b4f409c-e9f4-4bc7-9f4b-123e4c4d0f0b) Fresh deployment (with mlStudio module disabled): <img width="500" alt="image" src="https://github.com/awslabs/aws-dataall/assets/71252798/996aae76-3069-4562-9baf-d7255d009650"> With a pre-existing deployment: ![image](https://github.com/awslabs/aws-dataall/assets/71252798/e3b82bb8-7431-4dda-90d4-7f632c4fcbbb) old deployment: ``` Invite other teams Add consumption roles create networks create pipelines create notebooks Request datasets access create datasets create redshift ---> removed! already done create ML Studio ---> renamed! already done ``` The following are new or wrong permissions in fresh deployments / backwards ``` List datasets on this environment / LIST_ENVIRONMENT_DATASETS Run athena queries / RUN_ATHENA_QUERY List datasets shared with this environments (TYPO!) / LIST_ENVIRONMENT_SHARED_WITH_OBJECTS?? nothing (mlstudio disabled) / LIST_ENVIRONMENT_SGMSTUDIO_USERS ``` This PR includes 3 fixes: 1) `RUN_ATHENA_QUERY`: Good to add, but was not there before so we need to update the description in the migration scrips 2) `LIST_ENVIRONMENT_DATASETS`, `LIST_ENVIRONMENT_SHARED_WITH_OBJECTS`: they are needed by default, so we can add a new list `ENVIRONMENT_INVITED_DEFAULT` and add them there instead of adding them in the list that is used for the toogle menu. 3) `LIST_ENVIRONMENT_SGMSTUDIO_USERS`: this permission is not used, we just need to remove it In addition some permissions have been renamed. I used the `migrations/versions/4a0618805341_rename_sgm_studio_permissions.py` script as it already handles renames Testing: [X] - Local testing of renaming and descriptions [X] - AWS testing of the permissions that appear on screen [ ] - AWS testing with an invited group - check that they can list datasets and shares in environment This is the end result for a deployment with the dashboards modules disabled: ![image](https://github.com/awslabs/aws-dataall/assets/71252798/b2222c1f-6d37-447d-bee5-e5d8521ff145) ### Relates - V2 ### Security Please answer the questions below briefly where applicable, or write `N/A`. Based on [OWASP 10](https://owasp.org/Top10/en/). `N/A` - Does this PR introduce or modify any input fields or queries - this includes fetching data from storage outside the application (e.g. a database, an S3 bucket)? - Is the input sanitized? - What precautions are you taking before deserializing the data you consume? - Is injection prevented by parametrizing queries? - Have you ensured no `eval` or similar functions are used? - Does this PR introduce any functionality or component that requires authorization? - How have you ensured it respects the existing AuthN/AuthZ mechanisms? - Are you logging failed auth attempts? - Are you using or adding any cryptographic features? - Do you use a standard proven implementations? - Are the used keys controlled by the customer? Where are they stored? - Are you introducing any new policies/roles/users? - Have you used the least-privilege principle? How? By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Showing
7 changed files
with
41 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters