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
Andrea Gottardo 6c79f55d48
ipnlocal: force-regen new authURL when it is too old (#10971)
Fixes tailscale/support-escalations#23.

authURLs returned by control expire after 1 hour from creation. Customer reported that the Tailscale client on macOS would sending users to a stale authentication page when clicking on the `Login...` menu item. This can happen when clicking on Login after leaving the device unattended for several days. The device key expires, leading to the creation of a new authURL, however the client doesn't keep track of when the authURL was created. Meaning that `login-interactive` would send the user to an authURL that had expired server-side a long time before.

This PR ensures that whenever `login-interactive` is called via LocalAPI, an authURL that is too old won't be used. We force control to give us a new authURL whenever it's been more than 30 minutes since the last authURL was sent down from control.



Apply suggestions from code review




Set interval to 6 days and 23 hours

Signed-off-by: Andrea Gottardo <andrea@tailscale.com>
Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
8 months ago
..
conffile ipn/{conffile,ipnlocal}: start booting tailscaled from a config file w/ auth key 12 months ago
ipnauth ipn/ipnserver: always allow Windows SYSTEM user to connect 9 months ago
ipnlocal ipnlocal: force-regen new authURL when it is too old (#10971) 8 months ago
ipnserver ipn/ipnserver: always allow Windows SYSTEM user to connect 9 months ago
ipnstate ipn/ipnstate: add AllowedIPs to PeerStatus 10 months ago
localapi ipn/localapi: more http status cleanup (#10995) 8 months ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 11 months ago
store cmd/k8s-operator,ipn/store/kubestore: patch secrets instead of updating 1 year ago
backend.go taildrop: remove breaking abstraction layers for apple (#10728) 9 months ago
conf.go ipn,cmd/tailscale/cli: support hierarchical MaskedPrefs (#10507) 10 months ago
doc.go all: update copyright and license headers 2 years ago
fake_test.go all: update copyright and license headers 2 years ago
ipn_clone.go linuxfw,wgengine/route,ipn: add c2n and nodeattrs to control linux netfilter 10 months ago
ipn_test.go net/packet: split off checksum munging into different pkg 12 months ago
ipn_view.go linuxfw,wgengine/route,ipn: add c2n and nodeattrs to control linux netfilter 10 months ago
prefs.go ipn: apply ControlURL policy before login 9 months ago
prefs_test.go ipn: apply tailnet-wide default for auto-updates (#10508) 10 months ago
serve.go ipn/localapi: require local Windows admin to set serve path (#9969) 11 months ago
serve_test.go ipn/localapi: require local Windows admin to set serve path (#9969) 11 months ago
store.go taildrop: lazily perform full deletion scan after first taildrop use (#10137) 11 months ago
store_test.go ipn: avoid useless no-op WriteState calls 1 year ago