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
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
..
ipnauth all: use named pipes on windows 2 years ago
ipnlocal ipn/ipnlocal,tailcfg: introduce capability to gate TKA init paths 2 years ago
ipnserver cmd/tailscaled: unify the two Windows paths + separate IPN server path 2 years ago
ipnstate cmd/tailscale,ipn: surface TKA-filtered peers in lock status command 2 years ago
localapi cmd/tailscale,ipn: store disallowed TKA's in prefs, lock local-disable 2 years ago
policy ipn/policy: treat DNS service as interesting so it's not filtered out 3 years ago
store all: remove old +build tags 2 years ago
backend.go ipn: remove unused Backend interface 2 years ago
doc.go ipn: add WebServerConfig, add views 2 years ago
fake_test.go ipn/ipnlocal: add support for multiple user profiles 2 years ago
ipn_clone.go ipn,types/persist: add DisallowedTKAStateIDs, refactor as view type 2 years ago
ipn_view.go ipn,types/persist: add DisallowedTKAStateIDs, refactor as view type 2 years ago
prefs.go ipn: be more consistent with omitempty on debug/rare Prefs 2 years ago
prefs_test.go ipn: add ability to name profiles 2 years ago
serve.go cmd/tailscale/cli, ipn: move serve CLI funcs on to ServeConfig (#6401) 2 years ago
store.go cmd/tailscale/cli, ipn: move serve CLI funcs on to ServeConfig (#6401) 2 years ago