From d8875a62c62c270d593a5290576fbfab9342ce47 Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Wed, 2 Dec 2026 17:05:36 +0100 Subject: [PATCH] Make SSH Connect conditional on Production mode in FR-086 Gate the Integrations Topology View SSH Connect action on the active environment mode (FR-074): render it only in Production mode, since mock endpoints are not real SSH-reachable hosts. Update Gherkin scenarios, inventory table, and add the missing FR-086 row to the SDD Section 6.1 traceability matrix. Signed-off-by: Sergio Arroutbi --- SDD-Keylime-Monitoring-Tool.md | 3 ++- SRS-Keylime-Monitoring-Tool.md | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/SDD-Keylime-Monitoring-Tool.md b/SDD-Keylime-Monitoring-Tool.md index 3684ebe..a4a45a2 100644 --- a/SDD-Keylime-Monitoring-Tool.md +++ b/SDD-Keylime-Monitoring-Tool.md @@ -283,7 +283,7 @@ keylime-webtool-frontend/src/ +-- Alerts/ Alert dashboard (FR-047..FR-049) +-- Performance/ System metrics (FR-064..FR-068) +-- AuditLog/ Audit trail with hash verification (FR-042) - +-- Integrations/ Backend + core services status with 1s polling (FR-057, FR-077) + +-- Integrations/ Backend + core services status with 1s polling (FR-057, FR-077); Topology/List view toggle with SSH Connect gated by RBAC role and Production mode (FR-086) +-- Settings/ Connection URLs, mTLS certs, mock/prod toggle (FR-072..FR-074) +-- Login/ Authentication entry point (SR-001) ``` @@ -1626,6 +1626,7 @@ Maximum 5 parallel concurrent log fetches to the Verifier API, enforced via Toki | FR-083 | 3.4.3 | Raw Data tab: compact copy icon button to the right of source selector group; Clipboard API with 2s checkmark feedback | | FR-084 | 3.2.2 | `KpiCard.tsx`: optional `linkTo` prop wraps card in React Router ``; Dashboard page maps each KPI to its target route (e.g., Failed Agents → `/agents?state=failed,invalid_quote,tenant_failed`) | | FR-085 | 3.2.2 | `Alerts.tsx`: three Recharts donut `PieChart` components below alert table — By Severity, By Type, By State; clickable segments navigate to `/alerts?{dimension}={value}` with filter pre-applied; color maps match Dashboard alert chart (FR-047) | +| FR-086 | 3.2.2 | `Integrations.tsx`: Topology/List view toggle with localStorage persistence, node health icons reusing FR-081 query cache; SSH Connect action (`ssh://` URI) rendered only for Operator/Admin (SR-003) AND when active environment mode is Production (FR-074) | | FR-087 | 3.5.4, 3.8.1 | Background `tokio::spawn` observation task, `record_agent_observations()` reuse, dedup tracker, configurable interval | | FR-088 | 3.1.3, 3.2.4 | Cockpit plugin manifest.json, sidebar registration, Cockpit context view | | FR-089 | 3.1.3, 3.4.6 | cockpit.http() REST proxy through cockpit-bridge | diff --git a/SRS-Keylime-Monitoring-Tool.md b/SRS-Keylime-Monitoring-Tool.md index cfaeb41..91196d3 100644 --- a/SRS-Keylime-Monitoring-Tool.md +++ b/SRS-Keylime-Monitoring-Tool.md @@ -119,7 +119,7 @@ The System transforms Keylime from a CLI-driven security tool into a visual oper | FR-083 | Copy-to-clipboard button in Raw Data source selector toolbar | MUST | Agent Detail - Raw Data | | FR-084 | Fleet Overview KPI card drill-down navigation | SHOULD | Dashboard - Key Performance Indicators | | FR-085 | Alert Center distribution pie charts (by severity, type, state) | MUST | Revocation - Alert Workflow | -| FR-086 | Integrations topology view with SSH connect | SHOULD | Integration Status - Backend Connectivity | +| FR-086 | Integrations topology view with SSH connect (Production mode only) | SHOULD | Integration Status - Backend Connectivity | | FR-087 | Background attestation observation recording independent of frontend | MUST | Attestation Analytics - Overview Dashboard | | FR-088 | Cockpit plugin manifest and sidebar registration | MUST | Cockpit Plugin - Deployment Model | | FR-089 | REST communication via cockpit.http() bridge proxy | MUST | Cockpit Plugin - Communication | @@ -2736,9 +2736,11 @@ Feature: Alert Center Distribution Pie Charts ### FR-086: Integrations Topology View with SSH Connect -**Description:** The System SHOULD provide a Graphic Mode (Topology View) on the Integrations page as the default layout. The user MUST be able to toggle between "List View" and "Topology View" via a button on the Integrations page. In Topology View, each monitored service node (Registrar, Verifier, Webtool Backend) MUST be rendered as a visual icon representing its role. Node color MUST reflect health status: green for UP, red for DOWN, and yellow for HIGH LOAD — consistent with the health indicators defined in FR-057. The topology view MUST reuse the same health-check query cache (TanStack Query) as the list view and FR-081, without issuing additional network requests. Each node MUST display its configured endpoint address. In Topology View, each node MUST offer an "SSH Connect" action that initiates an SSH session to the node's configured endpoint address (e.g., via `ssh://` URI scheme). The SSH Connect action MUST be available only to users with the Operator or Admin role (SR-003); for users with the Viewer role, the SSH action MUST NOT be rendered. The user's selected view mode (List or Topology) SHOULD persist across sessions via localStorage. All icons and visual assets MUST be self-contained (no external CDN or runtime internet access). + -**Trace:** Integration Status - Backend Connectivity; FR-057, FR-077, FR-081, SR-003 +**Description:** The System SHOULD provide a Graphic Mode (Topology View) on the Integrations page as the default layout. The user MUST be able to toggle between "List View" and "Topology View" via a button on the Integrations page. In Topology View, each monitored service node (Registrar, Verifier, Webtool Backend) MUST be rendered as a visual icon representing its role. Node color MUST reflect health status: green for UP, red for DOWN, and yellow for HIGH LOAD — consistent with the health indicators defined in FR-057. The topology view MUST reuse the same health-check query cache (TanStack Query) as the list view and FR-081, without issuing additional network requests. Each node MUST display its configured endpoint address. In Topology View, each node MUST offer an "SSH Connect" action that initiates an SSH session to the node's configured endpoint address (e.g., via `ssh://` URI scheme). The SSH Connect action MUST be rendered only when the active environment mode detected per FR-074 is "Production"; when the active environment mode is "Mock", the SSH Connect action MUST NOT be rendered on any node, because mock endpoints do not represent real SSH-reachable hosts. The SSH Connect action MUST be available only to users with the Operator or Admin role (SR-003); for users with the Viewer role, the SSH action MUST NOT be rendered. The user's selected view mode (List or Topology) SHOULD persist across sessions via localStorage. All icons and visual assets MUST be self-contained (no external CDN or runtime internet access). + +**Trace:** Integration Status - Backend Connectivity; FR-057, FR-074, FR-077, FR-081, SR-003 ```gherkin Feature: Integrations Topology View @@ -2775,18 +2777,27 @@ Feature: Integrations Topology View Scenario: SSH Connect available for Operator role Given the user has the Operator role + And the active environment mode is "Production" And the user is viewing the Topology View When the user clicks the "SSH Connect" action on the Verifier node Then the System MUST initiate an SSH session to the Verifier's configured endpoint address Scenario: SSH Connect available for Admin role Given the user has the Admin role + And the active environment mode is "Production" And the user is viewing the Topology View When the user clicks the "SSH Connect" action on the Registrar node Then the System MUST initiate an SSH session to the Registrar's configured endpoint address + Scenario: SSH Connect not rendered in Mock mode + Given the active environment mode is "Mock" + And the user has the Admin role + When the user is viewing the Topology View + Then the "SSH Connect" action MUST NOT be rendered on any node + Scenario: SSH Connect not rendered for Viewer role Given the user has the Viewer role + And the active environment mode is "Production" When the user is viewing the Topology View Then the "SSH Connect" action MUST NOT be rendered on any node