Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
[WIP]Fix: Added Documentation, S3 Versioning, enforce https (#796)
Browse files Browse the repository at this point in the history
* chore: enforceHttps on openSearch

* chore: scoutsuite

* chore: resolve scoutsuite

* chore: add best practices for cloudtrail and mfa delete

* chore: remove unnecessary import

Co-authored-by: sevu1 <112517151+sevu1@users.noreply.github.com>
  • Loading branch information
kcadette and sevu1 committed Jan 23, 2023
1 parent b48c3fe commit 9861f00
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ For more information about SMART on FHIR Works, see [SMART on FHIR Works FAQ](/S

We recommend configuring your IdP to set token expiration within 15-30 minutes, or less, of when issued.

**Is multi-factor authentication (MFA) delete recommended on S3 buckets?**
Yes, adding MFA delete adds an additional layer of security to your S3 buckets. After enabling [MFA delete](https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiFactorAuthenticationDelete.html) for your S3 buckets, bucket owners will be required to provide two forms of authentication in requests to delete a bucket version or change its versioning state. To add this extra security layer, refer to [Configuring MFA delete](https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiFactorAuthenticationDelete.html).

**What is recommended to configure data-event logging?**
[AWS CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html) is recommended for logging FWoA data events. To configure data-event logging, [create a “trail”](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html) for your AWS account. Be sure to follow [CloudTrail security best practices](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/best-practices-security.html) when doing so.
### Development

[Instructions for making local code changes](./DEVELOPMENT.md)
Expand Down
4 changes: 4 additions & 0 deletions lib/bulkExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ export default class BulkExportResources {
serverAccessLogsBucket: fhirLogsBucket,
serverAccessLogsPrefix: 'GlueScriptsBucket',
blockPublicAccess,
enforceSSL: true,
versioned: true,
});

this.glueScriptsBucketHttpsOnlyPolicy = new BucketPolicy(scope, 'glueScriptsBucketHttpsOnlyPolicy', {
Expand All @@ -129,6 +131,8 @@ export default class BulkExportResources {
],
serverAccessLogsPrefix: 'BulkExportResultsBucket',
blockPublicAccess,
enforceSSL: true,
versioned: true,
});

this.bulkExportResultsBucketHttpsOnlyPolicy = new BucketPolicy(
Expand Down
3 changes: 3 additions & 0 deletions lib/cdk-infra-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export default class FhirWorksStack extends Stack {
ignorePublicAcls: true,
restrictPublicBuckets: true,
},
enforceSSL: true,
versioned: true,
});
NagSuppressions.addResourceSuppressions(fhirLogsBucket, [
{
Expand Down Expand Up @@ -245,6 +247,7 @@ export default class FhirWorksStack extends Stack {
ignorePublicAcls: true,
restrictPublicBuckets: true,
},
enforceSSL: true,
});

fhirBinaryBucket.addToResourcePolicy(
Expand Down
1 change: 1 addition & 0 deletions lib/elasticsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ export default class ElasticSearchResources {
slowIndexLogEnabled: true,
slowIndexLogGroup: this.searchLogs,
},
enforceHttps: true,
});
this.elasticSearchDomain.node.addDependency(this.searchLogsResourcePolicy);
NagSuppressions.addResourceSuppressions(this.elasticSearchDomain, [
Expand Down

0 comments on commit 9861f00

Please sign in to comment.