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
Andrea Gottardo c79b736a85
ipnlocal: allow overriding os.Hostname() via syspolicy (#14676)
Updates tailscale/corp#25936

This defines a new syspolicy 'Hostname' and allows an IT administrator to override the value we normally read from os.Hostname(). This is particularly useful on Android and iOS devices, where the hostname we get from the OS is really just the device model (a platform restriction to prevent fingerprinting).

If we don't implement this, all devices on the customer's side will look like `google-pixel-7a-1`, `google-pixel-7a-2`, `google-pixel-7a-3`, etc. and it is not feasible for the customer to use the API or worse the admin console to manually fix these names.

Apply code review comment by @nickkhyl

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
Co-authored-by: Nick Khyl <1761190+nickkhyl@users.noreply.github.com>
11 months ago
..
internal util/syspolicy: implement a syspolicy store that reads settings from environment variables 1 year 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 util/slicesx: add MapKeys and MapValues from golang.org/x/exp/maps 11 months ago
handler.go util/syspolicy, ipn/ipnlocal: update syspolicy package to utilize syspolicy/rsop 1 year ago
policy_keys.go ipnlocal: allow overriding os.Hostname() via syspolicy (#14676) 11 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