-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix/remove allow all bucket statement #1106
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
# Conflicts: # backend/dataall/modules/dataset_sharing/aws/s3_client.py # backend/dataall/modules/dataset_sharing/services/share_managers/s3_access_point_share_manager.py # backend/dataall/modules/dataset_sharing/services/share_managers/s3_bucket_share_manager.py # tests/modules/datasets/tasks/test_s3_access_point_share_manager.py # tests/modules/datasets/tasks/test_s3_bucket_share_manager.py
SofiaSazonova
approved these changes
Mar 15, 2024
Testing (I waited to have the PR for linting merged before doing proper testing)
|
I am picking up #1101 alongside this issue because they are very much related |
Testing again, after picking up #1101 Tested locally.
|
petrkalos
approved these changes
Mar 21, 2024
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
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
Detail
AllowAllToAdmin
. We could change this, I am not strong opinionated.AllowAllToAdmin
will be deleted when all folders are revoked. It is unnecessary but it does not harm anyone to leave it as it is for existing shares.[UPDATE]
Since the testing uncovered issues derived from removing
AllowAllToAdmin
with the current clean-up actions I took the issue #1101 and included it in this PR. On top of the aforementioned changes, this PR:clean_up
functions from revoke_folders and move the clean_up logic into theprocess_revoked_folders
function (from thedata_sharing_service.py
)delete_access_point_policy
into smaller functions with less responsibilities:revoke_access_in_access_point_policy
that generates the new access point policy;attach_new_access_point_policy
that attaches a given policy to an access point;delete_access_point
that deletes an access point.backend/dataall/modules/dataset_sharing/services/share_processors/s3_access_point_process_share.py
. Only if the resulting policy contains no statements the access point is deleted, the IAM permissions revoked from the requester IAM role and the KMS key policy revoked.Relates
Security
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
eval
or similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.