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/util/syspolicy
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>
10 months ago
..
internal util/slicesx: add AppendNonzero 11 months ago
rsop util/syspolicy/rsop: reduce policyReloadMinDelay and policyReloadMaxDelay when in tests 1 year ago
setting util/syspolicy/setting: make setting.Snapshot JSON-marshallable 1 year ago
source cmd/tailscaled,util/syspolicy/source,util/winutil/gp: disallow acquiring the GP lock during service startup 11 months ago
handler.go util/syspolicy, ipn/ipnlocal: update syspolicy package to utilize syspolicy/rsop 1 year ago
policy_keys.go ipn/ipn{auth,server,local}: initial support for the always-on mode 10 months ago
policy_keys_test.go util/syspolicy, ipn/ipnlocal: update syspolicy package to utilize syspolicy/rsop 1 year ago
syspolicy.go util/syspolicy, ipn/ipnlocal: update syspolicy package to utilize syspolicy/rsop 1 year ago
syspolicy_test.go util/syspolicy, ipn/ipnlocal: update syspolicy package to utilize syspolicy/rsop 1 year ago
syspolicy_windows.go util/syspolicy, ipn/ipnlocal: update syspolicy package to utilize syspolicy/rsop 1 year ago