-
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
922 - Replace IAM inline policies by configurable Managed Policies for folder and bucket sharing #1068
922 - Replace IAM inline policies by configurable Managed Policies for folder and bucket sharing #1068
Conversation
… policies. Adjust tests
…ged flags in consumption roles table
+ frontend adjustments
add frontend fields for consumption roles
Frontend display of share policies
…m:AttachPolicy is necessary
ToDoS:
BackEnd:
|
backend/migrations/versions/af0437dab922__add_dataallManaged_flag.py
Outdated
Show resolved
Hide resolved
backend/dataall/core/environment/services/environment_service.py
Outdated
Show resolved
Hide resolved
backend/dataall/modules/dataset_sharing/services/managed_share_policy_service.py
Show resolved
Hide resolved
backend/dataall/modules/dataset_sharing/services/managed_share_policy_service.py
Outdated
Show resolved
Hide resolved
...end/dataall/modules/dataset_sharing/services/share_managers/s3_access_point_share_manager.py
Outdated
Show resolved
Hide resolved
backend/dataall/modules/dataset_sharing/services/share_managers/s3_bucket_share_manager.py
Show resolved
Hide resolved
backend/dataall/modules/dataset_sharing/services/share_managers/share_manager_utils.py
Outdated
Show resolved
Hide resolved
Local testing [ With latest changes Mon March 4th]Newly added consumption roles/teamsError found if share fails - after more than one policy version the policy cannot be deleted: 1.a Environment Group Policy - IAM role created by data.all
1.b Environment Group Policy - IAM role created by data.all as ENVIRONMENT Admin
2.a Environment Group Policy - IAM role IMPORTED (sharing tested in other scenarios)
2.b Environment Group Policy - IAM role IMPORTED as ENVIRONMENT Admin
data sharing module is disabled
For testing in AWS add:
Issues, Remarks and next steps
Out of scope for this PR:
|
… delete, exceptions in environment stack
Backwards compatibilityFor data.all created and imported roles, we create the share-policy and backfill the permissions in 3 situations: If for any reason the backfilling process fails, the inline policies should not be deleted (that way we can always fix the existing shares) For data.all created roles, we make sure the policy is attached in the IaC definition in the environment stack with new updates. If the policy does not exist, the stack should not fail and the inline policies should not be deleted
|
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
### Feature or Bugfix - Bugfix ### Detail For S3 bucket shares and for S3 access point shares (folder sharing) - In share-verify workflow add a check to verify the managed policy for shares is attached to the target role. Log the error and raise an unhealthy status - In share-approve workflow add a check to verify the managed policy for shares is attached to the target role and attach the policy if the requester is a Group or a data.all Managed Consumption role ### Relates - #1062 - #1068 ### Security Please answer the questions below briefly where applicable, or write `N/A`. Based on [OWASP 10](https://owasp.org/Top10/en/). - 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. --------- Co-authored-by: Noah Paige <noahpaig@amazon.com>
Feature or Bugfix
Detail
Relates
SecurityN/A
How to test:
See backwards compatibility and local testing comments below.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
@dlpzx Update:
a) if a new share request is created
b) if new items are added to an existing share request
c) if items are revoked from an existing share request
More details in the comments