firezone / firezone

WireGuard®-based zero-trust access platform with OIDC auth, identity sync, and NAT traversal.
https://www.firezone.dev
Apache License 2.0
6.39k stars 270 forks source link

fix(snownet): ensure failed refresh requests invalidate allocation #5538

Closed thomaseizinger closed 3 days ago

thomaseizinger commented 4 days ago

Whilst we had a unit-test for this behaviour, it was written poorly and didn't assert on the correct thing. Instead, I happened to pass because we advanced time far enough to trigger the actual expiry of the allocation instead of directly expiring it upon the last failed retry of the refresh request.

Re-writing this test then surfaced that we were in fact no invalidating the allocation correctly. In real-time, this represents a difference of 5 minutes within which a client may try to use a relay candidate that is in fact no longer working.

Related: #5519.

vercel[bot] commented 4 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **firezone** | ⬜️ Ignored ([Inspect](https://vercel.com/firezone/firezone/3RMAApTsFPfEwKxYv757WuY21Kju)) | | | Jun 25, 2024 6:02am |
github-actions[bot] commented 4 days ago

Terraform Cloud Plan Output

Plan: 15 to add, 23 to change, 15 to destroy.

Terraform Cloud Plan

github-actions[bot] commented 4 days ago

Performance Test Results

TCP

Test Name Received/s Sent/s Retransmits
direct-tcp-client2server 233.7 MiB (+0%) 235.4 MiB (+0%) 285 (+22%)
direct-tcp-server2client 238.0 MiB (+0%) 239.4 MiB (+0%) 628 (+87%)
relayed-tcp-client2server 227.7 MiB (-5%) 228.5 MiB (-5%) 389 (-13%)
relayed-tcp-server2client 243.3 MiB (+2%) 243.9 MiB (+2%) 467 (-31%)

UDP

Test Name Total/s Jitter Lost
direct-udp-client2server 500.0 MiB (+0%) 0.04ms (+40%) 43.77% (+7%)
direct-udp-server2client 500.0 MiB (-0%) 0.01ms (-27%) 23.16% (-8%)
relayed-udp-client2server 500.0 MiB (+0%) 0.06ms (+62%) 54.18% (-4%)
relayed-udp-server2client 499.8 MiB (+0%) 0.02ms (-34%) 36.56% (+10%)