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

aws_s3: minimum_tls_version alllows setting invalid TLS versions #30226

Closed
ericprice3678 opened this issue May 15, 2024 · 3 comments
Closed

aws_s3: minimum_tls_version alllows setting invalid TLS versions #30226

ericprice3678 opened this issue May 15, 2024 · 3 comments
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@ericprice3678
Copy link

Describe the bug

You can currently set an invalid TLS Version using the minimumTLSVersion prop on s3.Bucket which will lock you out of being able to interact with the bucket after its created.

Obviously you should never do this, but its still possible.

my_broken_s3_bucket = s3.Bucket( self, "bucket", enforce_ssl=True, minimum_tls_version=1.4 )

Will deploy and create an S3 bucket, however because its not possible to meet its Bucket Policy's TLS requirements you cannot interact with this AWS Bucket at all. I presume you'd need to contact AWS Support to get it deleted.

Screenshot 2024-05-16 at 9 42 04 AM

Expected Behavior

Some type of input validation to this to make sure you can't do this.

Current Behavior

It allows you to set invalid the minimum tls version to an invalid result

Reproduction Steps

my_broken_s3_bucket = s3.Bucket( self, "bucket", enforce_ssl=True, minimum_tls_version=1.4 )

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.132.1 (build 9df7dd3)

Framework Version

No response

Node.js Version

v21.4.0

OS

macos

Language

Python

Language Version

No response

Other information

No response

@ericprice3678 ericprice3678 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@github-actions github-actions bot added the @aws-cdk/aws-s3 Related to Amazon S3 label May 15, 2024
@ericprice3678
Copy link
Author

Forgot to mention, once this is done its not fixable. You can't delete the bucket manually and you also can't change the version number to a supported one and deploy an updated Stack because that will also get an Access Denied result.

@pahud
Copy link
Contributor

pahud commented May 16, 2024

Thank you for bringing this to our attention.

my_broken_s3_bucket = s3.Bucket( self, "bucket", enforce_ssl=True, minimum_tls_version=1.4 )

Can you share a sample bucket policy that would conflict with this prop so we can have more context about it?

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels May 16, 2024
Copy link

This issue has not received a response in a while. 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 the closing-soon This issue will automatically close in 4 days unless further comments are made. label May 18, 2024
@github-actions github-actions bot added 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 May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-s3 Related to Amazon S3 bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants