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
Nick Khyl 02ad21717f ipn/ipn{auth,server,local}: initial support for the always-on mode
In this PR, we update LocalBackend to set WantRunning=true when applying policy settings
to the current profile's prefs, if the "always-on" mode is enabled.

We also implement a new (*LocalBackend).EditPrefsAs() method, which is like EditPrefs
but accepts an actor (e.g., a LocalAPI client's identity) that initiated the change.
If WantRunning is being set to false, the new EditPrefsAs method checks whether the actor
has ipnauth.Disconnect access to the profile and propagates an error if they do not.

Finally, we update (*ipnserver.actor).CheckProfileAccess to allow a disconnect
only if the "always-on" mode is not enabled by the AlwaysOn policy setting.

This is not a comprehensive solution to the "always-on" mode across platforms,
as instead of disconnecting a user could achieve the same effect by creating
a new empty profile, initiating a reauth, or by deleting the profile.
These are the things we should address in future PRs.

Updates #14823

Signed-off-by: Nick Khyl <nickk@tailscale.com>
12 months ago
..
conffile ipn/conffile: don't depend on hujson on iOS/Android 1 year ago
ipnauth ipn/ipn{auth,server,local}: initial support for the always-on mode 12 months ago
ipnlocal ipn/ipn{auth,server,local}: initial support for the always-on mode 12 months ago
ipnserver ipn/ipn{auth,server,local}: initial support for the always-on mode 12 months ago
ipnstate all: illumos/solaris userspace only support 1 year ago
localapi ipn/ipn{auth,server,local}: initial support for the always-on mode 12 months ago
policy ipn,tailconfig: clean up unreleased and removed app connector service 2 years ago
store kube/{kubeapi,kubeclient},ipn/store/kubestore,cmd/{containerboot,k8s-operator}: emit kube store Events (#14112) 1 year ago
backend.go ipn: declare NotifyWatchOpt consts without using iota 1 year ago
conf.go ipn/conf.go: add VIPServices to tailscaled configfile (#14345) 1 year ago
doc.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 12 months ago
ipn_clone.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 12 months ago
ipn_test.go all: do not depend on the testing package 2 years ago
ipn_view.go ipn: generate LoginProfileView and use it instead of *LoginProfile where appropriate 12 months ago
prefs.go cmd/tailscale,ipn,tailcfg: add `tailscale advertise` subcommand behind envknob (#13734) 1 year ago
prefs_test.go types/persist: remove Persist.LegacyFrontendPrivateMachineKey 12 months ago
serve.go tailcfg: add ServiceName 12 months ago
serve_test.go ipn: [serve] warn that foreground funnel won't work if shields are up (#14685) 12 months ago
store.go ipn: add comment about thread-safety to StateStore 2 years ago
store_test.go ipn: avoid useless no-op WriteState calls 2 years ago