SurePassID Compliance Manager Architecture Overview

SurePassID Authentication Server

Architecture Overview

Last Updated: June 2025

This document describes the architecture of the SurePassID Compliance Monitoring and Reporting system.

Project Structure

Solution Overview

Project Type Target Description
Core Libraries
SurePassID.Compliance.Events.Abstractions Library .NET 8 Event interfaces and models
SurePassID.Compliance.Events.FileIngest Library .NET 8 JSON/CSV file event source
SurePassID.Compliance.Events.Syslog Library .NET 8 Syslog event source
SurePassID.Compliance.Events.RestApi Library .NET 8 SurePassID REST API event source with server-side date filtering, sync status control, and JSON bulk format negotiation
SurePassID.Compliance.Events.WindowsEventLog Library .NET 8 (Windows) Windows Security event log source
SurePassID.Compliance.Events.EntraId Library .NET 8 Entra ID (Azure AD) event source
SurePassID.Compliance.Identity.Abstractions Library .NET 8 Identity provider interfaces
SurePassID.Compliance.Identity.ActiveDirectory Library .NET 8 Active Directory provider
SurePassID.Compliance.Identity.SurePassId Library .NET 8 SurePassID MFA provider
SurePassID.Compliance.Correlation Library .NET 8 Event-identity correlation engine and MFA coverage analysis
SurePassID.Compliance.Reporting Library .NET 8 Report generation and export
SurePassID.Compliance.Runner Library .NET 8 Main orchestration layer
SurePassID.Compliance.Monitoring Library .NET 8 Real-time monitoring and alerts
SurePassID.Compliance.SurePassID.Client Library .NET 8 SurePassID API client wrapper
Applications
SurePassID.Compliance.Runner.Service Worker Service .NET 8 Background service (Windows/systemd)
SurePassID.Compliance.Cli Console App .NET 8 Command-line interface with setup wizard
SurePassID.Compliance.Agent.Tools Library .NET 8 AI agent tool definitions (MCP)
SurePassID.Compliance.McpServer Console App .NET 8 (Windows) Pre-built MCP server for GitHub Copilot, Claude Desktop, and Cursor
TestApp Console App .NET 8 Demo/testing application
Scripts
Setup-ComplianceService.ps1 PowerShell N/A Interactive Windows Service setup
Dependencies
SurePassClientLibRest Library .NET Standard 2.0 SurePassID REST API client (submodule)
Tests
SurePassID.Compliance.Tests Test Project .NET 8 Unit and integration tests (225 tests)

System Architecture

+-----------------------------------------------------------------------------+
|                             Deployment Options                              |
+------------------+------------------+------------------+--------------------+
|  CLI Tool        |  Windows Service |  systemd Daemon  |  AI Agent Tools    |
|  (compliance-cli)|  (.exe)          |  (Linux)         |  (MCP Protocol)    |
+------------------+------------------+------------------+--------------------+
         |                 |                  |                    |
         +-----------------+---------+--------+--------------------+
                                     |
                                     v
                    +--------------------------------+
                    |  SurePassID.Compliance.Runner  |
                    |  (Orchestration Layer)         |
                    +--------------------------------+
                                     |
         +---------------------------+---------------------------+
         |                           |                           |
         v                           v                           v
+--------------------+  +--------------------------+  +----------------------+
|   Event Sources    |  |    Identity Providers    |  |       Reporting      |
|                    |  |                          |  |                      |
|  - JsonFile        |  |  - Active Directory      |  |  - JSON Export       |
|  - Syslog          |  |  - SurePassID            |  |  - CSV Export        |
|  - WindowsEventLog |  |                          |  |  - PDF Export        |
|  - REST API        |  |  Abstraction Layer:      |  |  - Evidence Packs    |
|  - EntraId         |  |  IIdentityProvider       |  |                      |
|                    |  +--------------------------+  +----------------------+
|  Abstraction:      |               |
|  IAuthEventSource  |               |
+--------------------+               |
           |                         |
           +------------+------------+
                        |
                        v
           +---------------------------+
           |  Correlation Engine       |
           |  (Event -> Identity)      |
           +---------------------------+
                        |
                        v
           +---------------------------+
           |  Privilege Drift          |
           |  Analyzer                 |
           |  (SurePassID Client)      |
           +---------------------------+

Core Components

1. Event Sources (SurePassID.Compliance.Events.)

Event sources implement IAuthEventSource and provide authentication events from various systems:

Source Implementation Use Case
JSON File JsonFileEventSource SIEM exports (Splunk, Sentinel)
Syslog SyslogEventSource Linux auth logs, network devices
Windows Event Log WindowsEventLogSource Windows Security log (4624, 4625)
SurePassID REST API RestApiEventSource Real-time MFA events
Entra ID EntraIdGraphEventSource, EntraIdJsonEventSource Azure AD sign-in logs

2. Identity Providers (SurePassID.Compliance.Identity.)

Identity providers implement IIdentityProvider and resolve users to privilege status:

