-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add additional checks for dataset importing #883
Merged
Merged
Conversation
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
We will pick up this task @nikpodsh |
# Conflicts: # backend/dataall/modules/datasets/services/dataset_service.py
dlpzx
reviewed
Nov 30, 2023
dlpzx
reviewed
Nov 30, 2023
backend/dataall/modules/dataset_sharing/services/share_object_service.py
Outdated
Show resolved
Hide resolved
dlpzx
reviewed
Nov 30, 2023
Testing locally:
|
Testing locally again:
|
Testing in AWS:
|
noah-paige
reviewed
Dec 4, 2023
Tested a similar set of actions in an AWS Deployment with this PR:
All looks good on my end |
noah-paige
approved these changes
Dec 5, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - approving
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature or Bugfix
Feature
Detail
Added additional checks for dataset importing (see #614 )
Implemented checks that fail if:
From #614:
The check for this is not implemented. Rationale for this:
There are two types of pivotRole: manual pivotRole (1) and cdk pivotRole (2).
kms:PutKeyPolicy
for '*' resources in the environment. No action neededkms:PutKeyPolicy
for the imported key that pivotRole can change the policy. Thus, the users can catch the error only if they try to create share before update of the stack is succeedRelates
#614
Testing
Added unit test for checks in this PR. Added example of testing data.all aws clients, by mocking boto3 client. Usually, aws clients are mocked in the integration testing and this test can be used as an example how to mock boto3 instead.
Security
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
s3:GetEncryptionConfiguration
to the pivotRole to fetch the encryption configuration for env buckets. It's needed to implement additional checks. EncryptionConfiguration provides only information about encryption (encryption type and key) and doesn't allow pivotRole to read the content of the bucket.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.