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>
9 months ago
..
conffile ipn/{conffile,ipnlocal}: start booting tailscaled from a config file w/ auth key 1 year ago
ipnauth ipn/ipnserver: always allow Windows SYSTEM user to connect 10 months ago
ipnlocal ipnlocal: force-regen new authURL when it is too old (#10971) 9 months ago
ipnserver ipn/ipnserver: always allow Windows SYSTEM user to connect 10 months ago
ipnstate ipn/ipnstate: add AllowedIPs to PeerStatus 12 months ago
localapi ipn/localapi: more http status cleanup (#10995) 9 months ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 1 year 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) 10 months ago
conf.go ipn,cmd/tailscale/cli: support hierarchical MaskedPrefs (#10507) 11 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 12 months ago
ipn_test.go net/packet: split off checksum munging into different pkg 1 year ago
ipn_view.go linuxfw,wgengine/route,ipn: add c2n and nodeattrs to control linux netfilter 12 months ago
prefs.go ipn: apply ControlURL policy before login 11 months ago
prefs_test.go ipn: apply tailnet-wide default for auto-updates (#10508) 11 months ago
serve.go ipn/localapi: require local Windows admin to set serve path (#9969) 1 year ago
serve_test.go ipn/localapi: require local Windows admin to set serve path (#9969) 1 year ago
store.go taildrop: lazily perform full deletion scan after first taildrop use (#10137) 1 year ago
store_test.go ipn: avoid useless no-op WriteState calls 1 year ago