Provider Implementation Use Case
Active Directory ActiveDirectoryIdentityProvider On-premises AD group membership
SurePassID SurePassIdIdentityProvider MFA enrollment as privilege indicator

3. Correlation Engine (SurePassID.Compliance.Correlation)

Correlates authentication events with identity/privilege data:

  • Match by UPN (user@domain.com)
  • Match by sAMAccountName
  • Match by SSO Identity
  • Case-insensitive, domain-prefix handling

4. Compliance Runner (SurePassID.Compliance.Runner)

Orchestrates the compliance check workflow:

  1. Fetch events from configured sources (parallel when multiple enabled)
  2. Get privilege snapshot from identity provider
  3. Correlate events with identities
  4. MFA coverage analysis (match Windows SFA logons to SurePassID MFA events)
  5. Generate requested reports
  6. Build evidence pack (optional)

5. Reporting (SurePassID.Compliance.Reporting)

Generates compliance reports:

Report Type Description
PrivilegedAuthReport Per-user MFA/SFA breakdown
SfaMfaSummary Overall MFA adoption statistics
PrivilegeDriftSummary Users with MFA configuration issues

Export formats: JSON, CSV, PDF, HTML

6. Monitoring (SurePassID.Compliance.Monitoring)

Real-time event streaming with alerts:

  • Alert on privileged user SFA
  • Alert on brute force detection
  • Webhook and email notifications
  • Prometheus-compatible metrics

7. CLI Tool (SurePassID.Compliance.Cli)

Command-line interface with:

Command Description
configure Interactive setup wizard (no JSON editing required)
configure --quick Quick setup with required fields only
run Execute compliance check
run --evidence-pack Generate audit-ready evidence bundle

8. Agent Tools (SurePassID.Compliance.Agent.Tools)

MCP-compatible tool definitions for AI agent integration:

Tool Description
run_compliance_check Execute a compliance check
get_compliance_status Get current monitoring status
list_privileged_users List users in privileged groups
get_sfa_violations Get recent SFA violations
get_privilege_drift Analyze privilege drift
get_user_auth_history Get auth history for a user

Configuration

Configuration Methods

Method Best For Skill Level
CLI Wizard (compliance-cli configure) First-time setup Beginner
PowerShell Script (Setup-ComplianceService.ps1) Windows Service deployment Beginner
Template File (appsettings.template.jsonc) Guided manual editing Intermediate
Environment Variables Docker, CI/CD, secrets Intermediate
JSON Config (appsettings.json) Full control Advanced

Configuration Flow

+-------------------+   +-------------------+   +-------------------+
|   CLI Wizard      |   |   PowerShell      |   |    Template       |
|   configure       |   |   Setup Script    |   |     File          |
+-------------------+   +-------------------+   +-------------------+
          |                       |                       |
          +-----------------------+-----------------------+
                                  |
                                  v
                     +--------------------------+
                     |    appsettings.json      |
                     +--------------------------+
                                  |
                                  v
                     +--------------------------+
                     |  Environment Variables   |
                     |  (override config)       |
                     +--------------------------+
                                  |
                                  v
                     +--------------------------+
                     |   Application Starts     |
                     +--------------------------+

Event Source Configuration

The system supports multiple simultaneous event sources via the EventSources section. When multiple sources are enabled, events are fetched in parallel and merged using AggregateEventSource.

{
  "EventSources": {
    "SurePassID": { "Enabled": true },
    "WindowsEventLog": { "Enabled": true },
    "JsonFile": { "Enabled": false, "DirectoryPath": "./Events", "FilePattern": "*.json" },
    "Syslog": { "Enabled": false }
  },
  "SurePassID": {
    "Endpoint": "https://mfa.company.com/api/mfa/v1",
    "ApiKeyId": "api-account",
    "ApiKey": "your-api-key",
    "UseHttpHeader": true,
    "MaxEventsPerRequest": 1000,
    "IgnoreSyncStatus": true,
    "PreferJsonBulkFormat": true
  },
  "WindowsEventLog": {
    "LogName": "Security",
    "ComputerNames": [],
    "IncludeSuccessfulLogons": true,
    "IncludeFailedLogons": true,
    "ExcludeMachineAccounts": true,
    "ExcludeSystemAccounts": true,
    "MaxEventsPerQuery": 10000
  }
}

Legacy support: The single-source EventSource:Type configuration is still supported for backward compatibility. When both sections exist, EventSources takes priority.

Identity Provider Configuration

{
  "ActiveDirectory": {
    "Server": "dc01.contoso.com",
    "BaseDn": "DC=contoso,DC=com",
    "UseIntegratedAuth": true,
    "UseSsl": false
  }
}

Data Flow

Compliance Check Flow

1. ComplianceRunRequest
   +-- Time range (start, end)
   +-- Privileged groups
   +-- Event source config
   \-- Report types

2. Event Ingestion
   \-- IAuthEventSource.FetchAsync(query)
       \-- Returns: List<AuthEvent>

