Commit Graph
25 Commits
Author SHA1 Message Date
Viktor Liu 1fec7c0ded Pass skipRouteFirewallRules in the VNC envelope test after the main merge 2026-09-23 15:07:28 +02:00
Viktor Liu 2253450b4f Merge remote-tracking branch 'origin/main' into embedded-vnc 2026-09-23 15:05:30 +02:00
Riccardo Manfrin cb7ca8ef3f [client,management] Skip route firewall rule computation when no firewall (#7624)
* [client,management] Skip route firewall rule computation when no firewall

A peer that runs with the firewall disabled has no ACL manager and no
firewall to program, so nothing ever reads RoutesFirewallRules: the only
consumers are acl.Manager, which is reached solely when e.acl is set, and
the legacy-management probe in updateNetworkMap, which is guarded by a
non-nil firewall.

Building those rules is the most expensive part of a sync on a peer that
routes many network resources. On a 15k-peer deployment a debug bundle
showed getPeerNetworkResourceFirewallRules accounting for 62% of the
allocations of Calculate, and Calculate for effectively all of the
allocations of handleSync, which was taking 3.2s on average and holding
the engine lock for the duration.

Let the caller ask Calculate to leave the rules out. The client passes
its existing DisableFirewall setting; the management server keeps the
default and still produces them.

RoutesFirewallRulesIsEmpty is set from the resulting empty list, so a
receiver that would otherwise infer legacy management from an empty rule
set does not misread the skip.

* [client,management] Cover the skip flag through the envelope

Review feedback on #7624.

The components test compared only the length of the peer firewall rules, so
a change to their content would have passed while the message claimed they
came out unchanged. Compare the slices.

The skip path was also only exercised by setting the field directly on the
components, which bypasses the envelope conversion where
RoutesFirewallRulesIsEmpty is derived. That bit is what keeps the client from
reading skipped rules as a legacy management server, so it gets a test that
goes through EnvelopeToNetworkMap with the flag set.

* [management] Give the router a peer ACL so the rule comparison bites

Review feedback on #7624.

peer-router-1 appears in no peer ACL in the shared fixture, so its
FirewallRules came out empty and the equality assertion compared two empty
slices — it would have passed even if the peer rules were dropped entirely.

Add a policy covering the router and require the baseline to be non-empty
before comparing.
2026-09-23 11:50:44 +02:00
Viktor Liu 395d6521f2 Make the token-leak, VNC port-scoping and bidirectional-SSH tests able to fail 2026-09-23 08:57:38 +02:00
Viktor Liu 40424aa986 Drop network map rules with an unrecognized protocol instead of decoding them as all 2026-09-22 14:53:41 +02:00
Viktor Liu 750d093300 Restrict rule authorization to accept rules, the destination side for SSH, and the marker protocol's own port 2026-09-22 14:53:37 +02:00
Viktor Liu b08036a446 Merge branch 'main' into embedded-vnc 2026-09-02 19:10:03 +02:00
Pascal Fischer e3d6c3d0eb [management] fix private services calc on new db path (#7383) 2026-09-01 20:20:30 +02:00
Viktor Liu 424951c046 Scope crash recovery to Linux, drain connection handlers before teardown 2026-08-29 13:43:12 +02:00
Viktor Liu ec320278e3 Collect auth requirements for bidirectional source peers and fix follow-up review findings 2026-08-29 09:57:07 +02:00
Viktor Liu 8b719f0b4e Resolve VNC authorized users on the components path and fix uinput, X11 and macOS input gaps 2026-08-29 09:04:02 +02:00
Viktor Liu 84e88e0371 Merge branch 'main' into embedded-vnc 2026-08-29 08:42:02 +02:00
Pascal Fischer 353251d886 [management] fix posture check evaluation for direct peers in policy definition (#7348) 2026-08-28 16:46:42 +02:00
Pascal Fischer 611a9291cd [management] fix posture check flip evaluation for affected peers calc (#7347) 2026-08-28 15:39:48 +02:00
Viktor Liu 09e069a175 Merge branch 'main' into embedded-vnc 2026-08-27 16:01:14 +02:00
Pascal FischerandDmitri Dolguikh e06c17cf59 [management] network map from nmap data type (#6919)
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
Co-authored-by: Dmitri Dolguikh <dmitri.external@netbird.io>
2026-08-27 11:28:05 +02:00
Viktor Liu 51095cb986 [client, management] Support per-peer lazy connection state and default proxy peers to lazy (#6762)
* Support per-peer lazy connection state and default proxy peers to lazy

* Classify forward targets from incoming config in lazy exclusion

* Set IsUserspaceBind mock so lazy manager starts in engine test

* Skip lazy exclude reconciliation when the set is unchanged

* Keep cached lazy flag when a sync carries no peer config
2026-08-26 09:33:51 +02:00
Viktor Liu b6dccbb8b2 Merge branch 'main' into embedded-vnc 2026-08-25 18:26:29 +02:00
Bethuel Mmbaga e206f8827d [management] Suppress staticcheck warnings for deprecated proto fields (#7261) 2026-08-20 16:20:18 +02:00
Viktor Liu 4b9f167401 Merge main into embedded-vnc
# Conflicts:
#	client/internal/engine.go
2026-08-06 10:50:48 +02:00
Pascal Fischer f9b412228e [management] fix handling of empty network map during decode and encode (#6987) 2026-08-03 13:20:53 +02:00
Viktor Liu a407bec333 Build VNC auth for peers on the component network map path 2026-07-30 11:01:35 +02:00
Viktor Liu d3dea56828 Carry netbird-vnc policies over the component network map 2026-07-30 10:43:26 +02:00
Pascal Fischer 31ed241a1a [management] component types (#6866) 2026-07-23 11:37:09 +02:00
8435682ac8 [client, management] offload client config generation to the client (#6711)
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
Co-authored-by: crn4 <vladimir@netbird.io>
Co-authored-by: pascal <pascal@netbird.io>
2026-07-22 18:20:27 +02:00