Muonroi.Governance.Enterprise 1.0.0-alpha.16

This is a prerelease version of Muonroi.Governance.Enterprise.
dotnet add package Muonroi.Governance.Enterprise --version 1.0.0-alpha.16
                    
NuGet\Install-Package Muonroi.Governance.Enterprise -Version 1.0.0-alpha.16
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Muonroi.Governance.Enterprise" Version="1.0.0-alpha.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Muonroi.Governance.Enterprise" Version="1.0.0-alpha.16" />
                    
Directory.Packages.props
<PackageReference Include="Muonroi.Governance.Enterprise" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Muonroi.Governance.Enterprise --version 1.0.0-alpha.16
                    
#r "nuget: Muonroi.Governance.Enterprise, 1.0.0-alpha.16"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Muonroi.Governance.Enterprise@1.0.0-alpha.16
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Muonroi.Governance.Enterprise&version=1.0.0-alpha.16&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Muonroi.Governance.Enterprise&version=1.0.0-alpha.16&prerelease
                    
Install as a Cake Tool

Muonroi.Governance.Enterprise

Enterprise-grade license enforcement, anti-tamper detection, audit-chain signing, compliance export, and control-plane management for the Muonroi platform.

NuGet License: Commercial

This package upgrades the OSS governance pipeline (Muonroi.Governance) to a production-hardened implementation. It replaces the default no-op services with:

  • Hardware-bound machine fingerprinting (FingerprintProvider) and HMAC chain signing (HmacFingerprintSigner)
  • Anti-tamper detection including hardware breakpoint scanning (AntiTamperDetector) and code-integrity verification (CodeIntegrityVerifier)
  • Fail-closed policy enforcement with RSA-verified policy bundles (PolicyEnforcer, EnterpriseLicenseGuardEnhancer)
  • Server-side audit-chain submission with durable retry (ChainSubmitter, ChainSubmissionHostedService, FileFailedChainSubmissionStore)
  • Compliance export and tamper-evident evidence packs (IMComplianceExportService, IMComplianceEvidencePackService)
  • Enterprise control-plane operations: license issuance/revocation, policy draft/approve/activate/rollback with RSA signatures (IMEnterpriseControlPlaneService)
  • Upgrade compatibility analysis and SLO preset management (IMUpgradeCompatibilityService, IMEnterpriseSloPresetService)
  • OpenTelemetry tracing and metrics for anti-tamper and audit trail activity sources

Installation

dotnet add package Muonroi.Governance.Enterprise --prerelease

Quick Start

using Muonroi.Core.Abstractions.Context;
using Muonroi.Core.Abstractions.Interfaces;
using Muonroi.Core.Abstractions.SeedWorks;
using Muonroi.Core.Helpers;
using Muonroi.Governance.Enterprise;
using Muonroi.Governance.Operations;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Prerequisites required by the governance pipeline
builder.Services.AddSingleton<IMJsonSerializeService, MJsonSerializeService>();
builder.Services.AddSingleton<IMDateTimeService, MDateTimeService>();
builder.Services.AddSingleton<ISystemExecutionContextAccessor, SystemExecutionContextAccessor>();
builder.Services.AddHttpClient(); // required by LicenseActivator

// Register enterprise governance — calls AddLicenseProtection() internally,
// then upgrades OSS services and registers operations + compliance services.
builder.Services.AddMEnterpriseGovernance(builder.Configuration);

builder.Services.AddControllers();

WebApplication app = builder.Build();

// Exposes enterprise operations endpoints:
//   POST /api/v1/enterprise-ops/upgrade/compatibility/check
//   GET  /api/v1/enterprise-ops/slo/presets
//   GET  /api/v1/enterprise-ops/slo/presets/{presetName}
app.MapMEnterpriseOperationsEndpoints();

app.Run();

appsettings.json

