mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
SeaweedFS is a server-side S3 backend for its consumers; only the
filer/master admin UIs are browser-facing. Split them into a `frontend`
service that stays off on onion nodes ('svc-net-tor' in group_names):
- frontend disabled: no nginx proxy container, no filer/master vhosts,
no oauth2 SSO sidecar; the S3 API vhost is unaffected
- stale filer/master vhosts from earlier frontend-enabled deploys are
removed so the site-wide CSP health probe stops hitting dead domains
- csp_skip_domains additionally skips canonicals a disabled service
declares via services.<name>.domains (defense in depth)
- UI personas (admin/biber/guest/storage-buckets) gate on the
FRONTEND_SERVICE_ENABLED flag; tor variants dropped (backend role)
Verified on the onion node: 4/4 UI specs skip, S3 API reachable, CSP
health check green, matrix S3 media consumer unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
1.2 KiB
JavaScript
28 lines
1.2 KiB
JavaScript
const { test } = require("@playwright/test");
|
|
const { gotoOnion } = require("./personas");
|
|
|
|
exports.register = function (shared) {
|
|
const { env, keycloakLogin, isAuthChain, expect } = shared;
|
|
|
|
test("storage: a bucket exists for every consumer with the service enabled", async ({ page }) => {
|
|
test.skip(!env.frontendEnabled, "frontend disabled (headless backend node)");
|
|
test.skip(!env.ssoEnabled, "SSO disabled");
|
|
test.skip(env.consumerBuckets.length === 0, "no object-store consumers on this host");
|
|
|
|
await gotoOnion(page, env.filerUrl, { waitUntil: "domcontentloaded" });
|
|
if (isAuthChain(page.url())) {
|
|
await keycloakLogin(page, env.adminUsername, env.adminPassword);
|
|
}
|
|
await page.waitForLoadState("networkidle").catch(() => {});
|
|
|
|
await gotoOnion(page, `${env.filerUrl.replace(/\/$/, "")}/buckets/`, { waitUntil: "domcontentloaded" });
|
|
const listing = (await page.locator("body").innerText().catch(() => "")) || "";
|
|
|
|
const missing = env.consumerBuckets.filter((b) => !listing.includes(b.bucket));
|
|
expect(
|
|
missing,
|
|
`buckets missing on SeaweedFS: ${missing.map((b) => `${b.role}->${b.bucket}`).join(", ")}`
|
|
).toHaveLength(0);
|
|
});
|
|
};
|