tailscale/control/controlclient
Avery Pennarun ee19c53063 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-20 03:35:14 -04:00
..
auto.go ipnlocal: don't assume NeedsLogin immediately after StartLogout(). 2021-05-20 03:35:14 -04:00
client.go controlclient: extract a Client interface and rename Client->Auto. 2021-04-30 00:09:35 -04:00
controlclient_test.go ipnlocal: don't assume NeedsLogin immediately after StartLogout(). 2021-05-20 03:35:14 -04:00
debug_test.go tailcfg, control/controlclient: add goroutine dump debug feature 2021-03-03 10:56:01 -08:00
debug.go tailcfg, control/controlclient: add goroutine dump debug feature 2021-03-03 10:56:01 -08:00
direct_test.go control/controlclient: break direct.go into map.go (+tests), add mapSession 2021-04-18 19:56:03 -07:00
direct.go controlclient: update Persist.LoginName when it changes. 2021-05-20 01:07:23 -04:00
hostinfo_linux.go hostifo: update LXC, add Cloud Run. 2021-04-06 17:21:16 -07:00
hostinfo_windows.go control/controlclient: cache Windows version 2021-03-15 21:40:32 -07:00
map_test.go tailcfg, control/controlclient: accept nil MapResponse.Node (mapver 18) 2021-04-19 11:53:21 -07:00
map.go tailcfg, control/controlclient: accept nil MapResponse.Node (mapver 18) 2021-04-19 11:53:21 -07:00
sign_supported.go control/controlclient: return correct certificate 2021-04-07 09:42:13 -04:00
sign_unsupported.go control/controlclient: sign RegisterRequest (#1549) 2021-03-26 10:01:08 -04:00
sign.go control/controlclient: sign RegisterRequest (#1549) 2021-03-26 10:01:08 -04:00
status.go ipnlocal: don't assume NeedsLogin immediately after StartLogout(). 2021-05-20 03:35:14 -04:00