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 d832467461 client/tailscale,ipn/ipn{local,server},util/syspolicy: implement the AlwaysOn.OverrideWithReason policy setting
In this PR, we update client/tailscale.LocalClient to allow sending requests with an optional X-Tailscale-Reason
header. We then update ipn/ipnserver.{actor,Server} to retrieve this reason, if specified, and use it to determine
whether ipnauth.Disconnect is allowed when the AlwaysOn.OverrideWithReason policy setting is enabled.
For now, we log the reason, along with the profile and OS username, to the backend log.

Finally, we update LocalBackend to remember when a disconnect was permitted and do not reconnect automatically
unless the policy changes.

Updates tailscale/corp#26146

Signed-off-by: Nick Khyl <nickk@tailscale.com>
10 months ago
..
internal util/syspolicy/internal/metrics: replace dots with underscores for metric names 10 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 10 months ago
handler.go util/syspolicy, ipn/ipnlocal: update syspolicy package to utilize syspolicy/rsop 1 year ago
policy_keys.go client/tailscale,ipn/ipn{local,server},util/syspolicy: implement the AlwaysOn.OverrideWithReason policy setting 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