Skip to content

Commit 6c9f340

Browse files
Merge pull request #121 from LorenzoTettamanti/identity_enhancements
Identity service improvements (pt.1)
2 parents 228042c + 9b0200a commit 6c9f340

File tree

17 files changed

+426
-919
lines changed

17 files changed

+426
-919
lines changed

core/Cargo.lock

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

core/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ tracing = "0.1.40"
2626
futures = "0.3.31"
2727
anyhow = "1.0.93"
2828
schemas = "0.4.0"
29-
yaml-rust2 = "0.9.0"
30-
kube = { version = "0.96.0", features = ["runtime", "derive", "ws"] }
31-
k8s-openapi = { version = "0.23.0", features = ["latest"] }
29+
yaml-rust2 = "0.10.3"
30+
kube = { version = "1.1.0", features = ["runtime", "derive", "ws"] }
31+
k8s-openapi = { version = "0.25.0", features = ["latest"] }
3232
serde_json = "1.0.133"
3333
tokio-util = { version = "0.7.8", features = ["io"] }
3434
tokio-stream = { version = "0.1.9", features = ["net"] }
@@ -38,19 +38,19 @@ hyper-util = "0.1.10"
3838
tower = "0.5.1"
3939
ipnet = "2.10.1"
4040
iptables = "0.5.2"
41-
itertools = "0.13.0"
41+
itertools = "0.14.0"
4242
libc = "0.2.164"
4343
libloading = "0.8.5"
44-
libp2p = "0.54.1"
44+
libp2p = "0.56.0"
4545
serde_yaml = "0.9.34"
4646
pnet = "0.35.0"
4747
bytes = "1.9.0"
48-
prost = "0.13.4"
48+
prost = "0.14.1"
4949
trust-dns-server = "0.23.2"
5050
dirs = "6.0.0"
5151

5252
[dev-dependencies]
5353
wiremock = "0.6.0"
5454

5555
[build-dependencies]
56-
prost-build = "0.13.4"
56+
prost-build = "0.14.1"

core/src/client/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ tracing = "0.1.40"
1111
futures = "0.3.31"
1212
anyhow = "1.0.93"
1313
schemas = "0.4.0"
14-
yaml-rust2 = "0.9.0"
15-
kube = { version = "0.98.0", features = ["runtime", "derive", "ws"]}
16-
k8s-openapi = { version = "0.24.0", features = ["latest"] }
14+
yaml-rust2 = "0.10.3"
15+
kube = { version = "1.1.0", features = ["runtime", "derive", "ws"]}
16+
k8s-openapi = { version = "0.25.0", features = ["latest"] }
1717
serde_json = "1.0.133"
1818
tokio-util = { version = "0.7.8", features = ["io"] }
1919
tokio-stream = { version = "0.1.9", features = ["net"] }
@@ -23,15 +23,15 @@ hyper-util = "0.1.10"
2323
tower = "0.5.1"
2424
ipnet = "2.10.1"
2525
iptables = "0.5.2"
26-
itertools = "0.13.0"
26+
itertools = "0.14.0"
2727
libc = "0.2.164"
2828
libloading = "0.8.5"
29-
libp2p = "0.54.1"
29+
libp2p = "0.56.0"
3030
serde_yaml = "0.9.34"
3131
pnet = "0.35.0"
3232
bytes = "1.9.0"
33-
prost = "0.13.4"
34-
rdkafka = "0.37.0"
33+
prost = "0.14.1"
34+
rdkafka = "0.38.0"
3535
trust-dns-server = "0.23.2"
3636
dirs = "6.0.0"
3737

core/src/components/conntracker/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ edition = "2021"
77
[dependencies]
88
aya-ebpf = { git = "https://github.com/aya-rs/aya" }
99
aya-log-ebpf = { git = "https://github.com/aya-rs/aya" }
10-
bytemuck = {version ="1.23.0",features = ["derive"]}
11-
network-types = "0.0.8"
1210

1311
[build-dependencies]
1412
which = { version = "7.0.0", default-features = false }
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
use aya_ebpf::{macros::map, maps::{LruPerCpuHashMap, PerfEventArray}};
2+
3+
#[repr(C)]
4+
#[derive(Clone, Copy)]
5+
pub struct PacketLog {
6+
pub proto: u8,
7+
pub src_ip: u32,
8+
pub src_port: u16,
9+
pub dst_ip: u32,
10+
pub dst_port: u16,
11+
pub pid: u32
12+
}
13+
14+
// This structure is only for active connections
15+
#[repr(C)]
16+
#[derive(Clone, Copy)]
17+
pub struct ConnArray {
18+
pub src_ip: u32,
19+
pub dst_ip: u32,
20+
pub src_port: u16,
21+
pub dst_port: u16,
22+
pub proto: u8,
23+
}
24+
25+
#[repr(C)]
26+
#[derive(Clone, Copy, Debug)]
27+
pub struct VethLog {
28+
pub name: [u8; 16],
29+
pub state: u64, //state var type: long unsigned int
30+
pub dev_addr: [u32; 8],
31+
pub event_type: u8, //i choose 1 for veth creation or 2 for veth destruction
32+
pub netns: u32,
33+
pub pid: u32
34+
35+
}
36+
37+
#[map(name = "EventsMap")]
38+
pub static mut EVENTS: PerfEventArray<PacketLog> = PerfEventArray::new(0);
39+
40+
//TODO: ConnectionMap needs a rework after implementing issue #105
41+
#[map(name = "ConnectionMap")]
42+
pub static mut ACTIVE_CONNECTIONS: LruPerCpuHashMap<u16, ConnArray> =
43+
LruPerCpuHashMap::with_max_entries(65536, 0);
44+
45+
#[map(name = "ConnectionTrackerMap")]
46+
pub static mut CONNTRACKER: LruPerCpuHashMap<ConnArray, u8> =
47+
LruPerCpuHashMap::with_max_entries(65536, 0);
48+
49+
#[map(name = "veth_identity_map")]
50+
pub static mut VETH_EVENTS: PerfEventArray<VethLog> = PerfEventArray::new(0);

0 commit comments

Comments
 (0)