Core licensing domain model providing feature-based product licensing and instance management.
More...
Core licensing domain model providing feature-based product licensing and instance management.
Overview
The imtlic module implements a comprehensive, feature-based licensing system for software and hardware products. It provides a clean separation between product definitions and deployed instances, enabling flexible licensing models with temporal control, hardware binding, and dependency management.
Architecture
The module uses a three-level abstraction hierarchy:
Level 1: Definitions** (What can be sold)
- Products: Container of all available features
- Features: Atomic units of functionality
License Definitions: Specification of which features a license unlocks
Level 2: Instances** (What was sold and deployed)
- Product Instances: Deployed product at customer site
License Instances: Activated licenses with expiration dates
Level 3: Management** (How it's controlled)
- Controllers: Import, validation, and management
- Providers: Data access and dependency resolution
- Meta-info Creators: Metadata generation
Conceptual Model
Products
A Product (IProductInfo, CProductInfo) represents a software or hardware offering.
Key Characteristics:**
Features
A Feature (IFeatureInfo, CFeatureInfo) represents an individual capability or functionality.
Key Characteristics:**
- Atomic unit of product functionality
- Unique feature ID and name
- Optional vs. Mandatory classification
- Permission flag for access control features
- Hierarchical organization (parent-child relationships)
Dependency management (feature A requires feature B)
Feature Types:**
- Optional Features: Functionality that can be sold separately, not required for core operation
- Mandatory Features: Core functionality included in all licenses
Permission Features: Access control rights (NOT sellable features, but operational permissions)
Design Pattern:** Composite pattern - Features can form hierarchies
License Definitions
A License Definition (ILicenseDefinition, CLicenseDefinition) specifies a license type available for purchase.
Key Characteristics:**
Product Instances
A Product Instance (IProductInstanceInfo, CProductInstanceInfo) represents a deployed product installation.
Key Characteristics:**
- References parent Product (N:1 relationship)
- Unique instance ID (hardware ID, MAC address, etc.)
- Customer/account association
- Serial number and project assignment
- Container of activated License Instances
Hardware binding support
Lifecycle:** Created when product is sold/installed, persists throughout deployment
Design Pattern:** Definition-Instance pattern separating static definitions from runtime instances
License Instances
A License Instance (ILicenseInstance, CLicenseInstance) represents an activated license.
Key Characteristics:**
- Based on License Definition (extends it)
- Expiration date with goodwill period
- Cryptographic license keys
- Validation status (Active, Expired, Grace Period)
Instance-specific activation data
Temporal Control:**
- Expiration Date: Primary validity period
- Goodwill Period: Grace period after expiration
Unlimited Licenses: Special case with no expiration
Design Pattern:** Decorator pattern - extends License Definition with temporal data
Hardware Instances
Hardware binding support through hardware instance abstractions.
IHardwareInstanceInfo / CHardwareInstanceInfo:**
Product Licensing Info
Product Licensing Info (IProductLicensingInfo, CProductLicensingInfo) provides the complete licensing catalog.
Key Characteristics:**
Design Patterns Used
Definition-Instance Pattern
Separates static definitions from runtime instances:
- Product → Product Instance (1:N)
- License Definition → License Instance (1:N)
- One definition can spawn many instances
- Centralized definition management
- Instance-specific customization
Container Pattern
Products and License Definitions are containers:
- Product contains Features
- License Definition contains Features (subset)
- Hierarchical feature organization
- Dependency management between contained items
Provider Pattern
Data access through provider interfaces:
Component Pattern (ACF)
All major classes are ACF components:
- Factory-based instantiation
- Interface-based programming
- Configuration-driven composition
- Dependency injection support
Typical Workflows
Product Definition Workflow
- Create Features (atomic capabilities)
- Organize Features in hierarchies (if needed)
- Define Feature dependencies
- Create Product containing all Features
- Create License Definitions specifying Feature subsets
- Define License dependencies
- Create Product Licensing Info (complete catalog)
Product Deployment Workflow
- Customer purchases Product with selected licenses
- Create Product Instance with customer info
- Generate hardware binding data (if needed)
- Activate License Instances on Product Instance
- Generate license files with cryptographic keys
- Deploy license files to customer site
- System validates licenses and enables features
License Validation Workflow
- Application starts, loads license files
- CLicenseControllerComp imports license files
- Cryptographic validation of license keys
- Check expiration dates and goodwill periods
- Build list of unlocked Features
- CLicenseBasedRightsProviderComp provides access control
- Application enables/disables features accordingly
Feature Availability Check
- Application needs to use a Feature
- Query CLicenseBasedRightsProviderComp (implements IRightsProvider)
- Check if feature is unlocked by active licenses
- Check feature dependencies (if feature A needs feature B)
- Enable/disable functionality based on result
Key Components
Controllers
- CLicenseControllerComp: Client-side license file import, validation, and status checking
- CProductControllerComp: Product data persistence and management
Providers
Core Implementations
Meta-Information Creators
Key Interfaces
All interfaces follow ACF conventions with virtual inheritance and smart pointers.
Domain Model Interfaces:**
- IProductInfo, IFeatureInfo, ILicenseDefinition
- IProductInstanceInfo, ILicenseInstance
IProductLicensingInfo
Provider Interfaces:**
- IFeatureInfoProvider, ILicenseInfoProvider
- ILicenseInstanceProvider, IProductInstanceInfoProvider
IProductLicensingInfoProvider
Dependency Management Interfaces:**
- IFeatureDependenciesManager, IFeatureDependenciesProvider
ILicenseDependenciesManager, ILicenseDependenciesProvider
Control Interfaces:**
ILicenseController, ILicenseStatus
Hardware Interfaces:**
IHardwareInstanceInfo, ILicensedHardwareInstanceInfo
Security Interfaces:**
- IKeyRing, IEncyptedLicenseKeyProvider, IPartProductionInfo
Integration Points
With imtlicgql Module:**
- Provides GraphQL API layer over imtlic domain model
- Collection controllers for CRUD operations
Metadata delegates for JSON serialization
With imtlicdb Module:**
- Database persistence layer
- SQL/JSON storage in PostgreSQL
Query and filtering capabilities
With Client Applications:**
- License file import and validation
- Feature availability queries
- Access control enforcement
Additional Documentation
- CONCEPTUAL_MODEL.md: Detailed English conceptual overview
- CONCEPTUAL_MODEL_RU.md: Russian translation
- DOKUMENTATION_ZUSAMMENFASSUNG.md: German documentation summary
- LICENSING_ARCHITECTURE.md: Complete three-module architecture
- See also
- imtlicgql For GraphQL API layer
-
imtlicdb For database persistence layer