fix(auth): close Task 15 review round two
This commit is contained in:
@@ -986,9 +986,30 @@ task13_core_id() {
|
||||
}
|
||||
|
||||
task13_assert_maintenance_auth_isolation() {
|
||||
local rendered
|
||||
rendered="$TASK13_TMP/maintenance-auth-isolation.json"
|
||||
if ! task13_compose config --format json >"$rendered" 2>>"$TASK13_LOG"; then
|
||||
task13_log_failure "render workspace maintenance mount isolation"
|
||||
fi
|
||||
node - "$rendered" <<'NODE'
|
||||
const config = JSON.parse(require("node:fs").readFileSync(process.argv[2], "utf8"));
|
||||
const maintenance = config.services?.["workspace-maintenance"];
|
||||
if (!maintenance || !Array.isArray(maintenance.volumes)) process.exit(1);
|
||||
if (maintenance.volumes.some((mount) => mount?.target === "/run/thothii-auth" || mount?.target === "/data/auth")) {
|
||||
process.exit(1);
|
||||
}
|
||||
NODE
|
||||
task13_compose_logged "seed core authentication isolation sentinel" exec -T core sh -ceu \
|
||||
': > /data/auth/task13-maintenance-isolation-sentinel'
|
||||
task13_compose_logged "workspace maintenance auth isolation" \
|
||||
--profile workspace-maintenance run --rm --no-deps --entrypoint sh workspace-maintenance -ceu \
|
||||
'test ! -e /run/thothii-auth && test ! -e /data/auth'
|
||||
'test ! -e /run/thothii-auth
|
||||
test -d /data/auth
|
||||
test ! -e /data/auth/task13-maintenance-isolation-sentinel'
|
||||
task13_compose_logged "verify core authentication isolation sentinel" exec -T core sh -ceu \
|
||||
'test -f /data/auth/task13-maintenance-isolation-sentinel'
|
||||
task13_compose_logged "remove core authentication isolation sentinel" exec -T core sh -ceu \
|
||||
'rm -f /data/auth/task13-maintenance-isolation-sentinel'
|
||||
}
|
||||
|
||||
task13_assert_local_auth_lifecycle() {
|
||||
|
||||
Reference in New Issue
Block a user