Skip to content

Commit 4a67564

Browse files
authored
Allow limited inbound ICMP to Nexus, add ICMP type/code filters to firewall rules (#8194)
This PR adds more detail to firewall protocol filters. Rather than being specified purely as a string->enum mapping, each protocol filter is now a standard tagged enum like many other types in the Nexus API. Here, this allows us to express more control over ICMP traffic. For instance: * all ICMP (`[{"type": "icmp"}]`), * all ICMP echo (`[{"type": "icmp", "value": { icmp_type: 0 }}, {"type": "icmp", "value": { icmp_type: 8 }}]`) * a subset of ICMP destination unreachable (`{"type": "icmp", "value": { icmp_type: 0, code: "0-4" }}`). Building on this, Nexus now has a firewall entry to permit the receipt of e.g., Destination Unreachable messages. I've added a new system endpoint to control whether this is enabled or disabled. As part of this, I've converted the CRDB representation from a fixed `ENUM[]` to a `STRING(32)[]`. There are a couple of reasons for this: * ICMPv6 will need a similar level of specificity, * Users will need to specify arbitrary (ranges) of L4 protocols, once OPTE is more permissive (oxidecomputer/opte#609). * Future protocols we give first-class support to might also require/want in-depth filters. Should close #7998.
1 parent 3c473a8 commit 4a67564

File tree

38 files changed

+1337
-134
lines changed

38 files changed

+1337
-134
lines changed

.github/buildomat/jobs/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "helios / deploy"
44
#: variety = "basic"
5-
#: target = "lab-2.0-opte-0.36"
5+
#: target = "lab-2.0-opte-0.37"
66
#: output_rules = [
77
#: "%/var/svc/log/oxide-*.log*",
88
#: "%/zone/oxz_*/root/var/svc/log/oxide-*.log*",

Cargo.lock

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ lldp_protocol = { git = "https://github.com/oxidecomputer/lldp", package = "prot
511511
macaddr = { version = "1.0.1", features = ["serde_std"] }
512512
maplit = "1.0.2"
513513
newtype_derive = "0.1.6"
514-
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "760b4b547e301a31d4dcb92ba97aabdb2a3e0cba" }
515-
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "760b4b547e301a31d4dcb92ba97aabdb2a3e0cba" }
514+
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "638c897d5ed1e5d3f2de0c1cb9dfaa4d77a35dea" }
515+
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "638c897d5ed1e5d3f2de0c1cb9dfaa4d77a35dea" }
516516
multimap = "0.10.1"
517517
nexus-auth = { path = "nexus/auth" }
518518
nexus-background-task-interface = { path = "nexus/background-task-interface" }
@@ -568,7 +568,7 @@ omicron-workspace-hack = "0.1.0"
568568
omicron-zone-package = "0.12.2"
569569
oxide-client = { path = "clients/oxide-client" }
570570
oxide-tokio-rt = "0.1.1"
571-
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "f5560fae02ad3fc349fabc6454c321143199ca9e", features = [ "api", "std" ] }
571+
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "3f2dfe36f156b486e60e7a08263ad6227be1e969", features = [ "api", "std" ] }
572572
oxlog = { path = "dev-tools/oxlog" }
573573
oxnet = "0.1.2"
574574
once_cell = "1.21.3"
@@ -578,7 +578,7 @@ openapiv3 = "2.2.0"
578578
# must match samael's crate!
579579
openssl = "0.10"
580580
openssl-sys = "0.9"
581-
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "f5560fae02ad3fc349fabc6454c321143199ca9e" }
581+
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "3f2dfe36f156b486e60e7a08263ad6227be1e969" }
582582
oso = "0.27"
583583
owo-colors = "4.2.2"
584584
oximeter = { path = "oximeter/oximeter" }

clients/sled-agent-client/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ progenitor::generate_api!(
9090
TypedUuidForSupportBundleKind = omicron_uuid_kinds::SupportBundleUuid,
9191
TypedUuidForZpoolKind = omicron_uuid_kinds::ZpoolUuid,
9292
Vni = omicron_common::api::external::Vni,
93+
VpcFirewallIcmpFilter = omicron_common::api::external::VpcFirewallIcmpFilter,
9394
ZpoolKind = omicron_common::zpool_name::ZpoolKind,
9495
ZpoolName = omicron_common::zpool_name::ZpoolName,
9596
}
@@ -308,7 +309,7 @@ impl From<omicron_common::api::external::VpcFirewallRuleProtocol>
308309
match s {
309310
Tcp => Self::Tcp,
310311
Udp => Self::Udp,
311-
Icmp => Self::Icmp,
312+
Icmp(v) => Self::Icmp(v),
312313
}
313314
}
314315
}

0 commit comments

Comments
 (0)