fix(dataops-project): grant SMUS user role read access to job scripts in project bucket#55
Open
marcinc wants to merge 2 commits into
Open
fix(dataops-project): grant SMUS user role read access to job scripts in project bucket#55marcinc wants to merge 2 commits into
marcinc wants to merge 2 commits into
Conversation
… in project bucket SMUS per-user roles (datazone_usr_role_<projectId>_<userId>) are created dynamically by AWS at session time and are unknown to MDAA at deploy time. The project bucket's catch-all deny policy was blocking these roles from reading Glue job scripts under deployment/*, causing script load failures when users clicked Script in the SMUS Data Processing Jobs view. Two changes to createProjectBucket: - Add SmusUserRoleDeploymentRead: Allow s3:GetObject* on deployment/* for any principal matching arn:aws:iam::<account>:role/datazone_usr_role_* - Add the same pattern to principalExcludes so the catch-all deny does not fire for SMUS user roles (mirrors the existing dz-user role treatment) Tests: - project.compliance.test.ts: asserts SmusUserRoleDeploymentRead statement - project.synth.test.ts Comprehensive SynthTest: asserts Allow and Deny statements include the datazone_usr_role_* ARN pattern - Snapshots updated
… S3 read access Regenerated CDK diff baselines for all four sample configs (minimal, comprehensive, datazone, sagemaker) to reflect the new S3 GetObject/ListBucket permissions granted to the SMUS user role on the project script bucket. Makes job scripts accessible to the SageMaker Unified Studio user without requiring script access workarounds.
90e8b6e to
3395577
Compare
This file contains hidden or 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
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.
Issue #, if available: #54
Related issue: #52
Description of changes:
SMUS per-user roles (
datazone_usr_role_<projectId>_<userId>) are created dynamically by AWS at session time and are unknown to MDAA at deploy time. The project bucket's catch-all deny policy was blocking these roles from reading Glue job scripts underdeployment/*, causing script load failures when users clicked Script in the SMUS Data Processing Jobs view.Two changes to
createProjectBucket:arn:aws:iam::<account>:role/datazone_usr_role_*principalExcludesso the catch-all deny does not fire for SMUS user roles (mirrors the existing dz-user role treatment)Tests:
project.compliance.test.ts: assertsSmusUserRoleDeploymentReadstatementproject.synth.test.tsComprehensive SynthTest: asserts Allow and Deny statements include thedatazone_usr_role_*ARN patternBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.