Files
netbird/shared/management
mlsmaycon 665f254a55 feat(rest): BYOP + private-service endpoints in management REST client
Add the wrappers needed to drive the bring-your-own-proxy + private-
service flows from external tooling (CI, IaC, dashboards built against
the REST client). The existing Service / ProxyCluster types already
carry Private / AccessGroups / direct_upstream via the openapi-generated
shapes, so the new code is the API surface itself — not field-level
plumbing.

- ReverseProxyClustersAPI.Delete(clusterAddress): DELETE
  /api/reverse-proxies/clusters/{clusterAddress}. Removes every
  self-hosted (BYOP) proxy registration the calling account owns under
  that address. Shared clusters operated by NetBird are 404 here.
- ReverseProxyTokensAPI (new file): List / Create / Delete against
  /api/reverse-proxies/proxy-tokens. Tokens are account-scoped and
  used by `netbird proxy` to register against management. Create
  returns api.ProxyTokenCreated, whose PlainToken is the one-shot
  secret; List and Delete operate on metadata only.

Tests cover the success + error paths for each new operation and pin
the cluster List response to round-trip the `private` capability flag.
Existing reverse_proxy_services_test.go was failing to build on the
parent commit because the regenerated api types switched Service.Auth
to *ServiceAuthConfig and Service.Targets to *[]ServiceTarget; fixed
the literals (`&api.ServiceAuthConfig{}`, `&[]api.ServiceTarget{...}`,
`(*req.Targets)[0]`) so the integration tag builds again — necessary
to even run the new tests.
2026-05-21 18:50:53 +02:00
..
2026-05-21 11:45:11 +02:00
2026-05-21 11:45:11 +02:00