Draft
Merge Web and API into unified deployment for simplified operations#56
Conversation
…rogram.cs Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
…ttings Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement solution to collapse web app and API services
Merge Web and API into unified deployment for simplified operations
Jan 27, 2026
robgrame
approved these changes
Jan 27, 2026
… client Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
…ient Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
… prefix Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
Co-authored-by: robgrame <12012136+robgrame@users.noreply.github.com>
…b-app-and-api Remove Azure Queue support completely while maintaining all other features: - Removed AzureQueueReportSink from .NET client - Removed QueueProcessorService from API - Removed Azure Queue configuration options - Removed Queue health monitoring endpoints - Removed Azure.Storage.Queues dependencies - Updated PowerShell client to remove Azure Queue references - Maintained sink validation functionality for PowerShell client - Maintained AzureFunction, WebApi, and FileShare sink support This merge simplifies the architecture by removing the intermediate queue layer.
…b project Complete the Azure Queue removal by updating the Web project's ClientSinkConfigController to match the API project changes. Remove EnableAzureQueue and AzureQueue sink options from MapToSinkOptions method.
Add complete local deployment guide (Italian): - DEPLOYMENT_GUIDE_LOCAL.md: 700+ lines comprehensive guide - Deploy-LocalServer.ps1: Automated deployment script - QUICKSTART_LOCAL.md: 15-minute quick start guide Features: - Step-by-step IIS, SQL Server, and .NET setup - Database configuration with automated scripts - IIS application pool and website creation - Client PowerShell configuration - Scheduled task creation for automated collection - Comprehensive troubleshooting section - Maintenance and backup procedures - Security hardening best practices Automation script includes: - Prerequisites validation and installation - Automated database setup - IIS configuration with HTTPS - Client deployment and scheduled task creation - Post-deployment verification
Add README_DEPLOYMENT.md as central documentation hub: - Links to all deployment guides (Quick Start, Complete Guide) - Deployment scenarios (Test, Production, Enterprise) - Pre-deployment checklist - Architecture diagram (ASCII art) - Quick commands reference - Monitoring and health check commands - Security checklist - Common issues troubleshooting table - Support resources
Add Test-Deployment.ps1 for post-deployment validation: - Automated verification of all deployment components - 50+ checks covering prerequisites, IIS, SQL, API, client - Color-coded pass/fail/warning output - Detailed and summary modes - Functional tests (API POST, database writes) - Security validation (HTTPS, SQL auth, permissions) - Logging verification - Overall health status with exit codes - Actionable recommendations for failures
Critical fix: Update all deployment documentation and scripts Changes: - Update DEPLOYMENT_GUIDE_LOCAL.md to reference SecureBootDashboard.Web - Update build command from SecureBootDashboard.Api to SecureBootDashboard.Web - Update web.config to reference SecureBootDashboard.Web.dll - Update migration instructions with better guidance - Update Deploy-LocalServer.ps1 script with correct project - Update Test-Deployment.ps1 to check for Web.dll - Update QUICKSTART_LOCAL.md with correct project reference - Update README_DEPLOYMENT.md with architecture clarification - Add important note explaining unified architecture Reason: The unified application is in SecureBootDashboard.Web, not Api. SecureBootDashboard.Web contains: - Razor Pages (Web UI) - API Controllers (REST endpoints) - SignalR Hubs (real-time) - Database layer (EF Core) - All services and business logic
Fix 10 compilation warnings (CS8602, CS8603, CS8601, SYSLIB0057) Null Reference Warnings (CS8602/CS8603/CS8601): - SecureBootReportsController: Use null-conditional operators for report.Device - EfCoreReportStore: Add null-coalescing for UefiCa2023Status - DeviceConfigurationController: Add null-conditional for Servicing property - ExportService: Add null-conditional for RangeUsed() calls - OfficeVersionsApiClient: Add explicit null checks for Data property Obsolete API Warnings (SYSLIB0057): - CertificateValidationService: Replace X509Certificate2 constructors with X509CertificateLoader.LoadCertificate() - QueueProcessorService: Replace with X509CertificateLoader methods (LoadCertificateFromFile and LoadPkcs12FromFile) Result: 0 warnings, clean build
Implement comprehensive event parsing based on Microsoft documentation Changes: - Expand SecureBootEventRecord with 15 structured fields: * UpdateType, BucketConfidenceLevel, BucketId, HResult * Device attributes (firmware, OEM, OS architecture) * UpdatesAvailable, ErrorCode, RebootRequired * AdditionalData dictionary for extensibility - Create SecureBootEventParser class: * Parse event 1808 (boot manager signed with CA 2023) * Extract UpdateType (0 or 0x5944 for High Confidence) * Extract BucketConfidenceLevel deployment status * Parse device attributes from all relevant events * Handle events 1032-1045, 1795-1808 * Use regex patterns for reliable text extraction * Parse XML EventData for additional fields - Integrate parser into EventLogReader: * Call parser for every event collected * Populate all structured fields in SecureBootEventRecord * Maintain backward compatibility (Message, RawXml) - Add comprehensive documentation: * SECURE_BOOT_EVENT_IDS.md with complete event reference * Document all event types, fields, and values * Explain correlation with deployment states * Include best practices for monitoring Benefits: - Enable definitive verification of CA 2023 boot manager signature - Provide detailed deployment progress tracking - Support advanced analytics and troubleshooting - Follow official Microsoft event documentation Reference: https://support.microsoft.com/en-us/topic/37e47cf8-608b-4a87-8175-bdead630eb69
- Add Get-SecureBootUpdateEvents to collect and summarize Secure Boot DB/DBX/KEK update events from Windows Event Logs, including Microsoft CA 2023 rollout status. - Improve logging in Send-LogAnalyticsData with detailed request/response info and error diagnostics. - Update Build-SecureBootReport to include event summaries and details in the report. - Expand script output to show event breakdowns, last update times, failure warnings, and CA 2023 certificate update status. - Bump script version to 1.8.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidates
SecureBootDashboard.WebandSecureBootDashboard.Apiinto single application to reduce deployment complexity and infrastructure costs in small-to-medium environments (1-1000 devices).Architecture
Before: Separate Web (7001) and API (5001) applications requiring independent deployment and configuration.
After: Unified application on port 7001 serving both UI and REST endpoints. Razor Pages call API controllers via localhost HTTP.
Implementation
Merged Components
appsettings.jsonProgram.cs
Unified startup (888 LOC) combines:
HTTP Client Configuration
Web pages access API via loopback:
Existing Razor Pages unchanged - continue using
ISecureBootApiClientabstraction.Endpoints
//api/Devices/api/SecureBootReports/swagger/dashboardHub/healthTrade-offs
Gains: Single deployment, 50% lower hosting costs, simplified config/logs/monitoring
Constraints: Shared resource pool (CPU/memory), cannot scale Web/API independently
Separate deployment remains available for >1000 devices or specialized scaling requirements.
Backward Compatibility
/api/*)Documentation
QUICKSTART_v1.14.md: Azure/IIS/Docker deploymentdocs/UNIFIED_DEPLOYMENT.md: Architecture, performance, migrationOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.