[management,client] Default to NetBird's upload service when nothing is configured

The previous commit made a peer with no destination — no MDM override, no URL
named by the caller, nothing published by its management server — refuse to
upload and keep the bundle local unless it was enrolled with NetBird's cloud.
That closed the reported data-boundary concern, but it broke the default for
everyone who uploads a bundle as part of their day: a self-hosted user opening
a support ticket got a refusal where the command used to work.

Product decision (NetBird's, not the reporter's): the knob to keep bundles
inside your own infrastructure is what this branch provides, and it is enough.
The default stays the service NetBird runs, self-hosted included. An admin who
needs the bundles to stay in-house configures the destination; until then the
everyday flow keeps working.

So ResolveUploadURL drops the cloud check, the sentinel error and the
managementURL argument, and never fails:

    MDM  >  explicitly named URL  >  published by management  >  NetBird's service

Nothing observable changes for a deployment that configures nothing, which also
removes two edge cases the fail-closed default had: a peer still enrolled on the
legacy api.wiretrustee.com host would have been classified self-hosted and
refused, and an upgrade would have silently stopped uploads for self-hosted
deployments relying on them. The privilege gate is unaffected — a host other
than the default one still requires a privileged caller, so pointing the CLI
somewhere other than what management published needs root.
This commit is contained in:
riccardom
2026-09-10 16:38:41 +02:00
parent fcb9b02451
commit c71fd1d841
16 changed files with 88 additions and 163 deletions
+3 -3
View File
@@ -386,9 +386,9 @@ components:
debug_bundle_upload_url:
description: |
Upload service the peers of this account send debug bundles to. A bundle carries peer logs, routes, DNS and
firewall state, so setting this keeps that data inside infrastructure the account controls instead of the
upload service NetBird runs. Must be an https URL with a host. Empty falls back to the deployment-wide value
configured on the management server; with neither, only peers enrolled with NetBird's cloud upload at all.
firewall state, so setting this keeps that data inside infrastructure the account controls. Must be an https
URL with a host. Empty falls back to the deployment-wide value configured on the management server, and with
neither to the upload service NetBird runs.
type: string
example: "https://upload.example.com/upload-url"
agent_network_only:
+3 -3
View File
@@ -1687,9 +1687,9 @@ type AccountSettings struct {
DashboardFeatures *AccountDashboardFeatures `json:"dashboard_features,omitempty"`
// DebugBundleUploadUrl Upload service the peers of this account send debug bundles to. A bundle carries peer logs, routes, DNS and
// firewall state, so setting this keeps that data inside infrastructure the account controls instead of the
// upload service NetBird runs. Must be an https URL with a host. Empty falls back to the deployment-wide value
// configured on the management server; with neither, only peers enrolled with NetBird's cloud upload at all.
// firewall state, so setting this keeps that data inside infrastructure the account controls. Must be an https
// URL with a host. Empty falls back to the deployment-wide value configured on the management server, and with
// neither to the upload service NetBird runs.
DebugBundleUploadUrl *string `json:"debug_bundle_upload_url,omitempty"`
// DnsDomain Allows to define a custom dns domain for the account
+4 -5
View File
@@ -2403,11 +2403,10 @@ type DebugConfig struct {
// upload_url is the debug-bundle upload service this peer's account uses,
// taken from the account settings or, failing that, from the management
// server config. Publishing it keeps a self-hosted deployment's bundles inside
// its own control sphere instead of falling back to the upload service NetBird
// runs. An empty value means no destination is published: the peer then
// uploads only when it is enrolled with NetBird's cloud, and otherwise keeps
// the bundle local.
// server config. Setting it keeps a deployment's bundles — which carry peer
// logs, routes, DNS and firewall state — inside infrastructure the operator
// controls. An empty value means no destination is published, and the peer
// uploads to the service NetBird runs.
UploadUrl string `protobuf:"bytes,1,opt,name=upload_url,json=uploadUrl,proto3" json:"upload_url,omitempty"`
}
+4 -5
View File
@@ -386,11 +386,10 @@ message MetricsConfig {
message DebugConfig {
// upload_url is the debug-bundle upload service this peer's account uses,
// taken from the account settings or, failing that, from the management
// server config. Publishing it keeps a self-hosted deployment's bundles inside
// its own control sphere instead of falling back to the upload service NetBird
// runs. An empty value means no destination is published: the peer then
// uploads only when it is enrolled with NetBird's cloud, and otherwise keeps
// the bundle local.
// server config. Setting it keeps a deployment's bundles — which carry peer
// logs, routes, DNS and firewall state — inside infrastructure the operator
// controls. An empty value means no destination is published, and the peer
// uploads to the service NetBird runs.
string upload_url = 1;
}