/kind feature
Describe the solution you'd like
Currently, when Cluster API Provider OpenStack (CAPO) creates security group rules, it defines default egress rules that allows all outbound traffic (0.0.0.0/0). This behavior is implemented here:
|
var defaultRules = []resolvedSecurityGroupRuleSpec{ |
|
{ |
|
Direction: securityGroupRuleDirectionEgress, |
|
Description: "Full open", |
|
EtherType: securityGroupRuleEtherTypeIPv4, |
|
PortRangeMin: 0, |
|
PortRangeMax: 0, |
|
Protocol: "", |
|
RemoteIPPrefix: "", |
|
}, |
|
{ |
|
Direction: securityGroupRuleDirectionEgress, |
|
Description: "Full open", |
|
EtherType: securityGroupRuleEtherTypeIPv6, |
|
PortRangeMin: 0, |
|
PortRangeMax: 0, |
|
Protocol: "", |
|
RemoteIPPrefix: "", |
|
}, |
|
} |
In some environments, this default behavior is too permissive and does not comply with security or business constraints that require restricting outbound traffic to specific CIDRs.
I would like to have a way to customize or restrict the default egress rules generated by CAPO without having to disable managedSecurityGroups, since this feature provides other valuable functionality that I want to keep (such as automated lifecycle management of security groups).
A possible solution could be one of the following:
- Allow configuring egress CIDR ranges via OpenStackCluster spec
- Provide a flag to disable the default "allow all egress" rule so that I can add only allowed egress ranges via
OpenStackCluster.spec.managedSecurityGroups.allNodesSecurityGroupRules
The goal is to support environments where outbound traffic must be explicitly restricted without losing the benefits of managed security groups.
Anything else you would like to add:
This limitation makes it difficult to adopt CAPO in environments with strict network segmentation requirements (e.g., regulated industries or zero-trust networks), where unrestricted egress is not allowed even temporarily.
A configurable approach would significantly improve the provider’s flexibility and enterprise readiness.
/kind feature
Describe the solution you'd like
Currently, when Cluster API Provider OpenStack (CAPO) creates security group rules, it defines default egress rules that allows all outbound traffic (0.0.0.0/0). This behavior is implemented here:
cluster-api-provider-openstack/pkg/cloud/services/networking/securitygroups_rules.go
Lines 32 to 51 in a6f9102
In some environments, this default behavior is too permissive and does not comply with security or business constraints that require restricting outbound traffic to specific CIDRs.
I would like to have a way to customize or restrict the default egress rules generated by CAPO without having to disable
managedSecurityGroups, since this feature provides other valuable functionality that I want to keep (such as automated lifecycle management of security groups).A possible solution could be one of the following:
OpenStackCluster.spec.managedSecurityGroups.allNodesSecurityGroupRulesThe goal is to support environments where outbound traffic must be explicitly restricted without losing the benefits of managed security groups.
Anything else you would like to add:
This limitation makes it difficult to adopt CAPO in environments with strict network segmentation requirements (e.g., regulated industries or zero-trust networks), where unrestricted egress is not allowed even temporarily.
A configurable approach would significantly improve the provider’s flexibility and enterprise readiness.