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
Nick Khyl 2336c340c4 util/syspolicy: implement a syspolicy store that reads settings from environment variables
In this PR, we implement (but do not use yet, pending #13727 review) a syspolicy/source.Store
that reads policy settings from environment variables. It converts a CamelCase setting.Key,
such as AuthKey or ExitNodeID, to a SCREAMING_SNAKE_CASE, TS_-prefixed environment
variable name, such as TS_AUTH_KEY and TS_EXIT_NODE_ID. It then looks up the variable
and attempts to parse it according to the expected value type. If the environment variable
is not set, the policy setting is considered not configured in this store (the syspolicy package
will still read it from other sources). Similarly, if the environment variable has an invalid value
for the setting type, it won't be used (though the reported/logged error will differ).

Updates #13193
Updates #12687

Signed-off-by: Nick Khyl <nickk@tailscale.com>
3 weeks ago
..
cache util/cache: fix missing interface methods (#11275) 9 months ago
cibuild all: update copyright and license headers 2 years ago
clientmetric wgengine: instrument with usermetrics 1 month ago
cloudenv all: use math/rand/v2 more 6 months ago
cmpver util/cmpver: add Less/LessEq helper funcs 9 months ago
codegen cmd/viewer: import types/views when generating a getter for a map field 1 month ago
cstruct all: use Go 1.22 range-over-int 7 months ago
ctxkey all: use reflect.TypeFor now available in Go 1.22 (#11078) 10 months ago
deephash util/deephash: fix test regression on 32-bit 5 months ago
dirwalk all: use tstest.Replace more 2 years ago
dnsname all: use Go 1.22 range-over-int 7 months ago
execqueue control/controlclient,util/execqueue: extract execqueue into a package 10 months ago
expvarx all: use Go 1.22 range-over-int 7 months ago
fastuuid all: use Go 1.22 range-over-int 7 months ago
goroutines util/goroutines: let ScrubbedGoroutineDump get only current stack 1 year ago
groupmember util/groupmember: fail earlier if group doesn't exist, use slices.Contains 1 year ago
hashx all: use Go 1.22 range-over-int 7 months ago
httphdr util/httphdr: add new package for parsing HTTP headers (#9797) 1 year ago
httpm util/httpm: don't run test if .git doesn't exist 1 year ago
jsonutil all: use Go 1.22 range-over-int 7 months ago
limiter all: add test for package comments, fix, add comments as needed 4 months ago
lineread all: update copyright and license headers 2 years ago
linuxfw cmd/containerboot,util/linuxfw: create a SNAT rule for dst/src only once, clean up if needed (#13658) 2 months ago
lru util/lru: add Clear method 6 months ago
mak various: add golangci-lint, fix issues (#7905) 2 years ago
multierr all: use Go 1.22 range-over-int 7 months ago
must all: update copyright and license headers 2 years ago
nocasemaps all: use Go 1.22 range-over-int 7 months ago
osdiag all: add test for package comments, fix, add comments as needed 4 months ago
osshare all: add test for package comments, fix, add comments as needed 4 months ago
osuser util/osuser: turn wasm check into a const expression 4 months ago
pidowner all: use Go 1.22 range-over-int 7 months ago
pool util/pool: add package for storing and using a pool of items 6 months ago
precompress all: update copyright and license headers 2 years ago
progresstracking ipn/localapi: add support for multipart POST to file-put 8 months ago
quarantine all: update copyright and license headers 2 years ago
race all: use Go 1.22 range-over-int 7 months ago
racebuild all: update copyright and license headers 2 years ago
rands wgengine/magicsock: use math/rands/v2 6 months ago
reload all: use math/rand/v2 more 6 months ago
ringbuffer all: use Go 1.22 range-over-int 7 months ago
set util/set: add Of variant of SetOf that takes variadic parameter 7 months ago
singleflight util/singleflight: add DoChanContext 5 months ago
slicesx util/slicesx: add FirstElementEqual and LastElementEqual 2 months ago
syspolicy util/syspolicy: implement a syspolicy store that reads settings from environment variables 3 weeks ago
sysresources util/sysresources, magicsock: scale DERP buffer based on system memory 2 years ago
systemd all: update copyright and license headers 2 years ago
testenv util/testenv: add new package to hold InTest 1 year ago
topk all: use Go 1.22 range-over-int 7 months ago
truncate util/truncate: support []byte as well (#11614) 8 months ago
uniq all: use Go 1.22 range-over-int 7 months ago
usermetric util/usermetrics: make usermetrics non-global 2 months ago
vizerror util/vizerror: add WrapWithMessage 1 month ago
winutil util/winutil: add GetRegUserString/SetRegUserString accessors for storage and retrieval of string values in HKEY_CURRENT_USER 3 months ago
zstdframe all: use Go 1.22 range-over-int 7 months ago