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