Muonroi.Governance.Enterprise
1.0.0-alpha.16
dotnet add package Muonroi.Governance.Enterprise --version 1.0.0-alpha.16
NuGet\Install-Package Muonroi.Governance.Enterprise -Version 1.0.0-alpha.16
<PackageReference Include="Muonroi.Governance.Enterprise" Version="1.0.0-alpha.16" />
<PackageVersion Include="Muonroi.Governance.Enterprise" Version="1.0.0-alpha.16" />
<PackageReference Include="Muonroi.Governance.Enterprise" />
paket add Muonroi.Governance.Enterprise --version 1.0.0-alpha.16
#r "nuget: Muonroi.Governance.Enterprise, 1.0.0-alpha.16"
#:package Muonroi.Governance.Enterprise@1.0.0-alpha.16
#addin nuget:?package=Muonroi.Governance.Enterprise&version=1.0.0-alpha.16&prerelease
#tool nuget:?package=Muonroi.Governance.Enterprise&version=1.0.0-alpha.16&prerelease
Muonroi.Governance.Enterprise
Enterprise-grade license enforcement, anti-tamper detection, audit-chain signing, compliance export, and control-plane management for the Muonroi platform.
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
ILicenseGuardEnhancerwithEnterpriseLicenseGuardEnhancer, which combines anti-tamper checks, policy enforcement, and tenant-context resolution - Hardware fingerprinting:
FingerprintProviderderives a machine-and-project bound fingerprint;HmacFingerprintSignersigns the audit chain with the license payload key - Anti-tamper detection:
AntiTamperDetectorscans for hardware breakpoints (DR0–DR3 on x64) and debugger instrumentation;CodeIntegrityVerifiervalidates assembly checksums - TPM anchoring:
TpmAnchoruses Windows DPAPI or TPM to bind license files to the local machine (opt-in viaEnableTpmAnchoring) - Fail-closed policy enforcement:
PolicyEnforcerloads and RSA-verifies a signed policy bundle at startup; unverifiable or missing policies disable enforcement rather than silently pass - Audit-chain submission:
ChainSubmitterbatches and submits action-chain entries to the license server;FileFailedChainSubmissionStoreprovides durable retry for submissions that fail - Nonce rotation:
NonceRotatorrotates chain-signing nonces on a schedule to limit replay exposure - License heartbeat:
LicenseHeartbeatService(hosted service) keeps the online license current whenMode=OnlineandEnableHeartbeat=true - Compliance export:
IMComplianceExportServiceappends audit records to an NDJSON append-only log and verifies log integrity;MComplianceExportHostedServiceruns export on a configurable interval - Evidence packs:
IMComplianceEvidencePackServicegenerates RSA-signed, tamper-evident evidence pack files from compliance records and verifies them on load - Control plane:
IMEnterpriseControlPlaneServiceissues, revokes, and tenant-assigns licenses; manages policy-bundle lifecycle (draft → approve → activate → rollback) with RSA chain-of-custody signatures - Upgrade compatibility:
IMUpgradeCompatibilityServiceevaluates whether a target version upgrade is compatible given the current license configuration - SLO presets:
IMEnterpriseSloPresetServiceprovides named SLO threshold presets for module-level alerting - OpenTelemetry integration: automatically registers
AntiTamperingRuntimeTelemetryandAuditTrailRuntimeTelemetryactivity 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,ILicenseGuardtier/feature enforcement, andMapMEnterpriseOperationsEndpoints
Compatibility
- Target framework:
net8.0 - Requires:
Microsoft.AspNetCore.Appframework reference - License: Commercial — requires activation. See LICENSE-COMMERCIAL.
Related Packages
Muonroi.Governance— OSS base: license loading, offline validation, policy store, basic fingerprintingMuonroi.Governance.Abstractions— Shared contracts:LicenseConfigs,ILicenseGuard,IFingerprintChainStore,IPolicyStoreMuonroi.Core— Core services:IMJsonSerializeService,IMDateTimeServiceMuonroi.Tenancy.Core— Tenant context resolution used by the enterprise guard enhancer
License
This package requires a commercial license. Contact Muonroi for licensing terms. See LICENSE-COMMERCIAL.
| Product | Versions 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. |
-
net8.0
- Muonroi.Core (>= 1.0.0-alpha.16)
- Muonroi.Core.Abstractions (>= 1.0.0-alpha.16)
- Muonroi.Governance (>= 1.0.0-alpha.16)
- Muonroi.Governance.Abstractions (>= 1.0.0-alpha.16)
- Muonroi.Tenancy.Core (>= 1.0.0-alpha.16)
- OpenTelemetry.Extensions.Hosting (>= 1.9.0)
- System.Management (>= 8.0.0)
- System.Security.Cryptography.ProtectedData (>= 8.0.0)
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 |