summaryrefslogtreecommitdiffhomepage
path: root/control/controlhttp/controlhttpserver
diff options
context:
space:
mode:
authorNick Khyl <nickk@tailscale.com>2024-10-18 10:18:06 -0500
committerNick Khyl <1761190+nickkhyl@users.noreply.github.com>2024-10-30 11:12:22 -0500
commit2336c340c4fc72758a8e7bae15062fb78f98d895 (patch)
tree3f4feec51c899768a46ca9fdc0012f4aa17758bc /control/controlhttp/controlhttpserver
parent1103044598ac2897a3f2f6687dc9d2b3d23f7da5 (diff)
downloadtailscale-2336c340c4fc72758a8e7bae15062fb78f98d895.tar.xz
tailscale-2336c340c4fc72758a8e7bae15062fb78f98d895.zip
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>
Diffstat (limited to 'control/controlhttp/controlhttpserver')
0 files changed, 0 insertions, 0 deletions