-
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
Disable security group rule creation in load balancers when passing your own security group #3177
Comments
I agree. Makes sense that it will be possible to disable automatic rule creation. It will be a while before we can attend to this. If this is blocking you, we'll gladly accept a PR. |
I started doing just that, and while digging in realized that There might be value in allowing |
This will create an inbound rule for everyone (0.0.0.0) on TCP / 80 How does one either:
|
I was fighting with this issue for some time, so I thought I'd share my solution here. First I create my security group, then when passing a security group to the ALB I'm using SecurityGroup.fromSecurityGroupId, referencing the security group I created and passing |
@juho9000 thanks for sharing your solution for now. Here is the Typescript code snippet for the problem:
|
Any word on this being fixed? Just encountered it myself and while the above solutions work, something native would be good. |
I've recently gone through this and didn't figure it out until I wasted some time on it, so I'll leave it here. There is a config option:
this is from https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_ecs_patterns/ApplicationLoadBalancedFargateService.html and if set to false does not create inbound rules on the security group of the load balancer. I also think this should be false by default, as this could lead to load balancers exposed by error to the internet, and, if disabled by default, just makes people read the documentation twice to get it working. |
I'm submitting a ...
What is the current behavior?
If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
When you pass your own security group to a load balancer, it forces creation of an ingress rule to port 80 and/or 443 from 0.0.0.0.
It's not only counterintuitive, it prevents us from using the load balancer constructs at all. We need to be able to lock down this LB to specific IP ranges.
I'd also argue there are unexpected security implications. I expect my security group to be respected, not edited.
Removal of this behavior when passing your own security group, or at the very least the ability to disable it.
We can't use the constructs without it, and implicitly changing a security group is not great behavior to begin with.
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: