-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(ec2): allowAllOutbound on default security group should mimic allowAllTraffic on NAT instance #12673
Comments
This is a comment of allowAllTraffic. aws-cdk/packages/@aws-cdk/aws-ec2/lib/nat.ts Lines 150 to 162 in 31b1b32
According to this, |
The way I (and potentially others) use this option is to let CDK generate a default security group and then configure it manually. However this default security group should not have all outbound connections allowed if the flag is explicitly passed.
Pre configuring a security group before creating a NAT instance seems impossible since the preconfigured security group would depend on a VPC which would in turn depend on the NAT instance.
…________________________________
From: Masaharu Komuro <notifications@github.com>
Sent: Saturday, January 23, 2021 1:19:55 PM
To: aws/aws-cdk <aws-cdk@noreply.github.com>
Cc: Sid <sid_26@outlook.com>; Author <author@noreply.github.com>
Subject: Re: [aws/aws-cdk] (ec2): allowAllOutbound on default security group should mimic allowAllTraffic on NAT instance (#12673)
This is a comment of allowAllTraffic.
https://github.com/aws/aws-cdk/blob/31b1b3289b99c4ec4ed19c51705d66f0e83783dd/packages/%40aws-cdk/aws-ec2/lib/nat.ts#L150-L162
/**
* Allow all traffic through the NAT instance
*
* If you set this to false, you must configure the NAT instance's security
* groups in another way, either by passing in a fully configured Security
* Group using the `securityGroup` property, or by configuring it using the
* `.securityGroup` or `.connections` members after passing the NAT Instance
* Provider to a Vpc.
*
* @default true
*/
I also feel that this may be a bit misleading, because it looks like the behavior when allowAllTraffic is false is practically not implemented.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#12673 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACBNKC3I3AOCAOXD7DZLHN3S3J5SHANCNFSM4WPNHTAA>.
|
…12674) `allowAllTraffic` only applies to inbound traffic, but it should also apply to outbound traffic. Deprecate it and add a new enum-based property, `defaultAllowedTraffic`, which also allows controlling outbound traffic rules. There is no option to allow inbound but not outbound because there is no use case for that. Fix #12673 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…ws#12674) `allowAllTraffic` only applies to inbound traffic, but it should also apply to outbound traffic. Deprecate it and add a new enum-based property, `defaultAllowedTraffic`, which also allows controlling outbound traffic rules. There is no option to allow inbound but not outbound because there is no use case for that. Fix aws#12673 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Setting
allowAllTraffic
tofalse
inec2.NatProvider.instance
should setallowAllOutbound
on the default security group created for the NAT instance.Reproduction Steps
What did you expect to happen?
Default security group associated with NAT instance disallows all outbound connections.
What actually happened?
All outbound connections are allowed on the default security group.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: