Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 28, 2025

Adds a complete licensing management system with RSA-2048 signed licenses, centralized application registry, and date-based access control.

Core Components

Business Central Objects (80570-80599)

  • Tables: Application registry, License Header with BLOB signature storage, License Detail for feature permissions
  • Pages: List/Card pairs for applications and licenses, detail subpage for feature configuration
  • Codeunits: License validation, signature data serialization, feature access control, integration samples
  • Enum: License status state machine (Invalid → Unsigned → Pending → Active → Expired)

Cryptographic Infrastructure

  • RSA-2048-SHA256 signing: PowerShell scripts for key generation, license signing, and signature verification
  • Tamper detection: Base64-encoded signatures stored in BLOB fields, verified before validation
  • Key management: Separate public/private storage with .gitignore protection

CLI Interface (LicenseManager-CLI.ps1)

Five operations: GenerateKeys, CreateLicense, SignLicense, VerifyLicense, ListApplications

Integration Pattern

// Feature access control
local procedure ExecutePremiumFeature()
var
    LicenseValidator: Codeunit "LM License Validator Sample";
begin
    LicenseValidator.CheckFeatureAccessWithError('APP-001', 'PREMIUM');
    // Feature implementation
end;

// License validation with metadata
local procedure GetLicenseMetadata()
var
    LicenseValidator: Codeunit "LM License Validator Sample";
    LicenseNo: Code[20];
    ExpiryDate: Date;
    MaxUsers: Integer;
begin
    if LicenseValidator.GetLicenseInfo('APP-001', LicenseNo, ExpiryDate, MaxUsers) then
        // Use license metadata
end;

Security Model

  • Automatic status updates: Date-based transitions trigger on record insert/modify
  • Signature verification: GetLicenseSignatureData() serializes license+features, hash verified against stored RSA signature
  • Permission levels: Read/Write/Execute/Full per feature with quantity limits
  • Audit trails: Created/Modified By/Date on all core tables

Documentation

  • QUICKSTART.md: 5-minute setup workflow
  • ARCHITECTURE.md: State machines, data flow diagrams, component interactions
  • IMPLEMENTATION_SUMMARY.md: Statistics and testing results

Object ID allocation reserves 80580-80599 for future API endpoints and license analytics.

Original prompt

This section details on the original issue you should resolve

<issue_title>Implement Comprehensive Licensing Management Application for Business Central</issue_title>
<issue_description>Description:
This PR introduces a full-featured licensing management system for Business Central solutions. It enables secure, signed license file generation, centralized application management, and date-based access control to ensure enterprise-grade software licensing.

Overview

The system provides a complete solution for managing software licenses in Business Central environments, featuring:

Centralized Application Registry: Maintain applications with version control and activation status.
Secure License Generation: RSA-2048 signed licenses to prevent tampering.
Date-Based Access Control: Configurable validity periods with automatic enforcement.
Command-Line Interface: Streamlined CLI for licensing operations.
Key Features
Application Management

Add, list, and update applications in the centralized registry.
Track versions and control activation status.
Full application lifecycle management.
License Creation & Validation

Generate cryptographically signed licenses.
Validate license authenticity and permissions.
Support feature-based licensing and custom metadata.
Automatic tamper detection via signature verification.
Security

RSA digital signatures with automated key pair generation.
Tamper-proof license files.
Secure key management (separate public/private key storage).
Date-based access control with precise timestamp validation.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 6 commits October 28, 2025 12:59
Co-authored-by: fmoric <18283753+fmoric@users.noreply.github.com>
Co-authored-by: fmoric <18283753+fmoric@users.noreply.github.com>
Co-authored-by: fmoric <18283753+fmoric@users.noreply.github.com>
Co-authored-by: fmoric <18283753+fmoric@users.noreply.github.com>
Co-authored-by: fmoric <18283753+fmoric@users.noreply.github.com>
Co-authored-by: fmoric <18283753+fmoric@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement comprehensive licensing management system for Business Central Implement enterprise licensing management system for Business Central Oct 28, 2025
Copilot AI requested a review from fmoric October 28, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Comprehensive Licensing Management Application for Business Central

2 participants