Watch
0
0
Fork
You've already forked hyperhive
0

k8s: the gateway's group reads the store credential files nginx includes

This commit is contained in:
atlas 2026-11-28 05:29:08 +01:00
commit f65aed2147

View file

@ -826,9 +826,9 @@ pkgs.testers.runNixOSTest {
assert password not in kube(machine, f"get pod {pod_name} -o json")
assert machine.succeed(f"stat -c '%a %U %G' {EXPORTER_PASSWORD} {EXPORTER_CONF} {EXPORTER_HASH_FILE} {STORE_AUTH_DIR}").split("\n")[:4] == [
"600 root root",
"640 root nginx",
"600 root root",
"600 root root",
"700 root root",
"750 root nginx",
]
login = base64.b64encode(f"swarm-exporter:{password}".encode()).decode()
assert machine.succeed(f"cat {EXPORTER_CONF}").strip() == f'proxy_set_header Authorization "Basic {login}";'