Skip to content

Commit

Permalink
Data712 y branch 2 5 (data-dot-all#375)
Browse files Browse the repository at this point in the history
* Bigdata867 3 (data-dot-all#24)

* Bucket Policy E.1: Modify sharing task routing to trigger a s3 bucket sharing

* Bucket Policy E.1: Modify sharing task routing to trigger a s3 bucket sharing

* Bucket Policy E.1: Modify sharing task routing to trigger a s3 bucket sharing

* Bucket Policy BIGDATA 867: Implement revoke share in data_sharing_service

* Bucket Policy BIGDATA 867: Implement revoke share in data_sharing_service

* trajopadhye- BIGDATA-756 -> Added Tests for Task D and E

* trajopadhye - BIGDATA-756 Corrected file data_sharing_service.py to address revokedStateSM for revoked items

* trajopadhye- BIGDATA-756 - Slight correction in comments

* trajopadhye- BIGDATA-756 Correction on Share Status for revoke share tests

* Addresed changes from the review of PR

* [BIGDATA-625] Implement bucket share processor (data-dot-all#21)

* Implement bucket share processor

* Fix Revoke UI sharetype

* BIGDATA-612 - push source from SD container to CodeCommit.  Initial Makefile and SD yaml configuration.

* Remove synth

* Add force push

* Add default cdk.context.json

* Add param for branchname

* Comments.

* Fix email address

* Add instance specific cdk.context.json

* BIGDATA-612 - truncate the cfn encryption policy prefix so that together with branch name, it will fit within 32 char limit.

* Update screwdriver.yaml

* Change nodejs version in screwdriver Makefile to supported version 16 (data-dot-all#89) (data-dot-all#90)

* Change screwdriver node version to 16

* Remove all non-environment setup steps for testing

* Skip getting AWS credentials for testing

* Fixing npm install version

* Remove extra npm install

* Restore all prior functions.

* Remove AmplifyContext customizations, no longer needed. (data-dot-all#92)

* Change nodejs version in screwdriver Makefile to supported version 16 (data-dot-all#89)

* Change screwdriver node version to 16

* Remove all non-environment setup steps for testing

* Skip getting AWS credentials for testing

* Fixing npm install version

* Remove extra npm install

* Restore all prior functions.

* Remove AmplifyContext customizations, no longer needed. (data-dot-all#91)

* Fix screwdriver yaml for new EMR template step. (data-dot-all#116)

* Bigdata 1397 mvp 3 stagingdeploy 20231129 (data-dot-all#178)

* BIGDATA-1211 - Release notes initial commit

* Mvp3 deploy 20231129 - S3 Bucket share + KMS explosion fix - MERGE FROM OPENSOURCE (data-dot-all#176)

* Enabling S3 bucket share  (data-dot-all#848)

- Feature

- We want to enable bucket sharing along with access point share which
already exists in data all right now.
- A user will be able to request shares at bucket level and at the
folder level with access points.
- Please NOTE: There is some common code between Access point share
managers and processors and S3 Bucket managers and processors. We will
send out a separate PR for that refactoring work at a later time.

- data-dot-all#284
- data-dot-all#823
-
https://github.com/awslabs/aws-dataall/pull/846/files#diff-c1f522a1f50d8bcf7b6e5b2e586e40a8de784caa80345f4e05a6329ae2a372d0

- Contents of this PR have been contributed by @anushka-singh,
@blitzmohit, @rbernotas, @TejasRGitHub

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.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Anushka Singh <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: trajopadhye <[email protected]>

* Kms explosion fix (data-dot-all#882)

- Bugfix

- DataAll currently creates one SID per role in the KMS policy attached
to a bucket with RoleID as the SID name.
- We want to collapse these SIDs into one SID.
- Access point and Bucket share will have different SIDs in KMS policy.
- Use role ARN instead of role ID.
- NOTE: if KMS policy was previously created, it will remain the same.
SID will be the user ID and not the KMS decrypt SID created in this PR.
It will not impact any future shares though.
- NOTE: This is to be merged after bucket share PR is merged.

- Tested this on local dev environment and KMS policy now has 1
statement with kms decrypt and using SID of KMS decrypt.

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.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Anushka Singh <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: trajopadhye <[email protected]>

* Updated Release Notes 20231201

* Format changes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: trajopadhye <[email protected]>

* [BIGDATA-1391] - Fix for cannot see all cognito groups when inviting teams (data-dot-all#177)

* trajopadhye | BIGDATA-1391 - Fix for incomplete groups list fetched for invite org and env

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: trajopadhye <[email protected]>

* Bigdata 1397 mvp 3 stagingdeploy 20231129 1 (data-dot-all#180)

* BIGDATA-1211 - Release notes initial commit

* Mvp3 deploy 20231129 - S3 Bucket share + KMS explosion fix - MERGE FROM OPENSOURCE (data-dot-all#176)

* Enabling S3 bucket share  (data-dot-all#848)

- Feature

- We want to enable bucket sharing along with access point share which
already exists in data all right now.
- A user will be able to request shares at bucket level and at the
folder level with access points.
- Please NOTE: There is some common code between Access point share
managers and processors and S3 Bucket managers and processors. We will
send out a separate PR for that refactoring work at a later time.

- data-dot-all#284
- data-dot-all#823
-
https://github.com/awslabs/aws-dataall/pull/846/files#diff-c1f522a1f50d8bcf7b6e5b2e586e40a8de784caa80345f4e05a6329ae2a372d0

- Contents of this PR have been contributed by @anushka-singh,
@blitzmohit, @rbernotas, @TejasRGitHub

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.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Anushka Singh <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: trajopadhye <[email protected]>

* Kms explosion fix (data-dot-all#882)

- Bugfix

- DataAll currently creates one SID per role in the KMS policy attached
to a bucket with RoleID as the SID name.
- We want to collapse these SIDs into one SID.
- Access point and Bucket share will have different SIDs in KMS policy.
- Use role ARN instead of role ID.
- NOTE: if KMS policy was previously created, it will remain the same.
SID will be the user ID and not the KMS decrypt SID created in this PR.
It will not impact any future shares though.
- NOTE: This is to be merged after bucket share PR is merged.

- Tested this on local dev environment and KMS policy now has 1
statement with kms decrypt and using SID of KMS decrypt.

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.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Anushka Singh <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: trajopadhye <[email protected]>

* Updated Release Notes 20231201

* Format changes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: trajopadhye <[email protected]>

* [BIGDATA-1391] - Fix for cannot see all cognito groups when inviting teams (data-dot-all#177)

* trajopadhye | BIGDATA-1391 - Fix for incomplete groups list fetched for invite org and env

* Bugfix

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: trajopadhye <[email protected]>

* Bugfix (data-dot-all#181)

* Bugfix

* Bugfix

* [Data 409] Athenz Certs Domain and User Pool Domain Changes (data-dot-all#221) (data-dot-all#222)

* trajopadhye | DATA-409- Code changes for Athenz certs domain and user pool domain

* [Data-413] GA stagingdeploy 20231228 - Fix for email notifications with Athenz.  Auto-create Pivot Role (data-dot-all#224)

* trajopadhye | DATA-412 - Added Athenz configs and Ports in AWS Worker lambda and enabling Auto Create Pivot Role

* DATA-416 - Fix while migrating from manual pivot role to auto created  (data-dot-all#230) (data-dot-all#233)

* trajopadhye | DATA-416 - Fix for environment updates when using auto pivot role. Changing the way KMS keys are specified in env role

* [Data 447] ga stagingdeploy 20240116 (data-dot-all#244)

* [Data-446] Fix for consumption role not showing up

* [Data 415] Dataset import fix for circular dependency error + local dev setup fixes  (data-dot-all#243)

* DATA-428 - Local env fixes

* Data 448 ga stagingdeploy 20240117 (data-dot-all#246)

* trajopadhye | DATA-440 - Adding else if to sync glue tabls in RDS

* Data 461 ga deploy 20240125 (data-dot-all#258)

* DATA-404 - Add git fetch --all to the CodeCommit repo sync

* DATA-420 - Switch from Cognito to Okta on Prod (data-dot-all#254)

DATA-420 - Switch from Cognito to Okta on Prod

* DATA-455: Shares stuck in progress when AWS does not have root access on KMS key (data-dot-all#256)

* Update release notes

* Update release notes

---------

Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>

* Data 466 ga stagingdeploy 20240126 (data-dot-all#263)

* trajoadhye | DATA-456 - Removing Lake Formation SLR (data-dot-all#260)

* Data-405-Adding max 30 sec delay

* Synching Release notes from Staging to y-branch-2-0 (data-dot-all#262)

* [Data 484] stagingdeploy 20240206 (data-dot-all#275)

* fix: adding cdk synth for checkov scans (data-dot-all#264)

* [DATA-452] - Adding Dataset description in shares view (data-dot-all#273)

* Added Release note for DATA-481, DATA-452, DATA-480

* Syncing Release notes (data-dot-all#274)

---------

Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>
Co-authored-by: Anushka Singh <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>

* [Data 607] staging deploy email notification fix (data-dot-all#302)

* Data:604: Add local level false positive management for PSECBUG - 73521 (data-dot-all#299)

* DATA-600 - Fix for share link not present in email notifications

* Merging changes needed for DATA-509 - Updating custom confidentiality values

* DATA - 586 - Adding confidentiality values for custom confidentiality

* Lower casing as suggested here- DATA-375

---------

Co-authored-by: Tejas Rajopadhye <[email protected]>

* Updating release notes for staging deploy (data-dot-all#301)

---------

Co-authored-by: Anushka Singh <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>

* [Data 611] Disable topics dropdown (data-dot-all#304)

* Disabling topics dropdown (data-dot-all#303)

* [Data 619] Stagingdeploy env permission fix  (data-dot-all#307)

* Data:604: Add local level false positive management for PSECBUG - 73521 (data-dot-all#299)

* Data:604: Add local level false positive management for PSECBUG - 73521 (data-dot-all#300)

* Email notification fix + confidentiality levels config  (data-dot-all#298)

* DATA-600 - Fix for share link not present in email notifications

* Merging changes needed for DATA-509 - Updating custom confidentiality values

* Adding confidentiality values for custom confidentiality

* Adding confidentiality configs to config.json.PROD

* Lower casing as suggested here- DATA-375

---------

Co-authored-by: Tejas Rajopadhye <[email protected]>

* Updating release notes for staging deploy (data-dot-all#301)

* Disabling topics dropdown (data-dot-all#303)

* DATA-619 - Fix permission for GET_ORGANIZATION when users are in _data teams (data-dot-all#306)

* Cherry pick for issue with GET_ORG permission after 2.3 release

---------

Co-authored-by: Noah Paige <[email protected]>

---------

Co-authored-by: Anushka Singh <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: Noah Paige <[email protected]>

* [Data 631] Staging deploy  (data-dot-all#310)

* [Data 629] worksheet fix for GET_ENVIRONMENT permission (data-dot-all#309)

* Data690 stagingdeploy 20240425 (data-dot-all#319)

* DATA-680 - Update node repo to 18.x in Makefile.sd

* Data674: Adding auto approval for confidentiality levels (data-dot-all#317)

* Data674: Adding auto approval for confidentiality levels

* Data674: Adding auto approval for confidentiality levels

* Data674: Adding auto approval for confidentiality levels

* Lint fixes

* Lint fixes

* Lint fixes

* Lint fixes

* Lint fixes

* Ensuring Secret Confidentiality Type (Yahoo Confidential and Yahoo Highly Confidential) are never auto-approved

* Use boolean true instead of string

* Update config

* Update release notes

* Update release notes

* Update release notes

---------

Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>

* Update makefile (data-dot-all#320)

* Data690 stagingdeploy 20240425 2 (data-dot-all#321)

* Update makefile

* Reverting nodejs 16 upgrade

* Reverting nodejs 16 upgrade

* Data690 stagingdeploy 20240425 3 (data-dot-all#323)

* DATA-680 - Update node repo to 18.x in Makefile.sd

* Data674: Adding auto approval for confidentiality levels (data-dot-all#317)

* Data674: Adding auto approval for confidentiality levels

* Data674: Adding auto approval for confidentiality levels

* Data674: Adding auto approval for confidentiality levels

* Lint fixes

* Lint fixes

* Lint fixes

* Lint fixes

* Lint fixes

* Ensuring Secret Confidentiality Type (Yahoo Confidential and Yahoo Highly Confidential) are never auto-approved

* Use boolean true instead of string

* Update config

* Bugfix (data-dot-all#322)

* Reverting nodejs 16 upgrade

---------

Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>

* Data690 stagingdeploy 20240425 4 (data-dot-all#325)

* DATA-680 - Update node repo to 18.x in Makefile.sd

* Data674: Adding auto approval for confidentiality levels (data-dot-all#317)

* Data674: Adding auto approval for confidentiality levels

* Data674: Adding auto approval for confidentiality levels

* Data674: Adding auto approval for confidentiality levels

* Lint fixes

* Lint fixes

* Lint fixes

* Lint fixes

* Lint fixes

* Ensuring Secret Confidentiality Type (Yahoo Confidential and Yahoo Highly Confidential) are never auto-approved

* Use boolean true instead of string

* Update config

* Bugfix (data-dot-all#322)

* Blocking autoApproval edit on backend (data-dot-all#324)

* Blocking autoApproval edit on backend

* Lint fix

* Reverting nodejs 18 upgrade

---------

Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>

* Data690 stagingdeploy 20240425 5 (data-dot-all#329)

* DATA-680 - Update node repo to 18.x in Makefile.sd

* Data674: Adding auto approval for confidentiality levels (data-dot-all#317)

* Data674: Adding auto approval for confidentiality levels

* Data674: Adding auto approval for confidentiality levels

* Data674: Adding auto approval for confidentiality levels

* Lint fixes

* Lint fixes

* Lint fixes

* Lint fixes

* Lint fixes

* Ensuring Secret Confidentiality Type (Yahoo Confidential and Yahoo Highly Confidential) are never auto-approved

* Use boolean true instead of string

* Update config

* Bugfix (data-dot-all#322)

* Blocking autoApproval edit on backend (data-dot-all#324)

* Blocking autoApproval edit on backend

* Lint fix

* DATA-680 - Switch node to version 17 in the Screwdriver makefile (data-dot-all#326)

* bugfix (data-dot-all#328)

* Remove nodejs upgrade

---------

Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>

* bugfix (data-dot-all#331)

* Data743 stagingdeploy (data-dot-all#351)

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* Data743: Update verifier task schedule to run nightly (data-dot-all#350)

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* Data743 stagingdeploy (data-dot-all#353)

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* Update verifier task schedule to run nightly

* [Data 767] staging deploy (data-dot-all#358)

* Bugfix: timeout error when listing Consumption Roles (data-dot-all#1303)

- Bugfix

- as GraphQL resolvers are 'lazy', for ShareRequest Modal window we
simply don't fetch the managedPolicy property -- no timeout
- managed policies are fetched, when consumption role is selected from
dropdown

- data-dot-all#1288

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: Sofia Sazonova <[email protected]>

* Updated Release notes

---------

Co-authored-by: Sofia Sazonova <[email protected]>
Co-authored-by: Sofia Sazonova <[email protected]>

---------

Co-authored-by: Anushka Singh <[email protected]>
Co-authored-by: Sofia Sazonova <[email protected]>
Co-authored-by: Sofia Sazonova <[email protected]>

* data712

* Data712: Persistent emails

* Data712: Persistent emails

* Data712: Persistent emails

* Data712: Persistent emails

* Data712: Persistent emails

* Data712: Persistent emails

* Data712: Persistent emails

* Restore yarn file

* Restore yarn file

* Update config

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: trajopadhye <[email protected]>
Co-authored-by: Mohit Arora <[email protected]>
Co-authored-by: rbernota <[email protected]>
Co-authored-by: Rick Bernotas <[email protected]>
Co-authored-by: Raj Chopde <[email protected]>
Co-authored-by: Noah Paige <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jaidisido <[email protected]>
Co-authored-by: dlpzx <[email protected]>
Co-authored-by: mourya-33 <[email protected]>
Co-authored-by: nikpodsh <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Manjula <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Daniel Lorch <[email protected]>
Co-authored-by: Tejas Rajopadhye <[email protected]>
Co-authored-by: Zilvinas Saltys <[email protected]>
Co-authored-by: Sofia Sazonova <[email protected]>
Co-authored-by: Sofia Sazonova <[email protected]>
  • Loading branch information
22 people authored and anushka-singh committed Jun 20, 2024
1 parent 3f4340e commit 32bea9d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 4 deletions.
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"share_notifications": {
"email": {
"active": false,
"persistent_reminders": false,
"parameters": {
"group_notifications": true
}
Expand Down
62 changes: 58 additions & 4 deletions deploy/stacks/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def __init__(
tooling_account_id=None,
s3_prefix_list=None,
lambdas=None,
email_custom_domain=None,
ses_configuration_set=None,
custom_domain=None,
**kwargs,
):
super().__init__(scope, id, **kwargs)
Expand All @@ -44,11 +47,20 @@ def __init__(
self._ecr_repository = ecr_repository
self._vpc = vpc
self._prod_sizing = prod_sizing
self._email_custom_domain = email_custom_domain
self._ses_configuration_set = ses_configuration_set

(self.scheduled_tasks_sg, self.share_manager_sg) = self.create_ecs_security_groups(
envname, resource_prefix, vpc, vpce_connection, s3_prefix_list, lambdas
)
self.ecs_security_groups: [aws_ec2.SecurityGroup] = [self.scheduled_tasks_sg, self.share_manager_sg]
self.env_vars = self._create_env('INFO')

# Check if custom domain exists and if it exists email notifications could be enabled.
# Create an env variable which stores the domain URL.
# This is used for sending data.all share weblinks in the email notifications.
if custom_domain and custom_domain.get('hosted_zone_name'):
self.env_vars.update({'frontend_domain_url': f'https://{custom_domain["hosted_zone_name"]}'})

cluster = ecs.Cluster(
self,
Expand All @@ -58,7 +70,10 @@ def __init__(
container_insights=True,
)

self.task_role = self.create_task_role(envname, resource_prefix, pivot_role_name)
self.task_role = self.create_task_role(
envname, resource_prefix, pivot_role_name, email_custom_domain, ses_configuration_set
)

self.cicd_stacks_updater_role = self.create_cicd_stacks_updater_role(
envname, resource_prefix, tooling_account_id
)
Expand Down Expand Up @@ -177,7 +192,7 @@ def __init__(
self.add_share_management_task()
self.add_share_verifier_task()
self.add_share_reapplier_task()
self.add_omics_fetch_workflows_task()
self.add_persistent_email_reminders_task()

@run_if(['modules.s3_datasets.active', 'modules.dashboards.active'])
def add_catalog_indexer_task(self):
Expand Down Expand Up @@ -250,7 +265,7 @@ def add_share_verifier_task(self):
environment=self._create_env('INFO'),
image_tag=self._cdkproxy_image_tag,
log_group=self.create_log_group(self._envname, self._resource_prefix, log_group_name='share-verifier'),
schedule_expression=Schedule.expression('rate(7 days)'),
schedule_expression=Schedule.expression('rate(1 day)'), # YAHOO ONLY CHANGE
scheduled_task_id=f'{self._resource_prefix}-{self._envname}-share-verifier-schedule',
task_id=f'{self._resource_prefix}-{self._envname}-share-verifier',
task_role=self.task_role,
Expand Down Expand Up @@ -286,6 +301,31 @@ def add_share_reapplier_task(self):
)
self.ecs_task_definitions_families.append(share_reapplier_task_definition.family)

@run_if(['modules.s3_datasets.features.share_notifications.email.persistent_reminders'])
def add_persistent_email_reminders_task(self):
persistent_email_reminders_task, persistent_email_reminders_task_def = self.set_scheduled_task(
cluster=self.ecs_cluster,
command=[
'python3.9',
'-m',
'dataall.modules.shares_base.tasks.persistent_email_reminders_task',
],
container_id='container',
ecr_repository=self._ecr_repository,
environment=self.env_vars,
image_tag=self._cdkproxy_image_tag,
log_group=self.create_log_group(self._envname, self._resource_prefix,
log_group_name='persistent-email-reminders'),
schedule_expression=Schedule.expression('cron(0 9 ? * 2 *)'), # Run at 9:00 AM UTC every Monday
scheduled_task_id=f'{self._resource_prefix}-{self._envname}-persistent-email-reminders-schedule',
task_id=f'{self._resource_prefix}-{self._envname}-persistent-email-reminders',
task_role=self.task_role,
vpc=self._vpc,
security_group=self.scheduled_tasks_sg,
prod_sizing=self._prod_sizing,
)
self.ecs_task_definitions_families.append(persistent_email_reminders_task.task_definition.family)

@run_if(['modules.s3_datasets.active'])
def add_subscription_task(self):
subscriptions_task, subscription_task_def = self.set_scheduled_task(
Expand Down Expand Up @@ -453,7 +493,8 @@ def create_cicd_stacks_updater_role(self, envname, resource_prefix, tooling_acco
)
return cicd_stacks_updater_role

def create_task_role(self, envname, resource_prefix, pivot_role_name):
def create_task_role(self, envname, resource_prefix, pivot_role_name, email_custom_domain=None,
ses_configuration_set=None):
role_inline_policy = iam.Policy(
self,
f'ECSRolePolicy{envname}',
Expand Down Expand Up @@ -542,13 +583,26 @@ def create_task_role(self, envname, resource_prefix, pivot_role_name):
),
],
)

if email_custom_domain and ses_configuration_set:
role_inline_policy.document.add_statements(
iam.PolicyStatement(
actions=['ses:SendEmail'],
resources=[
f'arn:aws:ses:{self.region}:{self.account}:identity/{email_custom_domain}',
f'arn:aws:ses:{self.region}:{self.account}:configuration-set/{ses_configuration_set}',
],
)
)

task_role = iam.Role(
self,
f'ECSTaskRole{envname}',
role_name=f'{resource_prefix}-{envname}-ecs-tasks-role',
inline_policies={f'ECSRoleInlinePolicy{envname}': role_inline_policy.document},
assumed_by=iam.ServicePrincipal('ecs-tasks.amazonaws.com'),
)

task_role.grant_pass_role(task_role)
return task_role

Expand Down

0 comments on commit 32bea9d

Please sign in to comment.