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 f1c7b463cd ipn/{ipnauth,ipnlocal,localapi}: make EditPrefs return an error if changing exit node is restricted by policy
We extract checkEditPrefsAccessLocked, adjustEditPrefsLocked, and onEditPrefsLocked from the EditPrefs
execution path, defining when each step is performed and what behavior is allowed at each stage.

Currently, this is primarily used to support Always On mode, to handle the Exit Node enablement toggle,
and to report prefs edit metrics.

We then use it to enforce Exit Node policy settings by preventing users from setting an exit node
and making EditPrefs return an error when an exit node is restricted by policy. This enforcement is also
extended to the Exit Node toggle.

These changes prepare for supporting Exit Node overrides when permitted by policy and preventing logout
while Always On mode is enabled.

In the future, implementation of these methods can be delegated to ipnext extensions via the feature hooks.

Updates tailscale/corp#29969
Updates tailscale/corp#26249

Signed-off-by: Nick Khyl <nickk@tailscale.com>
5 months ago
..
internal all: unify some redundant testing.TB interface copies 8 months ago
rsop all: unify some redundant testing.TB interface copies 8 months ago
setting all: unify some redundant testing.TB interface copies 8 months ago
source ipn/ipnlocal,util/syspolicy/source: retain existing exit node when using auto exit node, if it's allowed by policy 5 months ago
handler.go all: unify some redundant testing.TB interface copies 8 months ago
policy_keys.go ipn/store: automatically migrate between plaintext and encrypted state (#16318) 6 months ago
policy_keys_test.go util/syspolicy, ipn/ipnlocal: update syspolicy package to utilize syspolicy/rsop 1 year ago
syspolicy.go ipn/{ipnauth,ipnlocal,localapi}: make EditPrefs return an error if changing exit node is restricted by policy 5 months ago
syspolicy_test.go all: unify some redundant testing.TB interface copies 8 months ago
syspolicy_windows.go all: unify some redundant testing.TB interface copies 8 months ago