[deploy] Proxy socket (QC minors 2 and 3): its directory is sticky (3770) so the front proxy cannot unlink edge's socket, each engine clears a stale one as root before start and after stop, and proxySocket.services puts the group in the front proxy's unit so the switch restarts it; beside-caddy.md checks Caddy's groups and says X-Forwarded-Proto is always https
This commit is contained in:
@@ -268,6 +268,10 @@ in
|
||||
assert wait_apply(server, t, r["apply"]["id"])["state"] == "kept"
|
||||
server.wait_until_succeeds("test -S /run/ianitor-proxy/edge.sock")
|
||||
assert server.succeed("stat -c '%a %G' /run/ianitor-proxy/edge.sock").strip() == "660 ianitor-proxy"
|
||||
# Sticky and setgid: the front proxy may connect but not unlink or replace edge's socket.
|
||||
assert server.succeed("stat -c '%a %U %G' /run/ianitor-proxy").strip() == "3770 root ianitor-proxy"
|
||||
server.fail("runuser -u front -- rm -f /run/ianitor-proxy/edge.sock")
|
||||
server.succeed("test -S /run/ianitor-proxy/edge.sock")
|
||||
code = server.succeed(
|
||||
"runuser -u front -- curl -s -o /dev/null -w '%{http_code}' --unix-socket /run/ianitor-proxy/edge.sock http://app.test/"
|
||||
).strip()
|
||||
|
||||
Reference in New Issue
Block a user