diff --git a/docs/KUBERNETES.md b/docs/KUBERNETES.md index d1e66b1722..1256701ddf 100644 --- a/docs/KUBERNETES.md +++ b/docs/KUBERNETES.md @@ -2,7 +2,7 @@ This guide explains how to deploy the Pulse Server (Hub) and Pulse Agents on Kubernetes clusters, including immutable distributions like Talos Linux. -> **Navigation note (v6):** Kubernetes has its own page at `/kubernetes`, with tabs for nodes, workloads (pods), services, storage, configuration, and events. Pods appear on the **Workloads** tab (`/kubernetes/workloads`). +> **Navigation note (v6):** Kubernetes has its own page at `/kubernetes`, opening on **Kubernetes → Overview** (`/kubernetes/overview`) with tabs for **Overview** (`/kubernetes/overview`), **Nodes** (`/kubernetes/nodes`), **Workloads** (`/kubernetes/workloads`), **Services** (`/kubernetes/services`), **Storage** (`/kubernetes/storage`), **Configuration** (`/kubernetes/configuration`), and **Events** (`/kubernetes/events`). **Overview** leads with active health alerts, nodes needing attention, clusters, and workloads, while pods, Deployments, controllers, and autoscaling also appear under **Workloads**. Tabs outside **Overview** appear only when the agent reports inventory for them, so a minimal read-only RBAC role shows only the tabs it can collect. ## Prerequisites @@ -128,8 +128,9 @@ For Kubernetes monitoring, use a custom DaemonSet as shown below. ### Prepare an agent Secret -Complete setup on the running Pulse server, then create a token in **API Access** -with `kubernetes:report`. Add `agent:report` only if you also enable host metrics. +Complete setup on the running Pulse server, then create a token in +**Settings → Security → API Access** (`/settings/security/api`) with +`kubernetes:report`. Add `agent:report` only if you also enable host metrics. Do not reuse an administrator token. Pulse v6 does not provision API tokens from the legacy `API_TOKENS` server environment variable. @@ -420,8 +421,10 @@ The Kubernetes module uses the pod's service account to read the cluster API. The minimal role below covers node, pod and Deployment inventory, their CPU/memory usage from `metrics.k8s.io`, and optional recovery records. It is not a complete role for every Kubernetes tab or resource type Pulse can collect. -Other inventory needs its own explicit read permissions; a running pod or one -populated tab does not establish complete collection. +Other inventory needs its own explicit read permissions: tabs such as +**Services**, **Storage**, **Configuration**, and **Events** stay hidden until +the agent reports matching objects, and a running pod or one populated tab +does not establish complete collection. For a new deployment, create the service account, role and binding in the intended cluster before applying the agent workload. For an existing one, diff --git a/docs/MULTI_TENANT.md b/docs/MULTI_TENANT.md index ff8aeff2ca..b86c5d1d5e 100644 --- a/docs/MULTI_TENANT.md +++ b/docs/MULTI_TENANT.md @@ -18,7 +18,7 @@ The Community, Relay, and Pro tiers do not include the `multi_tenant` capability ## Quick Start 1. Set `PULSE_MULTI_TENANT_ENABLED=true` through your [deployment configuration](#applying-the-feature-flag). -2. Activate your Enterprise license in **Settings → Plans & Billing**. +2. Activate your Enterprise license in **Settings → System → Plans & Billing**. 3. Create the organization with the session-authenticated `POST /api/orgs` endpoint (see [Creating an Organization](#creating-an-organization)). This build has no Create Organization button in **Settings → Organization**. 4. Assign infrastructure to the organization. 5. Use the **Org Switcher** in the header bar to switch between organizations. @@ -259,7 +259,7 @@ Apply the flag in your [deployment configuration](#applying-the-feature-flag). ### "Multi-tenant access requires an Enterprise license" (402) -Activate an Enterprise license with the `multi_tenant` capability in **Settings → Plans & Billing**. +Activate an Enterprise license with the `multi_tenant` capability in **Settings → System → Plans & Billing**. ### Organization data not loading after switch diff --git a/docs/OPERATIONAL_TRUST.md b/docs/OPERATIONAL_TRUST.md index aa75498389..fbcc811165 100644 --- a/docs/OPERATIONAL_TRUST.md +++ b/docs/OPERATIONAL_TRUST.md @@ -213,9 +213,11 @@ change to a workload, notification queue or alert lifecycle. stale, denied, partial or unknown state. Do not disconnect a collector or induce a fault to obtain a test case. A successful task or action is not fresh detector evidence of recovery, guest thaw or a tested restore. -4. Inspect **Recent delivery activity** in Alert History and existing failed - delivery details, if any. Compare the original alert, queued attempt and - recipient's actual message separately; Test success does not establish +4. Inspect **Recent delivery activity** in **Alerts → Notifications** + (`/alerts/notifications`) and existing failed delivery details, if any, + while using **Alerts → History** (`/alerts/history`) for fired and resolved + alert timelines. Compare the original alert, queued attempt and + recipient's actual message separately: Test success does not establish ordinary, grouped or resolved delivery. Use the [notification checks](TROUBLESHOOTING.md#test-succeeds-but-real-alerts-are-missing) for the actual symptom. diff --git a/docs/RBAC.md b/docs/RBAC.md index 624f7ef399..e1fb91ad50 100644 --- a/docs/RBAC.md +++ b/docs/RBAC.md @@ -14,8 +14,8 @@ For plan details, see [PULSE_PRO.md](PULSE_PRO.md). For API endpoints, see [API A role is a named set of permissions. Each permission is an `(action, resource)` pair: -- **action**: `read`, `write`, `delete`, or `admin` -- **resource**: A Pulse resource type (e.g., `alerts`, `settings`, `nodes`, `ai`) +- **action**: `read`, `write`, `delete`, `admin`, or `*` +- **resource**: A Pulse resource type. The **Settings → Security → Roles** editor lists `settings`, `audit_logs`, `nodes`, `users`, `license`, and `*`. Custom role definitions via the API also accept other resource names such as `alerts` and `ai`. Pulse ships with built-in roles: `admin` (full access), `operator` (manage alerts and resources), `viewer` (read-only), and `auditor` (audit log access). You can create additional custom roles for more granular control. @@ -37,14 +37,14 @@ user merely because no local administrator is configured. ## Quick Start -1. Confirm a Pro, grandfathered Pro+, Cloud, MSP, or Enterprise/custom license is active in **Settings → Plans & Billing**. +1. Confirm a Pro, grandfathered Pro+, Cloud, MSP, or Enterprise/custom license is active in **Settings → System → Plans & Billing**. 2. Go to **Settings → Security → Roles**. 3. Create roles with the permissions you need. 4. Assign roles to users. An active licence is not an administrator grant. For self-hosted Pulse, the public Community runtime also does not gain Pro-only hooks when a licence is -activated. Check **Settings → Plans & Billing** for both the licence and runtime +activated. Check **Settings → System → Plans & Billing** for both the licence and runtime status before changing access. If it shows **Pro runtime missing**, follow its **Open Pulse Pro downloads** action and the [plans guide](PULSE_PRO.md); do not buy a second licence or reset the data directory to clear this gate. diff --git a/frontend-modern/public/docs/KUBERNETES.md b/frontend-modern/public/docs/KUBERNETES.md index d1e66b1722..1256701ddf 100644 --- a/frontend-modern/public/docs/KUBERNETES.md +++ b/frontend-modern/public/docs/KUBERNETES.md @@ -2,7 +2,7 @@ This guide explains how to deploy the Pulse Server (Hub) and Pulse Agents on Kubernetes clusters, including immutable distributions like Talos Linux. -> **Navigation note (v6):** Kubernetes has its own page at `/kubernetes`, with tabs for nodes, workloads (pods), services, storage, configuration, and events. Pods appear on the **Workloads** tab (`/kubernetes/workloads`). +> **Navigation note (v6):** Kubernetes has its own page at `/kubernetes`, opening on **Kubernetes → Overview** (`/kubernetes/overview`) with tabs for **Overview** (`/kubernetes/overview`), **Nodes** (`/kubernetes/nodes`), **Workloads** (`/kubernetes/workloads`), **Services** (`/kubernetes/services`), **Storage** (`/kubernetes/storage`), **Configuration** (`/kubernetes/configuration`), and **Events** (`/kubernetes/events`). **Overview** leads with active health alerts, nodes needing attention, clusters, and workloads, while pods, Deployments, controllers, and autoscaling also appear under **Workloads**. Tabs outside **Overview** appear only when the agent reports inventory for them, so a minimal read-only RBAC role shows only the tabs it can collect. ## Prerequisites @@ -128,8 +128,9 @@ For Kubernetes monitoring, use a custom DaemonSet as shown below. ### Prepare an agent Secret -Complete setup on the running Pulse server, then create a token in **API Access** -with `kubernetes:report`. Add `agent:report` only if you also enable host metrics. +Complete setup on the running Pulse server, then create a token in +**Settings → Security → API Access** (`/settings/security/api`) with +`kubernetes:report`. Add `agent:report` only if you also enable host metrics. Do not reuse an administrator token. Pulse v6 does not provision API tokens from the legacy `API_TOKENS` server environment variable. @@ -420,8 +421,10 @@ The Kubernetes module uses the pod's service account to read the cluster API. The minimal role below covers node, pod and Deployment inventory, their CPU/memory usage from `metrics.k8s.io`, and optional recovery records. It is not a complete role for every Kubernetes tab or resource type Pulse can collect. -Other inventory needs its own explicit read permissions; a running pod or one -populated tab does not establish complete collection. +Other inventory needs its own explicit read permissions: tabs such as +**Services**, **Storage**, **Configuration**, and **Events** stay hidden until +the agent reports matching objects, and a running pod or one populated tab +does not establish complete collection. For a new deployment, create the service account, role and binding in the intended cluster before applying the agent workload. For an existing one, diff --git a/frontend-modern/public/docs/MULTI_TENANT.md b/frontend-modern/public/docs/MULTI_TENANT.md index ff8aeff2ca..b86c5d1d5e 100644 --- a/frontend-modern/public/docs/MULTI_TENANT.md +++ b/frontend-modern/public/docs/MULTI_TENANT.md @@ -18,7 +18,7 @@ The Community, Relay, and Pro tiers do not include the `multi_tenant` capability ## Quick Start 1. Set `PULSE_MULTI_TENANT_ENABLED=true` through your [deployment configuration](#applying-the-feature-flag). -2. Activate your Enterprise license in **Settings → Plans & Billing**. +2. Activate your Enterprise license in **Settings → System → Plans & Billing**. 3. Create the organization with the session-authenticated `POST /api/orgs` endpoint (see [Creating an Organization](#creating-an-organization)). This build has no Create Organization button in **Settings → Organization**. 4. Assign infrastructure to the organization. 5. Use the **Org Switcher** in the header bar to switch between organizations. @@ -259,7 +259,7 @@ Apply the flag in your [deployment configuration](#applying-the-feature-flag). ### "Multi-tenant access requires an Enterprise license" (402) -Activate an Enterprise license with the `multi_tenant` capability in **Settings → Plans & Billing**. +Activate an Enterprise license with the `multi_tenant` capability in **Settings → System → Plans & Billing**. ### Organization data not loading after switch diff --git a/frontend-modern/public/docs/OPERATIONAL_TRUST.md b/frontend-modern/public/docs/OPERATIONAL_TRUST.md index aa75498389..fbcc811165 100644 --- a/frontend-modern/public/docs/OPERATIONAL_TRUST.md +++ b/frontend-modern/public/docs/OPERATIONAL_TRUST.md @@ -213,9 +213,11 @@ change to a workload, notification queue or alert lifecycle. stale, denied, partial or unknown state. Do not disconnect a collector or induce a fault to obtain a test case. A successful task or action is not fresh detector evidence of recovery, guest thaw or a tested restore. -4. Inspect **Recent delivery activity** in Alert History and existing failed - delivery details, if any. Compare the original alert, queued attempt and - recipient's actual message separately; Test success does not establish +4. Inspect **Recent delivery activity** in **Alerts → Notifications** + (`/alerts/notifications`) and existing failed delivery details, if any, + while using **Alerts → History** (`/alerts/history`) for fired and resolved + alert timelines. Compare the original alert, queued attempt and + recipient's actual message separately: Test success does not establish ordinary, grouped or resolved delivery. Use the [notification checks](TROUBLESHOOTING.md#test-succeeds-but-real-alerts-are-missing) for the actual symptom. diff --git a/frontend-modern/public/docs/RBAC.md b/frontend-modern/public/docs/RBAC.md index 624f7ef399..e1fb91ad50 100644 --- a/frontend-modern/public/docs/RBAC.md +++ b/frontend-modern/public/docs/RBAC.md @@ -14,8 +14,8 @@ For plan details, see [PULSE_PRO.md](PULSE_PRO.md). For API endpoints, see [API A role is a named set of permissions. Each permission is an `(action, resource)` pair: -- **action**: `read`, `write`, `delete`, or `admin` -- **resource**: A Pulse resource type (e.g., `alerts`, `settings`, `nodes`, `ai`) +- **action**: `read`, `write`, `delete`, `admin`, or `*` +- **resource**: A Pulse resource type. The **Settings → Security → Roles** editor lists `settings`, `audit_logs`, `nodes`, `users`, `license`, and `*`. Custom role definitions via the API also accept other resource names such as `alerts` and `ai`. Pulse ships with built-in roles: `admin` (full access), `operator` (manage alerts and resources), `viewer` (read-only), and `auditor` (audit log access). You can create additional custom roles for more granular control. @@ -37,14 +37,14 @@ user merely because no local administrator is configured. ## Quick Start -1. Confirm a Pro, grandfathered Pro+, Cloud, MSP, or Enterprise/custom license is active in **Settings → Plans & Billing**. +1. Confirm a Pro, grandfathered Pro+, Cloud, MSP, or Enterprise/custom license is active in **Settings → System → Plans & Billing**. 2. Go to **Settings → Security → Roles**. 3. Create roles with the permissions you need. 4. Assign roles to users. An active licence is not an administrator grant. For self-hosted Pulse, the public Community runtime also does not gain Pro-only hooks when a licence is -activated. Check **Settings → Plans & Billing** for both the licence and runtime +activated. Check **Settings → System → Plans & Billing** for both the licence and runtime status before changing access. If it shows **Pro runtime missing**, follow its **Open Pulse Pro downloads** action and the [plans guide](PULSE_PRO.md); do not buy a second licence or reset the data directory to clear this gate. diff --git a/scripts/tests/test_admin_docs.py b/scripts/tests/test_admin_docs.py index a29e5438c4..3db83c61b7 100644 --- a/scripts/tests/test_admin_docs.py +++ b/scripts/tests/test_admin_docs.py @@ -476,5 +476,32 @@ class AdminDocsTest(unittest.TestCase): self.assertEqual(len(requests), before + 1, "do not follow redirects or retry partial reads") + def test_plans_and_rbac_editor_permissions_match_shipped_settings_ui(self): + nav = (ROOT / "frontend-modern/src/components/Settings/settingsNavCatalog.ts").read_text() + system_group = nav.split("id: 'system',", 1)[1].split("id: 'support',", 1)[0] + self.assertIn("id: 'system-billing'", system_group) + messages = (ROOT / "frontend-modern/src/i18n/messages.ts").read_text() + self.assertIn("'settings.nav.group.system': 'System'", messages) + self.assertIn("'settings.nav.item.plans': 'Plans & Billing'", messages) + for name in ("RBAC.md", "MULTI_TENANT.md"): + with self.subTest(guide=name): + guide = (DOCS / name).read_text() + self.assertIn("**Settings → System → Plans & Billing**", guide) + self.assertNotIn("**Settings → Plans & Billing**", guide) + + rbac_perms = (ROOT / "frontend-modern/src/utils/rbacPermissions.ts").read_text() + actions = re.findall(r"'([^']+)'", rbac_perms.split("RBAC_PERMISSION_ACTIONS = [", 1)[1].split("]", 1)[0]) + resources = re.findall(r"'([^']+)'", rbac_perms.split("RBAC_PERMISSION_RESOURCES = [", 1)[1].split("]", 1)[0]) + self.assertGreaterEqual(len(actions), 5) + self.assertGreaterEqual(len(resources), 6) + rbac = (DOCS / "RBAC.md").read_text() + for action in actions: + with self.subTest(action=action): + self.assertIn(f"`{action}`", rbac) + for resource in resources: + with self.subTest(resource=resource): + self.assertIn(f"`{resource}`", rbac) + + if __name__ == "__main__": unittest.main() diff --git a/scripts/tests/test_navigation_help_docs.py b/scripts/tests/test_navigation_help_docs.py index 2489668dad..2924fd7e75 100644 --- a/scripts/tests/test_navigation_help_docs.py +++ b/scripts/tests/test_navigation_help_docs.py @@ -92,8 +92,24 @@ class NavigationHelpDocsTest(unittest.TestCase): self.assertIn("{ id: 'backups', label: 'Backups'", source("features/proxmox/proxmoxPageModel.ts")) self.assertIn("PROXMOX_BACKUPS_PATH = `${PROXMOX_PATH}/backups`", source("routing/resourceLinks.ts")) + def test_kubernetes_locations_match_the_actual_tab_labels_and_paths(self): + model = source("features/kubernetes/kubernetesPageModel.ts") + tabs = dict(re.findall(r"label: '([^']+)', path: '(/kubernetes/[^']+)'", model)) + self.assertGreaterEqual(len(tabs), 7) + self.assertIn("Overview", tabs) + self.assertIn("Workloads", tabs) + guide = doc_text("KUBERNETES.md") + for label, path in tabs.items(): + with self.subTest(tab=label): + self.assertIn(f"**{label}** (`{path}`)", guide) + self.assertIn("**Kubernetes → Overview** (`/kubernetes/overview`)", guide) + self.assertIn("hasKubernetesTabInventory", model) + self.assertIn("Tabs outside **Overview** appear only when the agent reports inventory for them", guide) + self.assertIn("**Settings → Security → API Access** (`/settings/security/api`)", guide) + self.assertIn("SETTINGS_API_ACCESS_PATH = '/settings/security/api'", source("routing/resourceLinks.ts")) + def test_all_changed_guides_match_their_shipped_copies(self): - for name in ("TROUBLESHOOTING.md", "TRUENAS.md", "PBS.md"): + for name in ("TROUBLESHOOTING.md", "TRUENAS.md", "PBS.md", "KUBERNETES.md"): with self.subTest(guide=name): self.assertEqual(doc_text(name), (ROOT / "frontend-modern/public/docs" / name).read_text(encoding="utf-8")) diff --git a/scripts/tests/test_production_rollout_docs.py b/scripts/tests/test_production_rollout_docs.py index c123597489..a2979363c2 100644 --- a/scripts/tests/test_production_rollout_docs.py +++ b/scripts/tests/test_production_rollout_docs.py @@ -225,6 +225,16 @@ class ProductionRolloutDocsTest(unittest.TestCase): self.assertIn("queue.ScheduleRetry(request.ID, 0)", queue) actions = (ROOT / "internal/api/actions.go").read_text() self.assertIn("h.ActionLifecycle().Execute(", actions) + # Recent delivery activity lives on Alerts -> Notifications, not History. + self.assertIn("**Recent delivery activity** in **Alerts → Notifications** (`/alerts/notifications`)", text) + self.assertIn("**Alerts → History** (`/alerts/history`)", text) + self.assertNotIn("Recent delivery activity** in Alert History", text) + destinations_tab = (ROOT / "frontend-modern/src/features/alerts/tabs/DestinationsTab.tsx").read_text() + self.assertIn("