{
  "LicenseConfigs": {
    "Mode": "Offline",
    "LicenseFilePath": "licenses/license.lic",
    "PublicKeyPath": "licenses/public.pem",
    "EnableAntiTampering": true,
    "EnableChain": true,
    "ChainStorage": "File",
    "ChainFilePath": "licenses/chain.json",
    "FailMode": "Hard",
    "EnableServerValidation": false,
    "Compliance": {
      "Enabled": true,
      "EnableBackgroundExport": true,
      "ExportRootPath": "logs/compliance",
      "ExportIntervalMinutes": 15,
      "EvidencePackRetentionDays": 365
    }
  }
}

Features

  • Enterprise license guard: replaces the OSS ILicenseGuardEnhancer with EnterpriseLicenseGuardEnhancer, which combines anti-tamper checks, policy enforcement, and tenant-context resolution
  • Hardware fingerprinting: FingerprintProvider derives a machine-and-project bound fingerprint; HmacFingerprintSigner signs the audit chain with the license payload key
  • Anti-tamper detection: AntiTamperDetector scans for hardware breakpoints (DR0–DR3 on x64) and debugger instrumentation; CodeIntegrityVerifier validates assembly checksums
  • TPM anchoring: TpmAnchor uses Windows DPAPI or TPM to bind license files to the local machine (opt-in via EnableTpmAnchoring)
  • Fail-closed policy enforcement: PolicyEnforcer loads and RSA-verifies a signed policy bundle at startup; unverifiable or missing policies disable enforcement rather than silently pass
  • Audit-chain submission: ChainSubmitter batches and submits action-chain entries to the license server; FileFailedChainSubmissionStore provides durable retry for submissions that fail
  • Nonce rotation: NonceRotator rotates chain-signing nonces on a schedule to limit replay exposure
  • License heartbeat: LicenseHeartbeatService (hosted service) keeps the online license current when Mode=Online and EnableHeartbeat=true
  • Compliance export: IMComplianceExportService appends audit records to an NDJSON append-only log and verifies log integrity; MComplianceExportHostedService runs export on a configurable interval
  • Evidence packs: IMComplianceEvidencePackService generates RSA-signed, tamper-evident evidence pack files from compliance records and verifies them on load
  • Control plane: IMEnterpriseControlPlaneService issues, revokes, and tenant-assigns licenses; manages policy-bundle lifecycle (draft → approve → activate → rollback) with RSA chain-of-custody signatures
  • Upgrade compatibility: IMUpgradeCompatibilityService evaluates whether a target version upgrade is compatible given the current license configuration
  • SLO presets: IMEnterpriseSloPresetService provides named SLO threshold presets for module-level alerting
  • OpenTelemetry integration: automatically registers AntiTamperingRuntimeTelemetry and AuditTrailRuntimeTelemetry activity sources and meters

Configuration

AddMEnterpriseGovernance(IConfiguration) reads from the LicenseConfigs section (bound to LicenseConfigs).

Key options relevant to enterprise behavior:

Option Type Default Purpose
LicenseConfigs:Mode LicenseMode Offline Offline or Online
LicenseConfigs:EnableAntiTampering bool false Activate anti-tamper runtime checks
LicenseConfigs:EnableHardwareBreakpointDetection bool false DR0–DR3 hardware breakpoint scan
LicenseConfigs:EnableChain bool false Enable action-chain audit trail
LicenseConfigs:EnableServerValidation bool false Submit chains to the license server
LicenseConfigs:EnableTpmAnchoring bool false DPAPI/TPM machine-binding
LicenseConfigs:FailMode LicenseFailMode Soft Soft (log) or Hard (throw) on failure
LicenseConfigs:Online:EnableHeartbeat bool false License heartbeat (requires Mode=Online)
LicenseConfigs:Compliance:Enabled bool false Activate compliance export pipeline
LicenseConfigs:Compliance:EnableBackgroundExport bool false Start background export hosted service
LicenseConfigs:Compliance:ExportIntervalMinutes int 15 Background export cadence
LicenseConfigs:Compliance:EvidencePackRetentionDays int 365 Evidence-pack pruning window

