tailscale/ipn/ipnlocal
Avery Pennarun 8a7d35594d ipnlocal: don't assume NeedsLogin immediately after StartLogout().
Previously, there was no server round trip required to log out, so when
you asked ipnlocal to Logout(), it could clear the netmap immediately
and switch to NeedsLogin state.

In v1.8, we added a true Logout operation. ipn.Logout() would trigger
an async cc.StartLogout() and *also* immediately switch to NeedsLogin.
Unfortunately, some frontends would see NeedsLogin and immediately
trigger a new StartInteractiveLogin() operation, before the
controlclient auth state machine actually acted on the Logout command,
thus accidentally invalidating the entire logout operation, retaining
the netmap, and violating the user's expectations.

Instead, add a new LogoutFinished signal from controlclient
(paralleling LoginFinished) and, upon starting a logout, don't update
the ipn state machine until it's received.

Updates: #1918 (BUG-2)
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2021-05-31 14:53:49 -04:00
..
local_test.go all: adapt to opaque netaddr types 2021-05-16 14:52:00 -07:00
local.go ipnlocal: don't assume NeedsLogin immediately after StartLogout(). 2021-05-31 14:53:49 -04:00
loglines_test.go types/logger: add key grinder stats lines to rate-limiting exemption list 2021-05-05 08:25:15 -07:00
peerapi_macios_ext.go ipn/{ipnlocal,localapi}: add localapi handler to dial/proxy file PUTs 2021-04-06 21:31:50 -07:00
peerapi_test.go ipn/ipnlocal: use delete marker files to work around Windows delete problems 2021-04-26 10:59:25 -07:00
peerapi.go all: adapt to opaque netaddr types 2021-05-16 14:52:00 -07:00
state_test.go ipnlocal: don't assume NeedsLogin immediately after StartLogout(). 2021-05-31 14:53:49 -04:00