You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn
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>
3 months ago
..
auditlog ipn/ipnext: remove some interface indirection to add hooks 7 months ago
conffile ipn/conffile: don't depend on hujson on iOS/Android 1 year ago
desktop util/syspolicy/*: move syspolicy keys to new const leaf "pkey" package 3 months ago
ipnauth util/syspolicy/*: move syspolicy keys to new const leaf "pkey" package 3 months ago
ipnext ipn/ipnlocal: make GetExt work earlier, before extension init 7 months ago
ipnlocal util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 3 months ago
ipnserver ipn/localapi: plumb an event bus through the localapi.Handler (#16892) 4 months ago
ipnstate cmd/tailscale, ipn/ipnstate, wgengine/magicsock: update ping output for peer relay (#16515) 5 months ago
lapitest ipn/ipn{server,test}: extract the LocalAPI test client and server into ipntest 7 months ago
localapi ipn/localapi: make tailscale debug derp STUNOnly-aware (#16927) 3 months ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 2 years ago
store ipn/store/kubestore,kube: fix cert error in admin UI (#16717) 4 months ago
backend.go ipn/local: add the suggested exit node to the ipn bus (#16748) 3 months ago
conf.go ipn: ensure that conffile is source of truth for advertised services. (#15361) 9 months ago
doc.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 10 months ago
ipn_clone.go cmd/tailscale/cli,ipn,ipn/ipnlocal: add AutoExitNode preference for automatic exit node selection 5 months ago
ipn_test.go all: do not depend on the testing package 2 years ago
ipn_view.go cmd/viewer: add field comments to generated view methods 3 months ago
prefs.go util/syspolicy/*: move syspolicy keys to new const leaf "pkey" package 3 months ago
prefs_test.go ipn: move ParseAutoExitNodeID from ipn/ipnlocal to ipn 5 months ago
serve.go cmd/tailscale/cli: revert key for web config for services to FQDN (#16627) 4 months ago
serve_test.go cmd/tailscale/cli: Add service flag to serve command (#16191) 5 months ago
store.go tailcfg: report StateEncrypted in Hostinfo (#16434) 5 months ago
store_test.go ipn/store: automatically migrate between plaintext and encrypted state (#16318) 5 months ago