Control Plane (separate registration)

using Muonroi.Governance.ControlPlane;
using System.Security.Cryptography;

RSA rsa = RSA.Create();
// load rsa from your enterprise RSA private key...

services.AddMEnterpriseControlPlane(
    registryPath: "licenses/control-plane-registry.json",
    signer: new MRsaControlPlaneSigner(rsa, keyId: "my-cp-key"));

API Reference

Type Purpose
EnterpriseGovernanceServiceExtensions.AddMEnterpriseGovernance DI registration; upgrades OSS services and wires enterprise features
MControlPlaneServiceCollectionExtensions.AddMEnterpriseControlPlane Registers control-plane store, signer, and service
EnterpriseLicenseGuardEnhancer Enterprise ILicenseGuardEnhancer: anti-tamper + policy enforcement
AntiTamperDetector Hardware breakpoint and process-level tamper detection
CodeIntegrityVerifier Assembly checksum validation
PolicyEnforcer Verifies and enforces signed LicensePolicy bundles
FingerprintProvider Machine-and-project hardware fingerprint
HmacFingerprintSigner HMAC signing of fingerprint chain entries
FileFingerprintChainStore File-backed audit chain persistence
TpmAnchor Windows DPAPI / TPM machine-binding
ChainSubmitter Batched license-server audit-chain submission with retry
FileFailedChainSubmissionStore (IFailedChainSubmissionStore) Durable store for failed chain submissions
NonceRotator Rotating signing nonce for the chain
LicenseActivator Online license activation, JWT + proof file persistence
LicenseHeartbeatService Hosted service: periodic online license heartbeat
ChainSubmissionHostedService Hosted service: periodic chain submission
IMComplianceExportService Export audit records to NDJSON; verify log integrity
MComplianceExportService Implementation of IMComplianceExportService
MComplianceExportHostedService Hosted service: background compliance export
IMComplianceEvidencePackService Generate and verify RSA-signed evidence packs
MComplianceEvidencePackService Implementation of IMComplianceEvidencePackService
IMEnterpriseControlPlaneService License issuance/revocation, policy lifecycle, audit trail
MEnterpriseControlPlaneService Implementation of IMEnterpriseControlPlaneService
MRsaControlPlaneSigner (IMControlPlaneSigner) RSA signing/verification for control-plane records
MFileControlPlaneStore (IMControlPlaneStore) File-backed control-plane registry persistence
IMUpgradeCompatibilityService Evaluates version-upgrade compatibility
IMEnterpriseSloPresetService Named SLO threshold preset lookup
GovernanceTelemetryDescriptor ITelemetryDescriptor for governance OTel registration

Samples

  • Quickstart.Governance.Enterprise — ASP.NET Core API demonstrating AddMEnterpriseGovernance, ILicenseGuard tier/feature enforcement, and MapMEnterpriseOperationsEndpoints

Compatibility

  • Target framework: net8.0
  • Requires: Microsoft.AspNetCore.App framework reference
  • License: Commercial — requires activation. See LICENSE-COMMERCIAL.

License

This package requires a commercial license. Contact Muonroi for licensing terms. See LICENSE-COMMERCIAL.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Muonroi.Governance.Enterprise:

Package Downloads
Muonroi.BuildingBlock.All

Metapackage for Muonroi Building Block - Includes all sub-packages for a complete infrastructure setup.

Muonroi.Pdf.Enterprise

Enterprise extensions for Muonroi.Pdf: template registry client, Redis hot-reload, SSIM quality scorer, and capability gates.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.16 104 6/22/2026
1.0.0-alpha.15 94 5/31/2026
1.0.0-alpha.14 97 5/15/2026
1.0.0-alpha.13 86 5/2/2026
1.0.0-alpha.12 83 4/2/2026
1.0.0-alpha.11 134 4/2/2026
1.0.0-alpha.1 89 3/8/2026