24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
// Single-login enforcement: with ONLY the homepage session cookies, a direct
|
|
// visit to every outpost-guarded vhost must resolve through Anubis +
|
|
// authentik silently and land on the app — no login form, no challenge, no
|
|
// IdP error page. Exercises the provider the outpost actually carries
|
|
// (fixed 2026-09-01: loki/grafana/seerr were missing from the outpost M2M).
|
|
|
|
const GUARDED = ["search", "romm", "files", "seerr", "grafana", "prometheus", "loki"];
|
|
|
|
for (const host of GUARDED) {
|
|
test(`SSO passes silently for ${host}.franksdank.cloud`, async ({ page }) => {
|
|
await page.goto(`https://${host}.franksdank.cloud/`);
|
|
await expect
|
|
.poll(() => new URL(page.url()).hostname, { timeout: 60_000 })
|
|
.toBe(`${host}.franksdank.cloud`);
|
|
expect(await page.locator('input[name="uidField"]').count()).toBe(0);
|
|
const body = await page.locator("body").innerText();
|
|
expect(body).not.toContain("Making sure you're not a bot");
|
|
const resp = await page.request.get(page.url());
|
|
expect(resp.status()).toBeLessThan(500);
|
|
});
|
|
}
|