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/ipnlocal
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>
5 months ago
..
testdata ipn/ipnlocal: fix the path for writing cert files (#7203) 1 year ago
breaktcp_darwin.go cmd/tailscale: add debug commands to break connections 11 months ago
breaktcp_linux.go cmd/tailscale: add debug commands to break connections 11 months ago
c2n.go ipn: apply tailnet-wide default for auto-updates (#10508) 6 months ago
c2n_pprof.go tailcfg: move LogHeapPprof from Debug to c2n [capver 69] 11 months ago
c2n_test.go util/cmpx: delete now that we're using Go 1.22 5 months ago
cert.go all: fix nilness issues 7 months ago
cert_js.go ipn/ipnlocal: add c2n method to check on TLS cert fetch status 7 months ago
cert_test.go all: use Go 1.21 slices, maps instead of x/exp/{slices,maps} 11 months ago
dnsconfig_test.go util/cmpx: delete now that we're using Go 1.22 5 months ago
expiry.go ssh/tailssh: use control server time instead of local time 7 months ago
expiry_test.go types/netmap, all: make NetworkMap.SelfNode a tailcfg.NodeView 10 months ago
local.go ipnlocal: force-regen new authURL when it is too old (#10971) 5 months ago
local_test.go ipn/ipnlocal: fix app connector route advertisements on exit nodes 5 months ago
loglines_test.go tsd: add package with System type to unify subsystem init, discovery 1 year ago
network-lock.go ipn/ipnlocal,cmd/tailscale: persist tailnet name in user profile 7 months ago
network-lock_test.go ipn/ipnlocal,cmd/tailscale: persist tailnet name in user profile 7 months ago
peerapi.go ipn/ipnlocal: fix pretty printing of multi-record peer DNS results 5 months ago
peerapi_h2c.go all: update copyright and license headers 1 year ago
peerapi_macios_ext.go all: update copyright and license headers 1 year ago
peerapi_test.go appc,ipn/ipnlocal: add app connector routes if any part of a CNAME chain is routed 5 months ago
profiles.go util/cmpx: remove code that's in the stdlib now 6 months ago
profiles_notwindows.go ipn/ipnlocal: fix profile duplication 11 months ago
profiles_test.go ipn/ipnlocal,cmd/tailscale: persist tailnet name in user profile 7 months ago
profiles_windows.go ipn/ipnlocal: better enforce system policies 7 months ago
serve.go ipn/ipnlocal: fix proxy path that matches mount point (#10864) 5 months ago
serve_test.go util/cmpx: delete now that we're using Go 1.22 5 months ago
ssh.go ipnlocal: log failure to get ssh host keys 5 months ago
ssh_stub.go ipnlocal: log failure to get ssh host keys 5 months ago
ssh_test.go ipn/ipnlocal: drop not required StateKey parameter 1 year ago
state_test.go ipn/ipnlocal,cmd/tailscale: persist tailnet name in user profile 7 months ago
web_client.go {client/web},{ipn/ipnlocal}: replace localapi debug-web-client endpoint 7 months ago
web_client_stub.go ipn/ipnlocal: add mutex to webClient struct 8 months ago