3. Privilege Snapshot
   \-- IIdentityProvider.GetPrivilegeSnapshotAsync(query)
       \-- Returns: List<PrivilegeSnapshot>

4. Correlation
   \-- ICorrelationEngine.CorrelateAsync(events, snapshots)
       \-- Returns: List<CorrelatedAuthEvent>

4.5. MFA Coverage Analysis (optional)
   \-- IMfaCoverageCorrelator.AnalyzeMfaCoverageAsync(correlated, allEvents)
       +-- Match Windows SFA logons to SurePassID MFA events
       +-- Normalize usernames (DOMAIN\user, UPN -> login name)
       +-- Optional FindUser enrichment via REST API
       +-- Optional same-IP matching
       \-- Tags: MfaVerified, NoMfaCoverage, IntrinsicMfa

5. Report Generation
   \-- For each requested report type:
       +-- Filter correlated events
       +-- Calculate statistics
       \-- Generate report model

6. Evidence Pack (optional)
   \-- EvidencePackBuilder.BuildPackAsync(reports, options)
       +-- Write JSON reports
       +-- Generate manifest
       +-- Calculate SHA-256 hashes
       \-- Create ZIP archive

7. ComplianceRunResult
   +-- Success/failure status
   +-- Summary statistics
   +-- Report objects
   \-- Evidence pack path

Extension Points

Adding a New Event Source

  1. Create a new project SurePassID.Compliance.Events.{Name}
  2. Implement IAuthEventSource
  3. Add DI extension method AddXxxEventSource()
  4. Add enum value to EventSourceType

Adding a New Identity Provider

  1. Create a new project SurePassID.Compliance.Identity.{Name}
  2. Implement IIdentityProvider
  3. Add DI extension method AddXxxIdentityProvider()

Adding a New Report Type

  1. Add enum value to ReportType
  2. Create report model in Reporting.Models
  3. Add generation logic to ComplianceRunner

Dependencies

SurePassID.Compliance.Runner
+-- Events.Abstractions
+-- Identity.Abstractions
+-- Correlation
\-- Reporting

Runner.Service
+-- Runner
+-- Events.FileIngest
+-- Events.Syslog
+-- Events.RestApi
+-- Events.WindowsEventLog
\-- Identity.ActiveDirectory

Cli (with ConfigureCommand)
+-- Runner
+-- Events.FileIngest
+-- Events.RestApi
+-- Events.WindowsEventLog
\-- Identity.ActiveDirectory

Agent.Tools
+-- Runner
+-- Identity.Abstractions
+-- Events.Abstractions
\-- Reporting

McpServer
+-- Agent.Tools
+-- Runner
+-- Events.FileIngest
+-- Events.RestApi
+-- Events.WindowsEventLog
+-- Events.Syslog
+-- Events.EntraId
+-- Identity.ActiveDirectory
+-- Identity.SurePassId
\-- Correlation (MfaCoverageCorrelator)

Threading Model

  • Event fetching: Async I/O
  • Correlation: Single-threaded (CPU-bound, fast)
  • Report generation: Single-threaded
  • Evidence pack: Async file I/O
  • Service: BackgroundService with cron-based scheduling
  • CLI Configure: Interactive console I/O

Security Considerations

  1. API Credentials: Store in user secrets, environment variables, or Azure Key Vault
  2. AD Credentials: Use integrated authentication when possible
  3. Evidence Packs: Include SHA-256 hashes for integrity verification
  4. Logging: Avoid logging sensitive data (passwords, API keys)
  5. CLI Wizard: Masks password/secret input with asterisks

SurePassID REST API Sync Behavior

The REST API event source uses SyncEventLogAsync() with three key parameters that control server-side behavior:

Server-Side Date Filtering

The startDateUtc and endDateUtc parameters are sent to the MFA server, which filters events before returning them. This reduces bandwidth compared to fetching all events and filtering client-side.

Sync Status Control (IgnoreSyncStatus)

Mode IgnoreSyncStatus Behavior Best For
Compliance true Re-reads all events in the time range regardless of whether they were previously synced On-demand reports, audit evidence
Monitoring false Only returns events not yet marked as synced by the server Continuous polling (avoids duplicate processing)

Format Negotiation (PreferJsonBulkFormat)

The client requests JSON bulk format (format=json) which returns a structured records array with additional fields not available in the legacy piped format:

Field JSON Format Legacy Piped Format
Tenant Yes No
AuthMethod Yes No
SsoIdentity Yes No
UserEmail Yes No

Automatic fallback: If the server does not support JSON format (older MFA server versions), it returns the SyncEventLogFormatNotSupported error code. The client:

  1. Parses the piped data into records (data is not lost)
  2. Caches that the server does not support JSON
  3. Omits the format parameter on subsequent calls
  4. Logs a warning recommending a server upgrade
SurePassID 360 Central Avenue #800 St. Petersburg, FL 33701 USA +1 (888) 200-8144 surepassid.com