mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Wazuh carries no network-specific code any more: the onion front-proxy include, WAZUH_DASHBOARD_ONION_DOMAIN, the forked templates/proxy.conf.j2 vhost and the tor exclusive/primary overrides are gone. The role follows the Tor provider default like every other role with a Tor bond; serving one role on several networks returns generically in the multi-network change. Without the forked vhost nothing forwards X-Forwarded-Host, so the dashboard OIDC redirect base is the static canonical url.base instead of trust_dynamic_headers. Also: the dashboard port is read from one variable, the Playwright specs share wazuhLoginViaOidc and withBiberInGroup and assert worker-src blob:, PR-added explanatory comments are removed, and the root README lists the role. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
const { test, expect } = require("@playwright/test");
|
|
const { runGuestFlow, runBiberFlow, runAdminFlow, gotoOnion } = require("./personas");
|
|
const { skipUnlessServiceEnabled } = require("./service-gating");
|
|
const { resolveTimeout } = require("./timeouts");
|
|
const shared = require("./_shared");
|
|
|
|
test.use({ ignoreHTTPSErrors: true });
|
|
|
|
test("guest: public-landing → auth chain → never authenticated", async ({ page }) => {
|
|
await runGuestFlow(page);
|
|
});
|
|
|
|
function registerBiberBaseline() {
|
|
test("biber: dashboard → keycloak → view alerts → logout", async ({ page, browser }) => {
|
|
skipUnlessServiceEnabled("sso");
|
|
await shared.withBiberInGroup(browser, `${shared.env.rbacGroupPathPrefix}readonly-auditor`, () =>
|
|
runBiberFlow(page, {
|
|
biberInteraction: async (p) => {
|
|
await expect(p.locator("body")).toContainText(/home|manage|dev tools/i, {
|
|
timeout: resolveTimeout(30_000),
|
|
});
|
|
},
|
|
}),
|
|
);
|
|
});
|
|
}
|
|
|
|
test("administrator: app → keycloak → admin action → logout", async ({ page }) => {
|
|
await runAdminFlow(page, {
|
|
adminInteraction: async (p) => {
|
|
await gotoOnion(p, `${shared.env.appBaseUrl}/app/security-dashboards-plugin#/roles`);
|
|
await expect(p.locator("body")).toContainText(/security|roles|users|management/i, {
|
|
timeout: resolveTimeout(30_000),
|
|
});
|
|
},
|
|
});
|
|
});
|
|
|
|
module.exports = { registerBiberBaseline };
|