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/tailcfg
Tom DNetto f1ab11e961 ipn/ipnlocal,tailcfg: introduce capability to gate TKA init paths
Previously, `TAILSCALE_USE_WIP_CODE` was needed to hit a bunch of the TKA paths. With
this change:

 - Enablement codepaths (NetworkLockInit) and initialization codepaths (tkaBootstrapFromGenesisLocked via tkaSyncIfNeeded)
   require either the WIP envknob or CapabilityTailnetLockAlpha.
 - Normal operation codepaths (tkaSyncIfNeeded, tkaFilterNetmapLocked) require TKA to be initialized, or either-or the
   envknob / capability.
 - Auxillary commands (ie: changing tka keys) require TKA to be initialized.

The end result is that it shouldn't be possible to initialize TKA (or subsequently use any of its features) without being
sent the capability or setting the envknob on tailscaled yourself.

I've also pulled out a bunch of unnecessary checks for CanSupportNetworkLock().

Signed-off-by: Tom DNetto <tom@tailscale.com>
2 years ago
..
c2ntypes.go ipn/ipnlocal: add c2n method to get SSH username candidates 2 years ago
derpmap.go net/netcheck: deflake (maybe) magicsock's TestNewConn 2 years ago
tailcfg.go ipn/ipnlocal,tailcfg: introduce capability to gate TKA init paths 2 years ago
tailcfg_clone.go tailcfg: add Hostinfo.WireIngress bool 2 years ago
tailcfg_test.go tailcfg: add Hostinfo.WireIngress bool 2 years ago
tailcfg_view.go tailcfg: add Hostinfo.WireIngress bool 2 years ago
tka.go cmd/tailscale,ipn: improve UX of lock init command, cosmetic changes 2 years ago