When users define Expose objects to connect VPCs, we need to clearly define what is allowed and what is not, and what the meaning of some expressions is. Eventually, this should translate into making sure that the appropriate behaviour (matching the semantics) is implemented, and setting up the relevant validation steps to enforce restrictions.
Related:
As a reminder, we consider an Expose object as:
- A list of prefixes (and optional associated port ranges - this is coming soon) for internal prefixes exposed,
ips
- A list of prefixes (and optional associated port ranges) for actually exposed addresses and ports, after NAT/PAT,
as_range
- A list of exclusion prefixes (and optional associated port ranges) to apply to these exposed prefixes,
not and not_as (for ips and as_range, respectively).
The lists may or may not be present from the CRD passed by the user.
Here's a non-exhaustive list of items to consider for an Expose object.
- Can lists be present but empty? Does it change the behaviour compared to when they're not present at all?
- What happens if
ips list is not present?
- In particular, what happens if
ips is not present but if a not list is present?
- What happens if
ips list contains 0.0.0.0/0 as prefix (or ::/0)?
- With a port range?
- Without a port range?
- What happens if
as_range list is not present?
- In particular, what happens if
as_range is not present but if a not_as list is present?
- What happens if
as_range list contains 0.0.0.0/0 as prefix (or ::/0)?
- With a port range?
- Without a port range?
- What happens if
not or not_as contains 0.0.0.0/0 as prefix (or ::/0)?
- With a port range?
- Without a port range?
- Can a list contain a mix of IPv4/IPv6 prefixes?
- Can the different lists of an expose contain a mix of IPv4/IPv6 prefixes?
- Today?
- In the future for NAT46/NAT64?
- Can prefixes in
ips or as_range lists overlap? (IP addresses overlapping, or if both have port ranges, IP addresses + port ranges overlapping)
- Can prefixes in
not or not_as lists overlap?
- Can prefixes in
not or not_as contain item not in ips or as_range (respectively)?
- If there's not overlap at all?
- If there's some overlap? (Example: exclude
0.0.0.0/0, ports 5001-6000 from some ips)
- Can prefixes in
ips for different Expose objects of a peering, once their exclusion prefixes applied, overlap?
- Can prefixes in
as_range for different Expose objects of a peering, once their exclusion prefixes applied, overlap?
- Can we have multiple peerings between any pair of VPCs?
- Can prefixes in
ips for Expose objects from different peerings between a pair of VPC overlap with prefixes from ips in the Expose of another peering for the same VPCs?
- Can prefixes in
as_range for Expose objects from different peerings between a pair of VPC overlap with prefixes from as_range in the Expose of another peering for the same VPCs?
- Do we need a particular treatment for some ranges of IPs (
0.0.0.0, 255.255.255.255, etc.)?
- Do we need a particular treatment for port 0 (mostly invalid for TCP/UDP)?
- When port ranges are in use, what are the expectations regarding ICMP?
- ...
We should settle on the expectations for each of these items (some of them we already know) and formalise it, so we can document it for the users and implement the relevant behaviour/validation. We should also double-check the existing validation steps.
When users define Expose objects to connect VPCs, we need to clearly define what is allowed and what is not, and what the meaning of some expressions is. Eventually, this should translate into making sure that the appropriate behaviour (matching the semantics) is implemented, and setting up the relevant validation steps to enforce restrictions.
Related:
As a reminder, we consider an Expose object as:
ipsas_rangenotandnot_as(foripsandas_range, respectively).The lists may or may not be present from the CRD passed by the user.
Here's a non-exhaustive list of items to consider for an Expose object.
ipslist is not present?ipsis not present but if anotlist is present?ipslist contains0.0.0.0/0as prefix (or::/0)?as_rangelist is not present?as_rangeis not present but if anot_aslist is present?as_rangelist contains0.0.0.0/0as prefix (or::/0)?notornot_ascontains0.0.0.0/0as prefix (or::/0)?ipsoras_rangelists overlap? (IP addresses overlapping, or if both have port ranges, IP addresses + port ranges overlapping)notornot_aslists overlap?notornot_ascontain item not inipsoras_range(respectively)?0.0.0.0/0, ports 5001-6000from someips)ipsfor different Expose objects of a peering, once their exclusion prefixes applied, overlap?as_rangefor different Expose objects of a peering, once their exclusion prefixes applied, overlap?ipsfor Expose objects from different peerings between a pair of VPC overlap with prefixes fromipsin the Expose of another peering for the same VPCs?as_rangefor Expose objects from different peerings between a pair of VPC overlap with prefixes fromas_rangein the Expose of another peering for the same VPCs?0.0.0.0,255.255.255.255, etc.)?We should settle on the expectations for each of these items (some of them we already know) and formalise it, so we can document it for the users and implement the relevant behaviour/validation. We should also double-check the existing validation steps.