These commits are when the Protocol Buffers files have changed: (only the last 100 relevant commits are shown)
| Commit: | 5885fcc | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Add CrowdSec AppSec request inspection to the reverse proxy
| Commit: | 4efadd1 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Add allow_match any/all mode to reverse proxy access restrictions
| Commit: | b640804 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Enforce reverse proxy group access before minting and when honouring a session cookie
| Commit: | 73cffdb | |
|---|---|---|
| Author: | Zoltán Papp | |
Add peer-to-peer file drop Files move directly between peers over the overlay, with no server in the path. The receiver listens on the WireGuard address only, so the port is unreachable from outside the tunnel, and every offer is matched to a known peer before anything is read. Consent is the default: an offer carries metadata alone, and no payload moves until the receiver accepts. Policy is per profile and device-local — off, ask, or auto-accept, with per-sender exceptions on top. Policy and history live in the profile's preferences, so removing a profile takes its file drop state with it. Transfers interrupted by a restart are settled on load; nothing survives to finish them, and left alone they would sit in the log as permanently pending. The Android bindings pull payload bytes through a chunk-returning stream: gomobile copies a []byte argument into a fresh Java array and never copies it back, so a fill-my-buffer method would hand back the right length with no data.
| Commit: | 0738734 | |
|---|---|---|
| Author: | Zoltán Papp | |
[client] Force interactive login when extending the auth session A session extend must be answered from the account the peer is registered under. With a silent PKCE flow (DisablePromptLogin or max_age=0) the IdP answers from whatever session it already holds, which need not be the peer's account when several are signed in; the token then fails the user match in ExtendAuthSession with no way to pick another account. Mark the PKCE flow request as a session extend so the management server can force prompt=login for it, overriding the configured silent flow.
| Commit: | fdb956a | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
Merge remote-tracking branch 'origin/main' into revert/component-types Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | e290769 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | GitHub | |
[client] Take the graphical session answer from the caller instead of the daemon environment (#7187)
| Commit: | b08120b | |
|---|---|---|
| Author: | mlsmaycon | |
| Committer: | Maycon Santos | |
[management,client] Plumb anonymize level and upload URL through remote debug bundle jobs PR #7102 added an anonymization level to debug bundles and the anonymize_level proto field, but nothing on the management side ever set it: the remote-job builder dropped the field and the REST schema never exposed it, so a remotely triggered bundle always ran at the default level regardless of what an operator asked for. The upload destination for remote jobs was likewise fixed to the default upload server, with no way to direct a bundle to a self-hosted one. Expose anonymize_level and a new upload_url on the REST BundleParameters and the management proto, and map both onto the job request streamed to the client. Both are optional: an omitted value crosses the wire as the empty string, which the client resolves to its own defaults — the default anonymization level and the default upload server — matching how the netbird CLI defaults the same inputs.
| Commit: | 1d93c5e | |
|---|---|---|
| Author: | mlsmaycon | |
| Committer: | Maycon Santos | |
[management,client] Report the remote-jobs opt-in to management The dashboard needs to know which peers have opted out of remote jobs so it can reflect that in the UI, the same way it surfaces the SSH server flag. Report RemoteJobsAllowed as peer system-info: the client sets it on the reported flags (like ServerSSHAllowed), the proto Flags message carries it, and management decodes it onto the peer meta and exposes it on the peers API as remote_jobs_allowed. Kept out of the components/network-map path: unlike ServerSSHAllowed it does not participate in firewall-rule calculation, so it only rides the reporting flags, not ComponentPeer.
| Commit: | 7da4127 | |
|---|---|---|
| Author: | mlsmaycon | |
| Committer: | Maycon Santos | |
[client] Gate remote jobs behind an admin opt-in with MDM support Remote jobs (debug bundles requested by the management server) run on the peer with no local consent. This makes them an explicit opt-in, mirroring the SSH-server opt-in: an --allow-remote-jobs flag persisted in the client config, defaulting off. Enabling it off->on crosses the user-to-root boundary and is refused for unprivileged IPC callers by the daemon gate, the same way enabling the SSH server is. When disabled, the job-stream handler refuses every job before doing any work. Because the flag is admin-controlled, it is also MDM-managed: the allowRemoteJobs policy key can enable or lock it, and a user SetConfig that diverges from an enforced value is rejected like the other managed fields. A second MDM key, debugBundleUploadURL, overrides the debug-bundle upload service for remote jobs, taking precedence over the management-supplied value (MDM > management > default). This lets an operator pin uploads to a trusted host regardless of what management requests. The override is validated as an https URL with a host, the same as the management value. Defaulting the opt-in off is a behavior change: existing deployments that rely on management-triggered debug bundles must opt in (flag or MDM) before they work again.
| Commit: | ec0ce38 | |
|---|---|---|
| Author: | mlsmaycon | |
[management,client] Report the remote-jobs opt-in to management The dashboard needs to know which peers have opted out of remote jobs so it can reflect that in the UI, the same way it surfaces the SSH server flag. Report RemoteJobsAllowed as peer system-info: the client sets it on the reported flags (like ServerSSHAllowed), the proto Flags message carries it, and management decodes it onto the peer meta and exposes it on the peers API as remote_jobs_allowed. Kept out of the components/network-map path: unlike ServerSSHAllowed it does not participate in firewall-rule calculation, so it only rides the reporting flags, not ComponentPeer.
| Commit: | 833df7a | |
|---|---|---|
| Author: | mlsmaycon | |
[client] Gate remote jobs behind an admin opt-in with MDM support Remote jobs (debug bundles requested by the management server) run on the peer with no local consent. This makes them an explicit opt-in, mirroring the SSH-server opt-in: an --allow-remote-jobs flag persisted in the client config, defaulting off. Enabling it off->on crosses the user-to-root boundary and is refused for unprivileged IPC callers by the daemon gate, the same way enabling the SSH server is. When disabled, the job-stream handler refuses every job before doing any work. Because the flag is admin-controlled, it is also MDM-managed: the allowRemoteJobs policy key can enable or lock it, and a user SetConfig that diverges from an enforced value is rejected like the other managed fields. A second MDM key, debugBundleUploadURL, overrides the debug-bundle upload service for remote jobs, taking precedence over the management-supplied value (MDM > management > default). This lets an operator pin uploads to a trusted host regardless of what management requests. The override is validated as an https URL with a host, the same as the management value. Defaulting the opt-in off is a behavior change: existing deployments that rely on management-triggered debug bundles must opt in (flag or MDM) before they work again.
| Commit: | 38c5932 | |
|---|---|---|
| Author: | pascal | |
merge main
| Commit: | 9c889e4 | |
|---|---|---|
| Author: | mlsmaycon | |
[management,client] Plumb anonymize level and upload URL through remote debug bundle jobs PR #7102 added an anonymization level to debug bundles and the anonymize_level proto field, but nothing on the management side ever set it: the remote-job builder dropped the field and the REST schema never exposed it, so a remotely triggered bundle always ran at the default level regardless of what an operator asked for. The upload destination for remote jobs was likewise fixed to the default upload server, with no way to direct a bundle to a self-hosted one. Expose anonymize_level and a new upload_url on the REST BundleParameters and the management proto, and map both onto the job request streamed to the client. Both are optional: an omitted value crosses the wire as the empty string, which the client resolves to its own defaults — the default anonymization level and the default upload server — matching how the netbird CLI defaults the same inputs.
| Commit: | 5584f8e | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | GitHub | |
[client] Add strict anonymization level and MAC anonymization to debug bundles (#7102)
| Commit: | 0f77715 | |
|---|---|---|
| Author: | mlsmaycon | |
[management,proxy] Enforce custom domain validation and scope claims per account A custom domain row was created and bound to a live service whether or not its CNAME ownership check ever succeeded. Validated was computed once, stored, and read only by the dashboard listing, so an account that never proved DNS control still had its hostname routed and a certificate ordered for it. The domain string was also claimed globally, with no expiry, so an abandoned unvalidated row blocked that name for every other account permanently. Cluster derivation now matches a custom domain only when it is validated, and reports "domain is not validated" so the API tells the caller what to fix. Service updates no longer fall back to the previously derived cluster when derivation fails, which was a way around the same check. Claims carry a claimed_at date and are evicted after 24h without validation. Uniqueness is now per (account_id, domain); the global constraint is dropped and replaced by a manager-side rule that only one account may hold a validated row for a name. That matches what the check actually proves: control of the zone, not the identity of the requester, so the first account to validate owns the name and a later one is refused. Creation pre-checks both cases and returns AlreadyExists without naming the holding account. An hourly job re-checks validated domains and, after three consecutive failed lookups, marks them unvalidated and restarts their claim window, so a domain whose DNS moved away stops being served and eventually frees the name. Custom domains are capped per account because each one becomes an ACME order against issuance rate limits shared by every account on the cluster. ProxyMapping carries the verdict and the proxy refuses to set up routes, auth, or certificate management without it, so the domain cannot be served if the management-side gate is ever regressed. This makes management the required first upgrade: a proxy on this version drops mappings from an older management that does not set the field. The migration drops the old constraint before AutoMigrate (dropping it rebuilds the table on SQLite, discarding its indexes) and backfills claimed_at from the upgrade time, so pre-existing unvalidated rows get a full window to validate before they expire.
| Commit: | d0bc7d9 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Add strict anonymization level for debug bundles and always anonymize MAC addresses
| Commit: | b9d83de | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Communicate the port over the signal exchange
| Commit: | 4dd8cc9 | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Protocol update
| Commit: | b3ead5e | |
|---|---|---|
| Author: | Viktor Liu | |
Localize daemon notifications via stable message keys
| Commit: | c93aa03 | |
|---|---|---|
| Author: | pascal | |
merge main
| Commit: | 610f87c | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Communicate the port over the signal exchange
| Commit: | 09315d7 | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Protocol update
| Commit: | e193e59 | |
|---|---|---|
| Author: | mlsmaycon | |
[client] Route agent-network through the daemon and shape env per provider Two field-test findings drive this change: the direct-dial path needed sudo (the profile's WireGuard key is root-owned), and a single flat ANTHROPIC_* export set is wrong for providers that speak other API shapes. Relay the setup request through the daemon instead: a new GetAgentNetworkSetup daemon RPC forwards to management over the engine's existing peer connection, so unprivileged callers get the caller-scoped answer the same way 'netbird status' works — no sudo, and the key never leaves the daemon. The daemon's JSON gateway exposes the RPC for the desktop UI for free. Teach 'agent-network env' the per-provider environment contracts, mirroring Claude Code's LLM-gateway configuration: - anthropic flavor: ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN / ANTHROPIC_MODEL - bedrock_api: CLAUDE_CODE_USE_BEDROCK, ANTHROPIC_BEDROCK_BASE_URL, CLAUDE_CODE_SKIP_BEDROCK_AUTH (the proxy injects AWS credentials) - vertex_ai_api: CLAUDE_CODE_USE_VERTEX, ANTHROPIC_VERTEX_BASE_URL, CLAUDE_CODE_SKIP_VERTEX_AUTH, plus comments for the admin-supplied ANTHROPIC_VERTEX_PROJECT_ID and CLOUD_ML_REGION (the proxy forwards the URL path, so those values must be the operator's real ones) - openai flavor: OPENAI_BASE_URL / OPENAI_API_KEY - anything else: comment lines only — no guessed variables Selection stays explicit: --provider picks by operator label or catalog id and is required when several providers are authorized; --model is validated against the provider's allowed set and required when several models are allowed. Ambiguity renders as shell comments, never as exports. Linear: NET-1399
| Commit: | 5d4c7f3 | |
|---|---|---|
| Author: | mlsmaycon | |
[management] Add peer-facing Agent Network setup RPC Peers onboarding to the Agent Network have no way to discover which providers and models their groups authorize or which endpoint to call, so they trial-and-error into 403s at the proxy. Add GetAgentNetworkSetup, an EncryptedMessage peer RPC following the Expose service shape: the WireGuard key is the credential and the answer is caller-scoped — strictly what the calling peer's own groups authorize, computed by a new effective-setup routine in the agentnetwork manager that mirrors the proxy's enforcement exactly (policy filter as filterApplicablePolicies, model logic as policyPermitsModel, orphan and disabled providers omitted like the router synthesizer omits them). The response carries display metadata only: endpoint, provider name, catalog id, API flavor, and effective models. No keys, upstream URLs, policy or guardrail structure, and no hint of providers the caller cannot reach; "account not set up" and "caller has no access" are deliberately indistinguishable. Linear: NET-1399
| Commit: | 0b83669 | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Communicate the port over the signal exchange
| Commit: | 990b78a | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Protocol update
| Commit: | af1f94b | |
|---|---|---|
| Author: | Viktor Liu | |
Merge branch 'main' into reverse-proxy-crowdsec-appsec # Conflicts: # management/server/store/sql_store.go # management/server/store/sql_store_service_test.go
| Commit: | f05f3fc | |
|---|---|---|
| Author: | Viktor Liu | |
Merge branch 'main' into reverse-proxy-allow-match-or # Conflicts: # management/server/store/sql_store.go # management/server/store/sql_store_service_test.go
| Commit: | 6b7c22e | |
|---|---|---|
| Author: | Viktor Liu | |
Merge branch 'main' into client-local-metrics # Conflicts: # client/internal/debug/debug.go
| Commit: | 707bc3e | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Support per-peer lazy connection state and default proxy peers to lazy
| Commit: | 86d775f | |
|---|---|---|
| Author: | Viktor Liu | |
Merge main into embedded-vnc # Conflicts: # client/configs/configs.go
| Commit: | feecb99 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | GitHub | |
[client] Restrict debug bundle log path and upload destinations (#6975)
| Commit: | e324a96 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Restrict debug bundle log path and upload destinations
| Commit: | 8dac459 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Restrict debug bundle log path and upload destinations
| Commit: | 05a75d8 | |
|---|---|---|
| Author: | Viktor Liu | |
Carry netbird-vnc policies over the component network map
| Commit: | 2b051ad | |
|---|---|---|
| Author: | Viktor Liu | |
Merge main into embedded-vnc
| Commit: | 663468e | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Add CrowdSec AppSec request inspection to the reverse proxy
| Commit: | 2af3a5f | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
| Committer: | Dmitri Dolguikh | |
do not send resource policies map over the wire Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | a165eec | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Communicate the port over the signal exchange
| Commit: | 2e7436f | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Protocol update
| Commit: | 842b196 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Add CrowdSec AppSec request inspection to the reverse proxy
| Commit: | d3909e4 | |
|---|---|---|
| Author: | Brandon Hopkins | |
endpoint model discovery and proxy integration
| Commit: | d265150 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Add CrowdSec AppSec request inspection to the reverse proxy
| Commit: | 40cdfda | |
|---|---|---|
| Author: | Viktor Liu | |
Add allow_match any/all mode to reverse proxy access restrictions
| Commit: | 8f9e5f4 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
track resources in compactgroups Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 27afbd7 | |
|---|---|---|
| Author: | Theodor S. Midtlien | |
| Committer: | Theodor S. Midtlien | |
WIP: acl interceptor and named pipe ui
| Commit: | 8435682 | |
|---|---|---|
| Author: | dmitri-netbird | |
| Committer: | GitHub | |
[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>
| Commit: | 34f1b67 | |
|---|---|---|
| Author: | pascal | |
have all group flag no proto
| Commit: | 969dd04 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
do not send resource policies map over the wire Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | d93ae8c | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
drop names and descriptions from GroupCompact and NameserverGroupRaw Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 8b738f0 | |
|---|---|---|
| Author: | check | |
[client] Drop DownAsync RPC in favor of bounded sync Down on quit Remove the DownAsync RPC and call the plain Down RPC from the tray Quit handler under the existing 5s client-side deadline. Why DownAsync did not pay for itself: - Its premise ("quitting never blocks on the engine shutdown") did not hold: engine.Stop() ran synchronously inside beginDown, so the GUI blocked on it either way. Only the retry-goroutine wait (typically near-zero, at most 5s when wedged) moved off the caller. - The daemon's Down handler never consults the caller's context, so the client-side deadline in handleQuit already bounds how long Quit waits while the daemon completes the full teardown regardless of the caller timing out. Same disconnect guarantee, no extra API surface. - A DownAsync that truly returned before the engine shutdown would have to return right after actCancel and stop the engine on a background goroutine, opening an Up-after-Down race (new engine starting while the old one is still tearing down) that would need an Up-side guard. That is a connect-lifecycle refactor (see the TODO in cleanupConnection about run-loop shutdown ownership), not a quit-UX fix. Down keeps the error handling from the previous commit: engine.Stop() failures are logged and cleanup continues so the daemon always returns to Idle, and ErrServiceNotUp returns without an error log. The generated proto files are restored to their previous content rather than regenerated.
| Commit: | ccb271b | |
|---|---|---|
| Author: | Zoltán Papp | |
| Committer: | Zoltán Papp | |
[client] Make netbird up wait for the daemon to become ready The CLI up path only tolerated a not-yet-ready daemon via a 10s blocking dial, so "netbird service start" immediately followed by "netbird up" (e.g. a container entrypoint) failed with a generic "daemon not running" error. The container entrypoint worked around this with a shell poll loop (status --check live) before running up. Move the readiness wait into the CLI, mirroring how the GUI already dials: - DialClientGRPCServer now uses grpc.NewClient with a tuned reconnect backoff and waits for the connection to reach READY (retrying on TRANSIENT_FAILURE) up to a 30s deadline, instead of grpc.DialContext + WithBlock with a hard 10s timeout. - up now polls Status via waitForDaemonStatus, retrying while the RPC is Unavailable (socket up but service not yet registered). Add an explicit daemon-ready signal so clients can wait deterministically instead of heuristically: - New optional StatusResponse.daemonReady field (field 5, wire-compatible with older GUIs/daemons which leave it unset). Regenerated with the pinned protoc v33.1 toolchain so no version churn leaks into the diff. - The server sets ready once Start succeeds and the DaemonService is registered (SetReady, called from the service controller). - waitForDaemonStatus waits for daemonReady=true (or an already-Connected status), with a bounded grace window so older daemons that never set the field are not blocked. Simplify the container entrypoint accordingly: drop the readiness poll loop (up now waits) and the now-dead NB_ENTRYPOINT_SERVICE_TIMEOUT env, keeping only the daemon+up process glue and SIGTERM forwarding for clean shutdown.
| Commit: | 20243fc | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
redid versioning Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 945f880 | |
|---|---|---|
| Author: | riccardom | |
| Committer: | riccardom | |
Rework signal protocol to minimize number of exchanged initial RP 512KB keys
| Commit: | 1fcfc44 | |
|---|---|---|
| Author: | Zoltán Papp | |
| Committer: | Zoltán Papp | |
[client] Disconnect daemon on GUI quit via async Down The tray Quit menu now disconnects the daemon before exiting instead of only tearing down the GUI. A new DownAsync RPC lets the daemon start the teardown and return immediately: beginDown cancels the connection under the mutex (so it cannot reconnect), then finishDown (the retry-goroutine wait and status reset) runs on a background goroutine. handleQuit aborts any in-flight profile switch first (so a queued Up cannot reconnect during teardown) and calls DownAsync so quitting never blocks on the engine shutdown.
| Commit: | 9d2a7e3 | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Add opt-in local Prometheus metrics endpoint to the client
| Commit: | 671a5f1 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
pass sync message version in SyncResponse Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 82ea626 | |
|---|---|---|
| Author: | Viktor Liu | |
Support per-peer lazy connection state and default proxy peers to lazy
| Commit: | dbc7b84 | |
|---|---|---|
| Author: | Viktor Liu | |
Merge origin/main into embedded-vnc
| Commit: | 6830777 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
updated comments in management.proto Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | ee7806b | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
Merge remote-tracking branch 'origin/main' into components-impl-drop-indexes-use-xids Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | db231fd | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
updated decoder Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 7cae1b9 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
replaced sequential IDs with xids (random, uuid-like) Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | a36a1a3 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
cleaned up wire representation of components Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 26eeebb | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | Viktor Liu | |
Add opt-in local Prometheus metrics endpoint to the client
| Commit: | bd7beab | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
forgot to commit management.proto changes Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | aa52972 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
cleanup handling of peers and routing peers Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 27af495 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
removed indexes from PostureFailedPeers Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | bc7073b | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
dopped indexes from group-id to user-id map used to control ssh access Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 1a2c370 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
drop indexes from policies and resource policies Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | afb4044 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
removed indexes from routers map Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 5cab8e4 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
removed indexes from encodeNetworkResources() Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 84fb305 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
removed indexes from NameServerGroup Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 1ee1f5d | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
removed indexes from encodeDNSSettings() Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 2f1d185 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
removed indexes for peers, routing peers, groups Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 47352e6 | |
|---|---|---|
| Author: | dmitri-netbird | |
| Committer: | GitHub | |
[client] introduce client-side event aggregation (#6627) * added an implementation of aggregating memory store Signed-off-by: Dmitri <dmitri.external@netbird.io> * initial support for aggregation of events Signed-off-by: Dmitri <dmitri.external@netbird.io> * added tcp-aggregation test Signed-off-by: Dmitri <dmitri.external@netbird.io> * added manager integration test Signed-off-by: Dmitri <dmitri.external@netbird.io> * added tracking of the number of start-, drop, and end-events in an aggregation window Signed-off-by: Dmitri <dmitri.external@netbird.io> * fixes based on sonarcube checks Signed-off-by: Dmitri <dmitri.external@netbird.io> * regenerated proto files Signed-off-by: Dmitri <dmitri.external@netbird.io> * removed inadvertenly added google proto files Signed-off-by: Dmitri <dmitri.external@netbird.io> * pacifying linter Signed-off-by: Dmitri <dmitri.external@netbird.io> * update test to validate event aggregation over tcp, udp, icmp, and icmpv6 Signed-off-by: Dmitri <dmitri.external@netbird.io> * updated event aggregation test Signed-off-by: Dmitri <dmitri.external@netbird.io> * regenerate protobufs with expected versions of protoc and protoc-gen-go Signed-off-by: Dmitri <dmitri.external@netbird.io> * remove protoc/protoc-gen headers from flow_grpc.pb.go Signed-off-by: Dmitri <dmitri.external@netbird.io> * updated openapi spec Signed-off-by: Dmitri <dmitri.external@netbird.io> * updated openapi NetworkTrafficEvent spec, regenerated types Signed-off-by: Dmitri <dmitri.external@netbird.io> * respond to feedback Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * fixed an issue with how we track events that shouldn't be aggregated Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * fixed mapping of events to protobuf Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * icmp code values in aggregated events do not matter Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * regenerate openapi types Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * added a comment re: unbounded unacked events Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * reset aggregated event type to unknown Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * fix event aggregation test Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * used the source port of the earliest event Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * add tracking of window starts and ends Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * updated openapi spec Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * reverted changes to generate.sh Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * cleanup handling of not-aggregated events + test Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * responded to feedback + small fixes Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * small fix in a test Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * another test Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * force setting non-empty rule id on aggregated events Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * fixed a couple of issues flagged by coderabbit Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * fix spelling Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * handle exhausted retry backoffs Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> --------- Signed-off-by: Dmitri <dmitri.external@netbird.io> Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 91acb81 | |
|---|---|---|
| Author: | Maycon Santos | |
| Committer: | GitHub | |
[management,client] 0.75.0 release with new desktop UI (#6473) - **Wails v3 application** (`client/ui`) with a React + TypeScript + Tailwind frontend replacing the Fyne UI: main connection view, exit-node switcher, networks/peers browser with detail panels, profile management, settings (general, network, SSH, security, troubleshooting, appearance), debug-bundle creation, and a first-run welcome flow. - **Internationalization**: go-i18n bundle with 9 locales (en, de, es, fr, hu, it, pt, ru, zh-CN) shared between the tray and the frontend. - **New system tray** implementation with per-platform theme-aware icons, including a native XEmbed host for Linux (`xembed_tray_linux.c`) and a Linux theme watcher. - **Session handling**: auth session watcher (`client/internal/auth/sessionwatch`), pending login flow, session-expiration dialog and tray notifications, and `netbird login` improvements. - **Daemon API extensions** (`daemon.proto`): status stream subscription, event stream, networks/exit-node selection endpoints, and richer full status — with probe throttling on the daemon side to protect against UI-driven request storms. - **UI preferences store** persisted per profile, autostart management via the daemon (single source of truth in HKCU on Windows). - **Build system**: Taskfile-based builds per platform (macOS, Linux, Windows), Docker cross-compilation images, MSIX/NSIS/nfpm/AppImage packaging, and a new `frontend-ui` CI workflow. Co-authored-by: Zoltan Papp <zoltan.pmail@gmail.com> Co-authored-by: Eduard Gert <kontakt@eduardgert.de> Co-authored-by: braginini <bangvalo@gmail.com> Co-authored-by: Pascal Fischer <32096965+pascal-fischer@users.noreply.github.com> Co-authored-by: riccardom <riccardomanfrin@gmail.com>
| Commit: | 1e0e04d | |
|---|---|---|
| Author: | Zoltan Papp | |
Merge branch 'main' into 0.75.0-branch # Conflicts: # .github/workflows/golang-test-darwin.yml # .github/workflows/golang-test-linux.yml # .github/workflows/golangci-lint.yml # client/internal/connect.go # client/internal/peer/status.go # client/server/server_test.go # client/ui/client_ui.go # go.mod # go.sum
| Commit: | 396ac36 | |
|---|---|---|
| Author: | pascal | |
Merge branch 'main' into nmap/components-impl # Conflicts: # client/internal/engine.go # management/server/store/sql_store.go # shared/management/proto/management.pb.go
| Commit: | b684f85 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
Merge remote-tracking branch 'origin/main' into dmitri-event-aggregation Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 980598e | |
|---|---|---|
| Author: | Zoltan Papp | |
| Committer: | GitHub | |
[management, client] Add management-controlled client metrics push (#5886) * [management, client] Add management-controlled client metrics push Allow enabling/disabling client metrics push from the dashboard via account settings instead of requiring env vars on every client. - Add MetricsConfig proto message to NetbirdConfig - Add MetricsPushEnabled to account Settings (DB-persisted) - Expose metrics_push_enabled in OpenAPI and dashboard API handler - Populate MetricsConfig in sync and login responses - Client dynamically starts/stops push based on management config - NB_METRICS_PUSH_ENABLED env var overrides management when explicitly set - Add activity events for metrics push enable/disable * Remove log line * [management] Fix peer update test for MetricsConfig in NetbirdConfig Update TestUpdateAccountPeers assertions: NetbirdConfig is no longer nil in peer update responses since it now carries MetricsConfig even when STUN/TURN config is absent. * Regenerate proto files with protoc v7.34.1 * [management] Read metrics push setting in Postgres account query getAccountPgx omitted settings_metrics_push_enabled from its hand-written SELECT and Scan, so the toggle was always read back as false on Postgres and never reached clients. * [client] Fix metrics push getting stuck off after engine restart Engine restarts (backoff retries within the same login session) cancel e.ctx, which the push goroutine's lifetime was tied to. The goroutine died silently but ClientMetrics.push stayed non-nil since only an explicit stop clears it, so the next UpdatePushFromMgm call saw a "push already running" state and never restarted it. Give the Engine its own metricsCtx sourced from ConnectClient.ctx, which outlives engine restarts, so handleMetricsUpdate stops tying the push to the wrong-scoped context. Additionally make ClientMetrics.push an atomic.Pointer that the push goroutine clears via CompareAndSwap on exit, so the tracked state can never drift from the goroutine's actual lifetime regardless of which context a future caller passes in. * [management] Regenerate OpenAPI types with oapi-codegen v2.7.1 types.gen.go was regenerated with a stale local v2.6.0 binary, causing the CI git-diff check against generate.sh's pinned v2.7.1 to fail.
| Commit: | e5af98a | |
|---|---|---|
| Author: | Zoltán Papp | |
| Committer: | Viktor Liu | |
[management, client] Add management-controlled client metrics push Allow enabling/disabling client metrics push from the dashboard via account settings instead of requiring env vars on every client. - Add MetricsConfig proto message to NetbirdConfig - Add MetricsPushEnabled to account Settings (DB-persisted) - Expose metrics_push_enabled in OpenAPI and dashboard API handler - Populate MetricsConfig in sync and login responses - Client dynamically starts/stops push based on management config - NB_METRICS_PUSH_ENABLED env var overrides management when explicitly set - Add activity events for metrics push enable/disable
| Commit: | 92a66cd | |
|---|---|---|
| Author: | Maycon Santos | |
| Committer: | GitHub | |
[management,proxy,client] 0.74.0 version (#6563) * [management,proxy] Agent network: per-account LLM gateway (policy, metering, multi-provider) (#6555) * [agent-network] Shared proto, OpenAPI schema, and generated types * [agent-network] Management: store, manager, synthesizer, policy engine, provider catalog, HTTP/gRPC API Adds the account-scoped agent-network module: provider/policy/budget CRUD and store, the reverse-proxy service synthesizer, policy selection + limit enforcement, the provider catalog (incl. Vertex AI and AWS Bedrock entries), and the management HTTP + proxy gRPC surfaces. * [management] Fix agent-network proxy-peer fan-out on affected-peer recompute The affected-peers resolver loaded only persisted reverse-proxy services, but agent-network services are synthesized on demand and never persisted. As a result the embedded proxy peer was never folded into the affected set when a client's group changed, so the proxy received no network-map update for a newly authorised client and rejected its handshake until a full resync (restart). loadProxyServices now merges the synthesized agent-network services (injected via a registration hook to avoid an import cycle), so proxy peers learn newly authorised clients immediately. * [proxy] Reverse-proxy middleware framework, chain, and request plumbing The per-target middleware chain (slots, dispatcher, mutation gate, metadata merger), body capture, access-log terminal sink, and the proxy wiring that builds + runs chains for synthesized agent-network services. * [proxy] LLM parsers, pricing, and builtin middlewares (OpenAI, Anthropic, Vertex AI, AWS Bedrock) Request/response parsers and SSE/event-stream metering, the embedded pricing table, and the builtin middleware set: request parser, router, policy limit-check/record, cost meter, guardrail, identity inject, response parser. Includes the path-routed providers — Google Vertex AI (keyfile:: service-account OAuth minting) and AWS Bedrock (bearer auth, invoke/converse/streaming, optional /bedrock prefix) — plus the Models allowlist and unmeterable-publisher deny. * [proxy] IPv6 in-place apply and TCP accept-loop hardening on netstack listeners * [agent-network] End-to-end test suite, module docs, and deployment preset * [agent-network] Fix codespell typos and exclude false positives - labelgen word pool: vermillion -> vermilion, racoon -> raccoon. - codespell ignore list: add flate (Go compress/flate package), recordin (a test-local identifier), and unparseable (a valid alternative spelling used consistently across identifiers + a metadata-value constant). * [management] Set LastSeen on injected proxy peer in realstack test (MySQL strict-mode) The injected embedded proxy peer had a PeerStatus with a zero LastSeen, which serializes to '0000-00-00' and is rejected by MySQL in strict mode (SQLite tolerates it). Set LastSeen to a valid time so SaveAccount succeeds on both engines. * [agent-network] Remove e2e shell-script suite from this branch The end-to-end shell scripts under scripts/e2e/ are maintained in a separate testing suite and are not part of this change set. * [agent-network] Polish module docs: remove internal review scaffolding, fix links, verify diagrams Strip PR-review framing, commit references, absolute paths, and stale internal references from the agent-network module docs; fix broken relative links; verify all diagrams against the current architecture. Remove the internal AI-reviewer prompt file. * [management] Refine session expiration handling to support 3-state encoding for SSO deadlines * [agent-network] Relocate agentnetwork package to internals/modules Move management/server/agentnetwork (and its catalog/, labelgen/, types/ subpackages) to management/internals/modules/agentnetwork, alongside the reverse-proxy module, and rewrite all importers. Pure relocation: package names, the synthesizer + affectedpeers registration hook, and store access (shared store.Store) are unchanged, so no import cycle is introduced (affectedpeers still depends only on the agentnetwork/types leaf). * [agent-network] Co-locate HTTP handlers in the module (RegisterEndpoints) Move the agent-network HTTP handlers from server/http/handlers/agentnetwork into the module at internals/modules/agentnetwork/handlers (package handlers) and rename the entrypoint AddEndpoints -> RegisterEndpoints, matching the reverse-proxy module convention. Wiring in http/handler.go updated accordingly. * Update getting started to point to rc when agent network enabled * Add a reference to a commercial license * Fix docs localhost link * Fix docs localhost link * Add private services domain note * [management] Add agent-network telemetry metrics (#6561) Surface agent-network adoption and usage in the self-hosted metrics worker: distinct accounts, providers, policies, budget rules, accounts with log collection enabled, and aggregated input/output tokens plus cost. Tokens and cost are summed from agent_network_request_usage (the always-written per-request ledger) so the figures are accurate regardless of the log-collection toggle and carry no double-counting. All values come from a handful of indexed aggregate queries run only on the worker's periodic tick. Adds store.AgentNetworkMetrics with GetAgentNetworkMetrics on the Store interface, the SqlStore implementation, and a zero-valued FileStore stub. * Update NetBird server and proxy image versions to 0.74.0-rc.2 * [management,proxy] Reduce agent-network cognitive complexity (#6566) Address the SonarCloud quality-gate findings in new agent-network code by extracting focused helpers. No behavior change. - synthesizer.go: split buildIdentityInjectConfigJSON into per-shape rule builders; extract mergeGuardrail from mergeGuardrails to cut nesting depth. - llm_identity_inject: extract injectionEmitsAnything validation predicate from New. - llm_response_parser/streaming.go: extract applyOpenAIStreamUsage and applyAnthropicStreamUsage (via a named anthropicStreamUsage type) and simplify the OpenAI scanner loop. - reverseproxy.go: decompose ServeHTTP into serveRouteError, buildTargetContext, serveDirect, serveWithChain, captureRequestForChain, serveDeny, newResponseWriter, observeResponse, and forwardUpstream, preserving the defer ordering so response observation still reads the captured writer before it is released. * [management] Move agent-network access-log ingest into the agentnetwork module (#6568) The agent-network access-log ingest path (metaKey wire contract, flatten, usage derivation, and the dual-write of the usage ledger + settings-gated full row) lived in the reverseproxy accesslogs manager, even though the agentnetwork module already owns the rest of that domain — types, read (ListAccessLogs / GetUsageOverview), the budget-counter writes, and retention cleanup. Move it next to the rest: a stateless agentnetwork.IngestAccessLog(ctx, store, entry) that the reverseproxy SaveAccessLog delegates to when the entry is agent-network. Removes the agentNetworkTypes import from the reverseproxy manager. No behavior change; the write/read table separation is unchanged. Adds real-store coverage for the disable->enable log-collection toggle (usage ledger always written, full row gated) plus the metadata parse and group-dedup helpers, which previously had no dedicated tests. * Add session view support in the access log * [management,proxy] Container-based agent-network e2e harness (#6577) * [e2e] Add container-based agent-network e2e harness (Pillar 1) Introduce a self-contained, OIDC-free e2e harness that stands up NetBird in containers, so suites no longer depend on the hand-maintained Tilt stack or a real IdP. - harness brings up the combined server (management + signal + relay + STUN + embedded IdP) in a single container built from combined/Dockerfile.multistage, and mints an admin PAT through the unauthenticated /api/setup bootstrap (NB_SETUP_PAT_ENABLED). API access goes through the existing shared/management/client/rest typed client. - the image is built via the docker CLI (BuildKit) so the Dockerfile's cache mounts are honored; testcontainers then runs the tagged image. - everything is behind the `e2e` build tag so normal builds and unit tests never pull in testcontainers. Adds BuildKit cache mounts to combined/Dockerfile.multistage so source changes recompile incrementally rather than from scratch. Pillar 1 proven by TestCombinedBootstrap: server builds, boots, mints a PAT, and the PAT authenticates a real management API call. * [e2e] Add management-side agent-network scenarios (Pillar 2) Port the API-driven agent-network scenarios from the bash suites to Go, sharing one combined server per package run (TestMain) with each test owning its resource cleanup. Drives the /api/agent-network/* endpoints through the shared REST client's NewRequest primitive with the generated api types. Scenarios: - provider lifecycle (create/get/list/delete + 404 after delete) - provider validation (missing api_key, unknown catalog id → 4xx) - settings collection-toggle round-trip with cluster/subdomain immutability - policy window floor (reject <60s enabled limit, accept at 60s) - consumption read endpoint returns an array All deterministic and dependency-free (dummy provider keys; no upstream calls), so they run headless in CI. * [e2e] Add live chat-through-proxy scenario (Pillar 3) Stand up the full agent-network data path in containers and drive a real chat-completion through the gateway: - harness: a shared docker network (combined server reachable by alias), a proxy container built from the published reverse-proxy image (NB_PROXY_PRIVATE, NB_PROXY_ALLOW_INSECURE, NB_RELAY_TRANSPORT=ws to match the combined server's WS-multiplexed relay) with a generated self-signed wildcard cert, and a netbird client container that joins via a setup key. - the combined image, proxy image, and client image default to the published rc.2 releases (overridable via NB_E2E_*_IMAGE; a bare local tag is built from source instead). Geolocation download is disabled so the server starts without external fetches. - one shared domain is used for the management exposed address, the proxy domain, and the agent-network cluster; the proxy token is minted via the server CLI (global) to match the manual install. TestChatCompletionThroughProxy provisions provider+policy+group+setup key, runs proxy+client, drives an OpenAI chat-completion through the tunnel, and asserts a 200 plus the ingested access-log row. Requires OPENAI_TOKEN (skips otherwise). The provider must be created with enabled=true explicitly — the create default is false despite the API doc. * [e2e] Run the live chat scenario across a provider matrix Replace the single-provider chat test with a data-driven matrix that runs the same scenario through every provider whose credentials are present in the environment (keys/URLs sourced from ~/.llm-keys locally, Actions secrets in CI): - OpenAI (chat), Anthropic (messages), Vercel, OpenRouter, Cloudflare (OpenAI-compatible gateways), and Bedrock (path-routed, bearer, via the messages shape) — covering both wire shapes and the gateway routing. - all providers are created enabled with a unique model string so the proxy's connect-time snapshot carries them all and model->provider routing is unambiguous (provider toggles after connect don't reconcile to a connected proxy). - the client supports both wire shapes (/v1/chat/completions and /v1/messages); Cloudflare gets the openai provider segment appended to its gateway URL. Each provider must return 200 through the tunnel and produce an ingested access-log row. Vertex is intentionally excluded from the uniform matrix: it needs a bespoke rawPredict request shape rather than the shared chat/messages path, so it warrants a dedicated scenario. * [ci] Add manual workflow for the agent-network e2e suite The e2e suite (build tag `e2e`) stands up the combined server + proxy + client in Docker and drives live chat-completions, so it is slow and needs provider credentials. Gate it out of normal CI (it already is, via the build tag) and run it on demand via workflow_dispatch. Provider scenarios skip when their secret is unset, so it degrades gracefully. * [e2e] Add Vertex to the provider matrix; run e2e on ubuntu-latest Vertex (Anthropic-on-Vertex) doesn't share the chat/messages wire shapes: the model travels in a rawPredict path and the proxy mints the service account's OAuth token. Add a Vertex client method that posts /v1/projects/<project>/locations/<region>/publishers/anthropic/models/<model>:rawPredict with the Vertex anthropic_version body, and wire it into the matrix as a path-routed provider (created without a models array). It is keyed off GOOGLE_VERTEX_SA_BASE64 + GOOGLE_VERTEX_PROJECT (region defaults to "global", model to a pinned claude snapshot, both overridable). Also bump the e2e workflow runner to ubuntu-latest and add the Vertex secrets. * Add docker/docker and docker/go-connections as direct dependencies in go.mod * [ci] Trigger agent-network e2e workflow on push to main and pull requests * [e2e] Fix proxy cert permission denied on Linux CI runners The proxy bind-mounts a temp dir of self-signed certs. MkdirTemp creates it 0700 and the key was 0600, which Docker Desktop on macOS ignores but a non-root proxy container on Linux runners cannot traverse/read, so the cert watcher failed with "open /certs/tls.crt: permission denied" and the container exited. Widen the cert dir to 0755 and write the throwaway key 0644 so the proxy uid can read the bind-mounted material. * [e2e] Build images from source by default instead of pulling rc.2 The agent-network code under test lives in this branch, so the e2e should exercise it rather than a frozen published release. Flip the harness default: combined/proxy/client are now built from their in-repo Dockerfiles (combined/Dockerfile.multistage, proxy/Dockerfile.multistage, e2e/harness/Dockerfile.client) under local tags. Pulling a published image stays available by setting NB_E2E_*_IMAGE to a registry reference. Builds now go through buildx --load so the Dockerfile cache mounts are honored and the result is loaded for testcontainers. The CI workflow adds a container-driver builder and a local layer cache (NB_E2E_BUILDX_CACHE) persisted via actions/cache, which caches the base/apt/dep-download layers across runs. The Go compile still re-runs each time, as BuildKit mount caches cannot be exported to the GitHub cache. * [e2e] Cover real providers in lifecycle + assert real consumption metering - TestProviderLifecycle now runs per available real provider (create → get → list → delete → 404) instead of a single dummy provider, exercising each catalog's create and field round-trip. Create is offline, so it stays fast and burns no provider quota; falls back to a synthetic OpenAI provider when no keys are set. - TestProvidersMatrix attaches a token limit (high caps, 60s window) to its policy, which switches on usage metering, and asserts consumption rows are recorded with positive token counts after the live traffic. Consumption is account-scoped (keyed by source group / user and window, not per provider), so the assertion is aggregate. - TestProviderValidation gains invalid-upstream and blank-name cases. Create validation is uniform across catalogs (no per-provider required-field rules), so per-provider rejection cases would be redundant. * [e2e] Assert session id propagates per provider Each matrix request now sends a unique session id as the universal x-session-id header and asserts it round-trips into that provider's access-log row. This guards the session-grouping contract end to end for every provider (header extraction runs in llm_request_parser ahead of the parser-specific body extraction, so it is provider-agnostic). * [e2e] Drop accidentally committed sync-phases dashboard netbird-sync-phases.json was swept into the Pillar 1 commit by a broad git add; it belongs to the unrelated sync-phases metrics work, not this e2e harness. Remove it from the branch so the PR diff is scoped to the e2e changes. * [e2e] Revert accidentally committed sync-phase ingest spec The netbird_sync_phase measurement spec in metrics ingest was swept into the Pillar 1 commit; it belongs to the unrelated sync-phases metrics work, not this e2e harness. Its emission side never landed here, so the spec was orphaned anyway. Restore ingest/main.go to its origin/main state. * Fix golint issues * Fix sonar * Add access log session test * Fix access log tests --------- Co-authored-by: braginini <bangvalo@gmail.com> Co-authored-by: Zoltan Papp <zoltan.pmail@gmail.com>
| Commit: | 5baf3c7 | |
|---|---|---|
| Author: | Zoltan Papp | |
Merge branch 'main' into feature/metrics-push-management-control
| Commit: | d568084 | |
|---|---|---|
| Author: | Viktor Liu | |
Merge remote-tracking branch 'origin/main' into embedded-vnc # Conflicts: # client/proto/daemon.pb.go # client/ssh/proxy/proxy_test.go # client/wasm/cmd/main.go # shared/management/http/api/types.gen.go
| Commit: | b416063 | |
|---|---|---|
| Author: | Maycon Santos | |
| Committer: | GitHub | |
[management,proxy] Agent network: per-account LLM gateway (policy, metering, multi-provider) (#6555) * [agent-network] Shared proto, OpenAPI schema, and generated types * [agent-network] Management: store, manager, synthesizer, policy engine, provider catalog, HTTP/gRPC API Adds the account-scoped agent-network module: provider/policy/budget CRUD and store, the reverse-proxy service synthesizer, policy selection + limit enforcement, the provider catalog (incl. Vertex AI and AWS Bedrock entries), and the management HTTP + proxy gRPC surfaces. * [management] Fix agent-network proxy-peer fan-out on affected-peer recompute The affected-peers resolver loaded only persisted reverse-proxy services, but agent-network services are synthesized on demand and never persisted. As a result the embedded proxy peer was never folded into the affected set when a client's group changed, so the proxy received no network-map update for a newly authorised client and rejected its handshake until a full resync (restart). loadProxyServices now merges the synthesized agent-network services (injected via a registration hook to avoid an import cycle), so proxy peers learn newly authorised clients immediately. * [proxy] Reverse-proxy middleware framework, chain, and request plumbing The per-target middleware chain (slots, dispatcher, mutation gate, metadata merger), body capture, access-log terminal sink, and the proxy wiring that builds + runs chains for synthesized agent-network services. * [proxy] LLM parsers, pricing, and builtin middlewares (OpenAI, Anthropic, Vertex AI, AWS Bedrock) Request/response parsers and SSE/event-stream metering, the embedded pricing table, and the builtin middleware set: request parser, router, policy limit-check/record, cost meter, guardrail, identity inject, response parser. Includes the path-routed providers — Google Vertex AI (keyfile:: service-account OAuth minting) and AWS Bedrock (bearer auth, invoke/converse/streaming, optional /bedrock prefix) — plus the Models allowlist and unmeterable-publisher deny. * [proxy] IPv6 in-place apply and TCP accept-loop hardening on netstack listeners * [agent-network] End-to-end test suite, module docs, and deployment preset * [agent-network] Fix codespell typos and exclude false positives - labelgen word pool: vermillion -> vermilion, racoon -> raccoon. - codespell ignore list: add flate (Go compress/flate package), recordin (a test-local identifier), and unparseable (a valid alternative spelling used consistently across identifiers + a metadata-value constant). * [management] Set LastSeen on injected proxy peer in realstack test (MySQL strict-mode) The injected embedded proxy peer had a PeerStatus with a zero LastSeen, which serializes to '0000-00-00' and is rejected by MySQL in strict mode (SQLite tolerates it). Set LastSeen to a valid time so SaveAccount succeeds on both engines. * [agent-network] Remove e2e shell-script suite from this branch The end-to-end shell scripts under scripts/e2e/ are maintained in a separate testing suite and are not part of this change set. * [agent-network] Polish module docs: remove internal review scaffolding, fix links, verify diagrams Strip PR-review framing, commit references, absolute paths, and stale internal references from the agent-network module docs; fix broken relative links; verify all diagrams against the current architecture. Remove the internal AI-reviewer prompt file. * [management] Refine session expiration handling to support 3-state encoding for SSO deadlines * [agent-network] Relocate agentnetwork package to internals/modules Move management/server/agentnetwork (and its catalog/, labelgen/, types/ subpackages) to management/internals/modules/agentnetwork, alongside the reverse-proxy module, and rewrite all importers. Pure relocation: package names, the synthesizer + affectedpeers registration hook, and store access (shared store.Store) are unchanged, so no import cycle is introduced (affectedpeers still depends only on the agentnetwork/types leaf). * [agent-network] Co-locate HTTP handlers in the module (RegisterEndpoints) Move the agent-network HTTP handlers from server/http/handlers/agentnetwork into the module at internals/modules/agentnetwork/handlers (package handlers) and rename the entrypoint AddEndpoints -> RegisterEndpoints, matching the reverse-proxy module convention. Wiring in http/handler.go updated accordingly.
| Commit: | b1347ad | |
|---|---|---|
| Author: | pascal | |
Merge branch 'main' into nmap/components-impl # Conflicts: # management/server/posture/checks.go
| Commit: | 4a13418 | |
|---|---|---|
| Author: | Dmitri Dolguikh | |
Merge remote-tracking branch 'origin/main' into dmitri-event-aggregation Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | 8b7ce33 | |
|---|---|---|
| Author: | Zoltan Papp | |
| Committer: | GitHub | |
[client] UI refactor (#6069) Refactor UI --------- Co-authored-by: Eduard Gert <kontakt@eduardgert.de> Co-authored-by: braginini <bangvalo@gmail.com> Co-authored-by: Pascal Fischer <32096965+pascal-fischer@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: riccardom <riccardomanfrin@gmail.com>
| Commit: | ee36096 | |
|---|---|---|
| Author: | Theodor Midtlien | |
| Committer: | GitHub | |
[client] Migrate profile identity from display name to ID and allow renaming of profiles (#6367) * Migrate to profile ids * Migrate android profile manager * Clean up * Fix review * Add ID type * Fix test and runes in ShortID() * Fix profile switch on up and android comments * Revert android profile to string id * Fix feedback * Fix UI feedback * Fix id assignment * Add renaming of profiles * Fix review * Remove ui binary * Fix getProfileConfigPath not validating id * Change resolve handle order and fix server merge problems * Fix mdm test
| Commit: | 5bd7c6c | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | GitHub | |
[client] Detect and recover from a stalled signal receive stream (#6459)
| Commit: | db76f33 | |
|---|---|---|
| Author: | pascal | |
Merge main
| Commit: | 799a7f1 | |
|---|---|---|
| Author: | Zoltán Papp | |
Merge branch 'main' into feature/metrics-push-management-control # Conflicts: # client/internal/engine.go # management/internals/shared/grpc/conversion.go # management/server/account.go # management/server/activity/codes.go # management/server/http/handlers/accounts/accounts_handler.go # management/server/types/settings.go # shared/management/http/api/types.gen.go # shared/management/proto/management.pb.go
| Commit: | 6fbc90b | |
|---|---|---|
| Author: | Viktor Liu | |
| Committer: | GitHub | |
[client, relay] Expose relay transport and connection errors in status and metrics (#6342)
| Commit: | 0e95b6d | |
|---|---|---|
| Author: | Dmitri | |
| Committer: | Dmitri Dolguikh | |
add tracking of window starts and ends Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
| Commit: | ac6ee89 | |
|---|---|---|
| Author: | Theodor S. Midtlien | |
Merge branch 'main' into profile-id-name
| Commit: | fae5b7e | |
|---|---|---|
| Author: | Dmitri | |
Merge remote-tracking branch 'origin/main' into dmitri-event-aggregation
| Commit: | c1eecaa | |
|---|---|---|
| Author: | Viktor Liu | |
Merge branch 'main' into embedded-vnc
| Commit: | 2bcea9d | |
|---|---|---|
| Author: | Riccardo Manfrin | |
| Committer: | GitHub | |
[client] add MDM configuration profile support (Windows registry + macOS plist) (#6374) * Initial scaffolding * Applies MDM override * Unit tests * Helpers business logic * Return error if trying to modify any config that is gated by MDM * Add ManagedFields to returned config over GetConfig * Adds initial 101 MDM policy business logic testing * gRPC MDM changes * MDM Name scoping for clarity * Implements windows loading of MDM policy * Adds missing WGPort config * Cleanup setupKey to align to linear * Align split tunnel code * Adds some log * Prefix every log with MDM * Adds debug config cobra command This can be useful for troubleshooting and checking config now that its resolution is not trivial defaults > config > env cars > CLI/UI > MDM * Adds MDM 1m diff checker & reloader * Adds also up/start after cancel * Publishes event for UI to sync upon MDM changes * Add events to resync UI to actual config This also provide fixup for UI no aligning to changed config when coming from cli up with config flags. * UI behavior conflicts relaxation UI sends full config snapshot with all values. It doesn't make sense to block it if the values are aligned with the values constrained by the MDM policy. It's just simplier to allow values that are compliant. (this goes for the CLI as well at this point) * Lock toggle Settngs * Advanced Settings locking * Fixup presharedkey * Apply MDM locks * Toggle gray in/out for Advanced Settings * Adds support for disabling of Profiles and UpdateSettings feature flags * Adds Gate Login as well when --disable-update-settings=true is given to service This commit tries to settle things with an old PR-4237 which had relaxed the case where the SetConfig returned an `Unavailable` code error. Under this circumnstance the PR allowed the upFunc to just emit a warning and progress further with the login gRPC. Since the login call is consuming the --management-url coming from the `up` command, it might be possible to abuse the "Unavailable" code to inject a management URL that is different from the configured one even though the --disable-update-settings is set to true (?) * Evaluate disable-update-settings errors only when there's an actual override * [UI] Fixup advanced Settings * [UI] Fixup for preshared key * [UI] Fixup for profile enable/disable toggle We need to align the initial state to evaluate the delta in case. The initial state has to be "true" since the profile starts visible. Then we receive MDM and transition the cache bool value to the actual MDM imposed state * Enforces disable networks * [UI] Aligns to "enable/disable once on change only" * Fixup: MDM wins. always * Removes --disable-advanced-settings It was a typo in our meetings. the actual thing is --disable-update-settings * [PROTO] Removes --disable-advanced-settings * [UI] Removes --disable-advanced-settings * Pins feat profile retrieval to notif event * [UI] Fix for "hide" not working when propagating to parent with children * Adds dep for reading plist files * Introduces support for darwing plist loading * Tests MDM config reload via ticker * [PROVISIONING] ADMX/ADML/PS/bash scripts/templates * CI fixes - Add docstrings to `mdm_integration` - refactor for cognitive complexity - mod tidy * Linting * Add docstrings to `mdm_integration` * nil,nil is no policy and no error. Allow it * nil,nil is no policy and no error. Allow it * exclude MDM profile adminstrated keys data from debug bundle * Fixes Rosenpass left disable after MDM unlock * Partial revert coderabbit added docstrings * Renaming fix * Avoid locking on clientRunning bool when the connection is aborted for whatever reason We want to just signal this through the giveUpChan, we will manage the signal from the waiter side and in case set it to false there. THis way we avoid locking, which should allow the MDM down+wait_for_term_chan_signal_+up procedure clientRunning is used to signal two different conditions here: 1. the initialization procedure is over (we have an engine) 2. the connection being up (or being attempted) Probably these two functionalities should not alias, and the failure of the second condition (because of any error) should just drive a reconnection (currently it's not happening, and we silently go idle). OR, mor probably, the two things are the SAME and there should not exist a case where we did the "Up" initialization and connection attempt but we are not still attempting it. * Moves test helper at te very bottom * Addresses github comments * No lock no copy * Prevents engine not stopping within 10 secs from being paired by another instance We instead juts SKIP updating the policy, so 1. the MDM ticker will kick in 1 minute time, 2. find the policy misaligned, 3. enter the onMDMPolicyChange, 4. find the s.clientRunning == true (because it is set to false only in server cleanupConnection, and not by s.actCancel()) 5. call s.actCancel() again if not nil 6. immediately return from <-s.clientGiveUpChan 7. finally call s.restartEngineForMDMLocked() * Since we ARE running there should be a config If the config was cancelled midflight, connect will abort later on * DisableAutoConnect should not stop a running connection. DisableAutoConnect should just avoid the connection attempts *when the service starts*. If we are started and we are up and running, DisableAutoConnect should not kick in. Another PR will follow about this topic * Removes unused vars * Moves callback into Run method arg * align comment to removal of DisableAutoConnect DisableAutoConnect should just avoid the connection attempts *when the service starts*. If we are started and we are up and running, DisableAutoConnect should not kick in * Removes unused managed_fields data. This was initially used to drive the UI but approach changed to reload config/features upon notifications which makes this data redundant. * Reorder stuff * Unexport unrequired vars/functions PoliciesEqual → policiesEqual AllKeys → allKeys * Adds list of MDM managed fields in the debug bundle