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/cmd
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
..
addlicense all: fix golangci-lint errors 11 months ago
build-webclient client/web: precompress assets 2 years ago
checkmetrics cmd/checkmetrics: add command for checking metrics against kb 1 year ago
cloner cmd/viewer, types/views: implement support for json/v2 (#16852) 4 months ago
connector-gen cmd/connector-gen: add helper tool for wide app connector configurations 2 years ago
containerboot syncs: delete WaitGroup and use sync.WaitGroup.Go in Go 1.25 3 months ago
derper util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 3 months ago
derpprobe cmd/derpprobe,prober: add run all probes handler (#16875) 4 months ago
dist {cmd/dist,release/dist}: add support for intermediary QNAP signing certificates 4 months ago
get-authkey cmd,tsnet,internal/client: create internal shim to deprecated control plane API 10 months ago
gitops-pusher scripts/check_license_headers.sh: delete, rewrite as a Go test 6 months ago
hello cmd/hello: display native ipv4 (#15191) 9 months ago
k8s-nameserver cmd/k8s-nameserver: fix AAAA record query response (#12412) 2 years ago
k8s-operator util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 3 months ago
k8s-proxy cmd/k8s-proxy,k8s-operator: fix serve config for userspace mode (#16919) 3 months ago
mkmanifest cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 3 years ago
mkpkg go.mod: upgrade nfpm to v2 (#8786) 2 years ago
mkversion version/mkversion: open-source version generation logic 3 years ago
nardump cmd/nardump: support symlinks, add basic test 8 months ago
natc cmd/natc,tsconsensus: add cluster config admin 3 months ago
netlogfmt all: use Go 1.22 range-over-int 2 years ago
nginx-auth tailcfg,all: add and use Node.IsTagged() 3 years ago
pgproxy all: use new LocalAPI client package location 10 months ago
printdep cmd/printdep: print correct toolchain URL 3 years ago
proxy-test-server net/tlsdial: fix TLS cert validation of HTTPS proxies 6 months ago
proxy-to-grafana scripts/check_license_headers.sh: delete, rewrite as a Go test 6 months ago
sniproxy net/{netx,memnet},all: add netx.DialFunc, move memnet Network impl 8 months ago
speedtest all: update copyright and license headers 3 years ago
ssh-auth-none-demo ssh,tempfork/gliderlabs/ssh: replace github.com/tailscale/golang-x-crypto/ssh with golang.org/x/crypto/ssh 10 months ago
stunc cmd/stunc: enforce read timeout deadline (#14309) 1 year ago
stund go.toolchain.branch: bump to go1.25 (#16954) 3 months ago
stunstamp cmd/stunstamp: add protocol context to timeout logs (#13422) 1 year ago
sync-containers all: adjust some build tags for plan9 2 years ago
systray client/systray: allow specifying tailscaled socket 4 months ago
tailscale util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 3 months ago
tailscaled util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 3 months ago
testcontrol all: use Go 1.22 range-over-int 2 years ago
testwrapper .github/workflows: shard the Windows builder 6 months ago
tl-longchain all: use new LocalAPI client package location 10 months ago
tsconnect fix: invalid memory address or nil pointer dereference (#16922) 3 months ago
tsidp util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 3 months ago
tsshd all: update copyright and license headers 3 years ago
tta all: use new LocalAPI client package location 10 months ago
viewer cmd/viewer: add field comments to generated view methods 3 months ago
vnet cmd/vnet: add wsproxy mode 8 months ago
xdpderper tsweb: split promvarz into an optional dependency 9 months ago