Skip to content
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

[cli] Enable logging for the cdktoolkit-stagingbucket #9294

Closed
2 tasks
ddneilson opened this issue Jul 28, 2020 · 5 comments
Closed
2 tasks

[cli] Enable logging for the cdktoolkit-stagingbucket #9294

ddneilson opened this issue Jul 28, 2020 · 5 comments
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. needs-design This feature request needs additional design work. p1 package/tools Related to AWS CDK Tools or CLI

Comments

@ddneilson
Copy link
Contributor

It has been identified during a security audit that the cdktoolkit-stagingbucket that is created by CDK bootstrap does not have logging enabled. The request is to enhance the bootstrap so that it can include deployment of a logging bucket.

Use Case

Security -- "Inadequate log information could negatively impact forensics investigations, preventing engineers from appropriately root causing incidents."

This is particularly important, in my opinion, because the zip files that contain Lambda code are, by default, staged in the CDK staging bucket when using an Asset to deploy -- as many of the CDK constructs do. If those assets were modified in the staging bucket by an attacker, then there would be no way to perform an investigation on how/when that happened without S3 access logging.

Proposed Solution

Enable either:

  1. Enable server access logs for the S3 bucket -- https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html ; or
  2. Logging S3 API calls for the bucket using CloudTrail -- https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudtrail-logging.html

Storing logs is not free, so there should be some consideration for making the logging optional (default: enabled), or providing a lifecycle rule that will expire logs older than some period.

Other

N/A

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@ddneilson ddneilson added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 28, 2020
@SomayaB SomayaB changed the title [bootstrap] Enable logging for the cdktoolkit-stagingbucket [cli] Enable logging for the cdktoolkit-stagingbucket Jul 28, 2020
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jul 28, 2020
@ericzbeard ericzbeard added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Jul 28, 2020
@shivlaks shivlaks added effort/medium Medium work item – several days of effort effort/small Small work item – less than a day of effort review/small and removed effort/medium Medium work item – several days of effort labels Jul 30, 2020
@shivlaks
Copy link
Contributor

shivlaks commented Aug 5, 2020

related to #9256 - as suggested by @rix0rrr we're pursuing based on this comment:

  1. cdk bootstrap --show-template - displays the template
  2. cdk bootstrap --use-template bla.json

I'm in favour of this approach as the feedback around having to keep adding flags to deliver functionality is something that can quickly grow out of control. It also becomes more challenging to debug and triage every time we add new flags to deliver functionality.

@ddneilson does this approach still meet your requirements? any thoughts/feedback/concerns?

@shivlaks shivlaks added the in-progress This issue is being actively worked on. label Aug 5, 2020
@shivlaks
Copy link
Contributor

shivlaks commented Aug 5, 2020

marking issue as in-progress as I'm actively working on it

@DavidChristiansen
Copy link
Contributor

How is this progressing @shivlaks - I am in need of this so is there anything I can do to assist ?

@NetaNir
Copy link
Contributor

NetaNir commented Dec 8, 2020

This is not being actively worked on, the current recommended way to achieve this is to customize the bootstrap stack, explained here: https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html#bootstrapping-customizing

@NetaNir NetaNir added effort/medium Medium work item – several days of effort needs-design This feature request needs additional design work. and removed effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. review/small labels Dec 8, 2020
@NGL321 NGL321 assigned rix0rrr and unassigned shivlaks Jan 25, 2021
@github-actions
Copy link

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. needs-design This feature request needs additional design work. p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants