tailscale/ipn/ipnlocal
Brad Fitzpatrick d05e6dc09e util/syspolicy/policyclient: add policyclient.Client interface, start plumbing
This is step 2 of ~4, breaking up #14720 into reviewable chunks, with
the aim to make syspolicy be a build-time configurable feature.

Step 1 was #16984.

In this second step, the util/syspolicy/policyclient package is added
with the policyclient.Client interface.  This is the interface that's
always present (regardless of build tags), and is what code around the
tree uses to ask syspolicy/MDM questions.

There are two implementations of policyclient.Client for now:

1) NoPolicyClient, which only returns default values.
2) the unexported, temporary 'globalSyspolicy', which is implemented
   in terms of the global functions we wish to later eliminate.

This then starts to plumb around the policyclient.Client to most callers.

Future changes will plumb it more. When the last of the global func
callers are gone, then we can unexport the global functions and make a
proper policyclient.Client type and constructor in the syspolicy
package, removing the globalSyspolicy impl out of tsd.

The final change will sprinkle build tags in a few more places and
lock it in with dependency tests to make sure the dependencies don't
later creep back in.

Updates #16998
Updates #12614

Change-Id: Ib2c93d15c15c1f2b981464099177cd492d50391c
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2025-09-01 09:34:29 -07:00
..
testdata ipn/ipnlocal: fix the path for writing cert files (#7203) 2023-02-07 14:34:04 -08:00
autoupdate_disabled.go ipn/ipnlocal: periodically run auto-updates when "offline" (#12118) 2024-06-03 19:24:53 -07:00
autoupdate.go clientupdate: return true for CanAutoUpdate for macsys (#12746) 2024-07-08 15:54:50 -07:00
breaktcp_darwin.go cmd/tailscale: add debug commands to break connections 2023-08-11 06:37:26 -07:00
breaktcp_linux.go cmd/tailscale: add debug commands to break connections 2023-08-11 06:37:26 -07:00
bus_test.go ipn/ipnlocal: add IPN Bus NotifyRateLimit watch bit NotifyRateLimit 2024-11-18 10:50:30 -08:00
bus.go ipn/local: add the suggested exit node to the ipn bus (#16748) 2025-08-27 09:51:28 -04:00
c2n_pprof.go ipn/ipnlocal: add c2n /debug/pprof/allocs endpoint 2024-03-22 17:29:59 -05:00
c2n_test.go util/cmpx: delete now that we're using Go 1.22 2024-02-07 18:10:15 -08:00
c2n.go util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 2025-09-01 09:34:29 -07:00
cert_js.go ipn/ipnlocal: add c2n method to check on TLS cert fetch status 2023-11-16 14:08:38 -08:00
cert_test.go ipn/ipnlocal, envknob: make it possible to configure the cert client to act in read-only mode (#15250) 2025-03-13 14:14:03 +00:00
cert.go ipn/ipnlocal: include previous cert in new ACME orders (#15595) 2025-04-08 15:37:00 -07:00
dnsconfig_test.go ipn,net,tsnet,wgengine: make an eventbus mandatory where it is used (#16594) 2025-07-29 09:04:08 -07:00
drive.go drive,ipn/ipnlocal: calculate peer taildrive URLs on-demand 2025-07-01 10:59:58 -05:00
expiry_test.go cmd/viewer,types/views,various: avoid allocations in pointer field getters whenever possible 2025-01-14 09:37:10 -06:00
expiry.go all: add Node.HomeDERP int, phase out "127.3.3.40:$region" hack [capver 111] 2025-01-14 12:27:14 -08:00
extension_host_test.go ipn/ipnlocal: fix missing defer in testExtension.Shutdown 2025-07-07 19:19:32 -05:00
extension_host.go ipn/ipnlocal: make GetExt work earlier, before extension init 2025-05-19 15:36:25 -07:00
local_test.go util/syspolicy/*: move syspolicy keys to new const leaf "pkey" package 2025-08-31 17:09:24 -07:00
local.go util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 2025-09-01 09:34:29 -07:00
loglines_test.go net/netmon: publish events to event bus 2025-04-16 10:10:45 -07:00
network-lock_test.go ipn,net,tsnet,wgengine: make an eventbus mandatory where it is used (#16594) 2025-07-29 09:04:08 -07:00
network-lock.go ipn/ipnlocal: make pricing restriction message for Tailnet Lock clearer 2025-06-18 15:01:37 +01:00
node_backend_test.go ipn/ipnlocal,wgengine/magicsock: use eventbus for node & filter updates (#16271) 2025-06-16 08:42:09 -07:00
node_backend.go types/dnstype, ipn/ipnlocal: allow other DNS resolvers with exit nodes 2025-08-15 08:17:01 -04:00
peerapi_h2c.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
peerapi_macios_ext.go net/netmon, add: add netmon.State type alias of interfaces.State 2024-04-28 07:34:52 -07:00
peerapi_test.go ipn,net,tsnet,wgengine: make an eventbus mandatory where it is used (#16594) 2025-07-29 09:04:08 -07:00
peerapi.go ipn/ipnlocal: add some verbose logging to taildrive peerapi handler 2025-06-17 17:01:36 -05:00
prefs_metrics.go health, ipn/ipnlocal: add metrics for various client events (#15828) 2025-05-09 12:03:22 -04:00
profiles_notwindows.go ipn/ipnlocal: refactor and cleanup profileManager 2024-08-28 14:42:35 -05:00
profiles_test.go feature,ipn/ipnlocal: add profileManager.StateChangeHook 2025-04-25 16:32:09 -05:00
profiles_windows.go ipn/ipnlocal: refactor and cleanup profileManager 2024-08-28 14:42:35 -05:00
profiles.go ipn/ipnlocal: replace the LockedOnEntry pattern with conventional lock/unlock discipline (#16925) 2025-08-23 02:07:22 -07:00
serve_test.go ipn/ipnlocal,wgengine{/magicsock}: replace SetNetworkMap with eventbus (#16299) 2025-06-18 10:31:00 -07:00
serve.go cmd/tailscale/cli: revert key for web config for services to FQDN (#16627) 2025-07-22 16:23:51 -04:00
ssh_stub.go all: remove non-applicable "linux" deps on Android 2025-05-07 21:05:13 -07:00
ssh_test.go ipn/ipnlocal: plumb health.Tracker into profileManager constructor 2024-05-03 08:25:38 -07:00
ssh.go all: remove non-applicable "linux" deps on Android 2025-05-07 21:05:13 -07:00
state_test.go cmd/tailscale/cli,ipn/ipnlocal: restrict logout when AlwaysOn mode is enabled 2025-07-08 15:02:51 -05:00
web_client_stub.go all: use new LocalAPI client package location 2025-02-05 14:41:42 -08:00
web_client.go ipn/ipnlocal: add localNodeContext with netmap-related fields and methods 2025-04-25 15:44:10 -05:00