Skip to content

Commit 5a55ed1

Browse files
sarroutbiclaude
andauthored
Add Registrar reachability, latency, ... (FR-095) (#14)
Mirror FR-064 (Verifier metrics) for the Keylime Registrar: probe-based reachability, API latency, registered agent count, and registration throughput. Acknowledge NFR-017 circuit breaker is Verifier-only. Update SDD traceability matrix, API route tree, and frontend routing. Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 975a187 commit 5a55ed1

2 files changed

Lines changed: 55 additions & 1 deletion

File tree

SDD-Keylime-Monitoring-Tool.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,7 @@ All list endpoints use a standard pagination wrapper inside `data`:
931931
| +-- GET /siem SIEM status (FR-063)
932932
+-- /performance
933933
| +-- GET /verifiers Verifier metrics (FR-064)
934+
| +-- GET /registrar Registrar metrics (FR-095)
934935
| +-- GET /database DB pool metrics (FR-065)
935936
| +-- GET /api-response-times API latency (FR-066)
936937
| +-- GET /config Live config + drift (FR-067)
@@ -972,7 +973,7 @@ All list endpoints use a standard pagination wrapper inside `data`:
972973
| `/policies` | Policies | FR-033 |
973974
| `/certificates` | Certificates | FR-050 |
974975
| `/alerts` | Alerts | FR-047 |
975-
| `/performance` | Performance | FR-064 |
976+
| `/performance` | Performance | FR-064, FR-095 |
976977
| `/audit` | AuditLog | FR-042 |
977978
| `/integrations` | Integrations | FR-057 |
978979
| `/settings` | Settings | FR-002, FR-006, FR-008 |
@@ -1606,6 +1607,7 @@ Maximum 5 parallel concurrent log fetches to the Verifier API, enforced via Toki
16061607
| FR-092 | 3.5.3, 5.1 | PAM authentication flow, system user/group → RBAC role mapping |
16071608
| FR-093 | 3.2.4 | RPM packaging, /usr/share/cockpit/keylime/ installation path |
16081609
| FR-094 | 3.2.4 | manifest.json conditions (path-exists) for conditional plugin visibility |
1610+
| FR-095 | 3.4.3 | `GET /api/performance/registrar` — reachability, latency, agent count, registration throughput |
16091611

16101612
### 6.2 Non-Functional Requirements
16111613

SRS-Keylime-Monitoring-Tool.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ The System transforms Keylime from a CLI-driven security tool into a visual oper
128128
| FR-092 | PAM-based authentication for Cockpit deployments | MUST | Cockpit Plugin - Authentication |
129129
| FR-093 | RPM packaging and /usr/share/cockpit/ installation | MUST | Cockpit Plugin - Packaging |
130130
| FR-094 | Conditional plugin visibility via manifest conditions | SHOULD | Cockpit Plugin - Deployment Model |
131+
| FR-095 | Registrar reachability, latency, and registration monitoring | MUST | System Performance - Registrar Metrics |
131132

132133
### 2.2 Non-Functional Requirements
133134

@@ -3060,6 +3061,57 @@ Feature: Conditional Plugin Visibility via Manifest Conditions
30603061
Then the plugin MUST NOT appear in the Cockpit sidebar
30613062
```
30623063

3064+
### FR-095: Registrar Reachability, Latency, and Registration Monitoring
3065+
3066+
**Description:** The System MUST monitor Keylime Registrar health using metrics derivable from the Keylime Registrar REST API and the dashboard backend's own instrumentation. Monitored metrics MUST include: registrar reachability (boolean probe result), API round-trip latency in milliseconds from a lightweight probe request, registered agent count (from `GET /v2/agents/` on the Registrar), and registration throughput (derived by computing registered-agent-count deltas across successive polling intervals). Unlike verifier monitoring (FR-064), the Registrar has no circuit breaker requirement — NFR-017 applies exclusively to Verifier API calls. Core service health probes MUST bypass any future connection-management layer to reflect real connectivity status, consistent with the FR-057 precedent for core service health checks. Registrar metrics MUST be included in the unified performance summary endpoint alongside verifier metrics (FR-064) so the frontend can fetch both Verifier and Registrar health in a single API call.
3067+
3068+
**Trace:** System Performance - Registrar Metrics; FR-057 (Backend Connectivity); FR-064 (Verifier Metrics)
3069+
3070+
```gherkin
3071+
Feature: Registrar Reachability, Latency, and Registration Monitoring
3072+
3073+
Scenario: Display registrar reachability and latency
3074+
Given the deployment has one registrar at 10.0.0.2:8891
3075+
When the user navigates to System Performance
3076+
Then the registrar MUST display a reachability indicator (green "UP" or red "DOWN")
3077+
And the registrar MUST display its API round-trip latency in milliseconds
3078+
And no circuit breaker state MUST be displayed for the registrar (NFR-017 is Verifier-only)
3079+
3080+
Scenario: Alert on registrar unreachable
3081+
Given the registrar at 10.0.0.2:8891 is unreachable
3082+
When the System probe fails to connect to the registrar
3083+
Then the registrar MUST display a red "DOWN" indicator
3084+
And a CRITICAL alert MUST be raised indicating "Registrar unreachable"
3085+
3086+
Scenario: Display registered agent count
3087+
Given the registrar is reachable
3088+
When the System queries GET /v2/agents/ on the registrar
3089+
Then the registered agent count MUST be displayed in the System Performance view
3090+
And the count MUST reflect the total number of agents currently registered with the registrar
3091+
3092+
Scenario: Display registration throughput
3093+
Given the System has queried the registrar agent count at two successive polling intervals
3094+
When the user views the System Performance summary
3095+
Then the registration throughput (registrations per interval) MUST be displayed as the delta between successive agent counts
3096+
And a negative delta MUST be displayed when agents are deregistered between intervals
3097+
3098+
Scenario: Registrar metrics included in unified performance endpoint
3099+
Given the unified performance summary endpoint is called
3100+
When the response is returned
3101+
Then the response MUST include both verifier metrics (FR-064) and registrar metrics
3102+
And registrar metrics MUST include reachability, latency, agent count, and registration throughput
3103+
And the frontend MUST be able to render both metric sets from a single API call
3104+
3105+
Scenario: Registrar probe bypasses connection management
3106+
Given a hypothetical connection management layer is configured for the registrar
3107+
And the registrar service is reachable
3108+
When the System performs a registrar health probe
3109+
Then the probe MUST connect directly to the registrar endpoint
3110+
And the probe result MUST reflect actual registrar connectivity
3111+
```
3112+
3113+
**Implementation Notes:** The Keylime Registrar REST API exposes agent registration data via `GET /v2/agents/` and individual agent details via `GET /v2/agents/{agent_id}`. Registration throughput is a derived metric computed by the dashboard backend by comparing the registered agent count across successive polling intervals — it is not read directly from a Registrar endpoint. The Registrar API does not expose registration error rates or internal queue depths; monitoring those metrics would require an external observability stack and is outside the scope of this requirement. Unlike the Verifier (which has a circuit breaker per NFR-017), the Registrar has no circuit breaker requirement in this specification — probes are always direct.
3114+
30633115
---
30643116

30653117
## 4. Non-Functional Requirements Detail

0 commit comments

Comments
 (0)