Files
git.stella-ops.org/docs2/ui/runs.md
master dac8e10e36 feat(crypto): Complete Phase 2 - Configuration-driven crypto architecture with 100% compliance
## Summary

This commit completes Phase 2 of the configuration-driven crypto architecture, achieving
100% crypto compliance by eliminating all hardcoded cryptographic implementations.

## Key Changes

### Phase 1: Plugin Loader Infrastructure
- **Plugin Discovery System**: Created StellaOps.Cryptography.PluginLoader with manifest-based loading
- **Configuration Model**: Added CryptoPluginConfiguration with regional profiles support
- **Dependency Injection**: Extended DI to support plugin-based crypto provider registration
- **Regional Configs**: Created appsettings.crypto.{international,russia,eu,china}.yaml
- **CI Workflow**: Added .gitea/workflows/crypto-compliance.yml for audit enforcement

### Phase 2: Code Refactoring
- **API Extension**: Added ICryptoProvider.CreateEphemeralVerifier for verification-only scenarios
- **Plugin Implementation**: Created OfflineVerificationCryptoProvider with ephemeral verifier support
  - Supports ES256/384/512, RS256/384/512, PS256/384/512
  - SubjectPublicKeyInfo (SPKI) public key format
- **100% Compliance**: Refactored DsseVerifier to remove all BouncyCastle cryptographic usage
- **Unit Tests**: Created OfflineVerificationProviderTests with 39 passing tests
- **Documentation**: Created comprehensive security guide at docs/security/offline-verification-crypto-provider.md
- **Audit Infrastructure**: Created scripts/audit-crypto-usage.ps1 for static analysis

### Testing Infrastructure (TestKit)
- **Determinism Gate**: Created DeterminismGate for reproducibility validation
- **Test Fixtures**: Added PostgresFixture and ValkeyFixture using Testcontainers
- **Traits System**: Implemented test lane attributes for parallel CI execution
- **JSON Assertions**: Added CanonicalJsonAssert for deterministic JSON comparisons
- **Test Lanes**: Created test-lanes.yml workflow for parallel test execution

### Documentation
- **Architecture**: Created CRYPTO_CONFIGURATION_DRIVEN_ARCHITECTURE.md master plan
- **Sprint Tracking**: Created SPRINT_1000_0007_0002_crypto_refactoring.md (COMPLETE)
- **API Documentation**: Updated docs2/cli/crypto-plugins.md and crypto.md
- **Testing Strategy**: Created testing strategy documents in docs/implplan/SPRINT_5100_0007_*

## Compliance & Testing

-  Zero direct System.Security.Cryptography usage in production code
-  All crypto operations go through ICryptoProvider abstraction
-  39/39 unit tests passing for OfflineVerificationCryptoProvider
-  Build successful (AirGap, Crypto plugin, DI infrastructure)
-  Audit script validates crypto boundaries

## Files Modified

**Core Crypto Infrastructure:**
- src/__Libraries/StellaOps.Cryptography/CryptoProvider.cs (API extension)
- src/__Libraries/StellaOps.Cryptography/CryptoSigningKey.cs (verification-only constructor)
- src/__Libraries/StellaOps.Cryptography/EcdsaSigner.cs (fixed ephemeral verifier)

**Plugin Implementation:**
- src/__Libraries/StellaOps.Cryptography.Plugin.OfflineVerification/ (new)
- src/__Libraries/StellaOps.Cryptography.PluginLoader/ (new)

**Production Code Refactoring:**
- src/AirGap/StellaOps.AirGap.Importer/Validation/DsseVerifier.cs (100% compliant)

**Tests:**
- src/__Libraries/__Tests/StellaOps.Cryptography.Plugin.OfflineVerification.Tests/ (new, 39 tests)
- src/__Libraries/__Tests/StellaOps.Cryptography.PluginLoader.Tests/ (new)

**Configuration:**
- etc/crypto-plugins-manifest.json (plugin registry)
- etc/appsettings.crypto.*.yaml (regional profiles)

**Documentation:**
- docs/security/offline-verification-crypto-provider.md (600+ lines)
- docs/implplan/CRYPTO_CONFIGURATION_DRIVEN_ARCHITECTURE.md (master plan)
- docs/implplan/SPRINT_1000_0007_0002_crypto_refactoring.md (Phase 2 complete)

## Next Steps

Phase 3: Docker & CI/CD Integration
- Create multi-stage Dockerfiles with all plugins
- Build regional Docker Compose files
- Implement runtime configuration selection
- Add deployment validation scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 18:20:00 +02:00

3.0 KiB

Runs workspace

Purpose

  • Monitor Scheduler runs, progress, deltas, and evidence bundles in real time.

Access and dependencies

  • Route: /console/runs with /console/runs/:runId detail drawer.
  • Scopes: runs.read; runs.manage for cancel or retry; policy:runs; downloads.read.
  • Depends on Scheduler WebService, Policy Engine run summaries, Scanner evidence endpoints.
  • Feature flags: runs.dashboard.enabled, runs.sse.enabled, runs.retry.enabled, runs.evidenceBundles.

Layout

  • Header with tenant badge, schedule selector, backlog metrics.
  • Cards for active runs, queue depth, new findings, KEV deltas.
  • Tabs: active, completed, scheduled, failures.
  • Runs table with detail drawer for summary, segments, deltas, evidence, logs.

Runs table

  • Run ID: deterministic run:::.
  • Trigger: cron, manual, concelier, excititor, policy, content-refresh.
  • State: planning, queued, running, completed, cancelled, error with ERR_RUN codes.
  • Progress: processed vs total, updated via SSE.
  • Duration: elapsed or total duration.
  • Deltas: severity deltas and KEV changes.
  • Filters: trigger, state, schedule, severity impact, policy revision, timeframe, shard, error code.

Detail drawer

  • Summary: tenant, trigger, schedule, shard count, timestamps, correlation ID.
  • Progress: segmented bar (planner, queue, execution, post-processing).
  • Segments: retry failed segments with runs.manage.
  • Deltas: links back to Findings filtered by run ID.
  • Evidence: policy run summary, findings delta CSV, scanner bundle, DSSE links.
  • Logs: latest structured logs with correlation IDs and log pivot copy.

Queue and schedule management

  • Side panel lists upcoming schedules with cron, timezone, enable toggles.
  • Preview impact estimates candidate counts before launch.
  • Manual run form supports analysis-only and content-refresh modes.
  • Pause and resume schedules with confirmation.

Live updates

  • SSE endpoint /console/runs/{id}/stream with stateChanged, segmentProgress, deltaSummary, log.
  • UI reconnects with exponential backoff and heartbeat.
  • Offline mode disables SSE and uses polling.

Retry and remediation

  • Segment-level retry with cooldown timers.
  • Full retry creates a new run ID with retryOf reference.
  • Escalation template includes run context and correlation IDs.
  • CLI parity: stella runs retry --run , stella runs cancel --run .

Evidence downloads

  • Evidence tab aggregates run evidence bundles and manifest hashes.
  • Bundle for offline packages all evidence into a single tarball.
  • Completed bundles appear in the Downloads workspace.

Observability

  • Metrics: scheduler_queue_depth, scheduler_runs_active, scheduler_runs_error_total, scheduler_runs_duration_seconds.
  • Trend charts for queue depth, runs per trigger, determinism score.
  • Alerts for planner lag, queue saturation, repeated error codes.

Offline behavior

  • Snapshot banner shows staleness and disables SSE.
  • Manual run form produces CLI scripts for offline execution.
  • Evidence downloads default to local paths for transfer.
  • Tenants missing in the snapshot are hidden.