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/localapi
Nick Khyl 892f8a9582 various: allow tailscaled shutdown via LocalAPI
A customer wants to allow their employees to restart tailscaled at will, when access rights and MDM policy allow it,
as a way to fully reset client state and re-create the tunnel in case of connectivity issues.

On Windows, the main tailscaled process runs as a child of a service process. The service restarts the child
when it exits (or crashes) until the service itself is stopped. Regular (non-admin) users can't stop the service,
and allowing them to do so isn't ideal, especially in managed or multi-user environments.

In this PR, we add a LocalAPI endpoint that instructs ipnserver.Server, and by extension the tailscaled process,
to shut down. The service then restarts the child tailscaled. Shutting down tailscaled requires LocalAPI write access
and an enabled policy setting.

Updates tailscale/corp#32674
Updates tailscale/corp#32675

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2 months ago
..
cert.go feature/featuretags, all: add ts_omit_acme to disable TLS cert support 3 months ago
debugderp.go ipn/localapi: make tailscale debug derp STUNOnly-aware (#16927) 4 months ago
disabled_stubs.go all: update copyright and license headers 3 years ago
localapi.go various: allow tailscaled shutdown via LocalAPI 2 months ago
localapi_drive.go feature/drive: start factoring out Taildrive, add ts_omit_drive build tag 3 months ago
localapi_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 3 months ago
pprof.go all: update copyright and license headers 3 years ago
serve.go all: add ts_omit_serve, start making tailscale serve/funnel be modular 3 months ago
syspolicy_api.go util/syspolicy: finish adding ts_omit_syspolicy build tags, tests 3 months ago
tailnetlock.go all: add ts_omit_tailnetlock as a start of making it build-time modular 3 months ago