tailscale/tstest/integration
Nick Khyl 6a9a7f35d9 cmd/tailscaled,ipn/{auditlog,ipnlocal},tsd: omit auditlog unless explicitly imported
In this PR, we update ipnlocal.LocalBackend to allow registering callbacks for control client creation
and profile changes. We also allow to register ipnauth.AuditLogFunc to be called when an auditable
action is attempted.

We then use all this to invert the dependency between the auditlog and ipnlocal packages and make
the auditlog functionality optional, where it only registers its callbacks via ipnlocal-provided hooks
when the auditlog package is imported.

We then underscore-import it when building tailscaled for Windows, and we'll explicitly
import it when building xcode/ipn-go-bridge for macOS. Since there's no default log-store
location for macOS, we'll also need to call auditlog.SetStoreFilePath to specify where
pending audit logs should be persisted.

Fixes #15394
Updates tailscale/corp#26435
Updates tailscale/corp#27012

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2025-03-28 10:36:49 -05:00
..
nat wgengine/magicsock: use learned DERP route as send path of last resort 2025-03-07 05:37:24 -08:00
testcontrol tstest/integration/testcontrol: fix AddRawMapResponse race condition 2025-03-25 10:39:54 +00:00
vms all: fix new lint warnings from bumping staticcheck 2024-08-22 12:31:08 -07:00
gen_deps.go all: update tools that manage copyright headers 2023-01-27 15:36:29 -08:00
integration_test.go tstest: make it clearer where AwaitRunning failed and why 2025-03-21 13:09:46 +00:00
integration.go vnet: add control/derps to test, stateful firewall 2024-08-09 09:06:54 -07:00
tailscaled_deps_test_darwin.go all: use new LocalAPI client package location 2025-02-05 14:41:42 -08:00
tailscaled_deps_test_freebsd.go all: use new LocalAPI client package location 2025-02-05 14:41:42 -08:00
tailscaled_deps_test_linux.go all: use new LocalAPI client package location 2025-02-05 14:41:42 -08:00
tailscaled_deps_test_openbsd.go all: use new LocalAPI client package location 2025-02-05 14:41:42 -08:00
tailscaled_deps_test_windows.go cmd/tailscaled,ipn/{auditlog,ipnlocal},tsd: omit auditlog unless explicitly imported 2025-03-28 10:36:49 -05:00