Repository navigation
Releases
V1.4.0 - More Fine-Grained Custom Features & Breaking Changes
Aegis V1.4.0 - Centralized Feature Management & More Breaking Changes
This release introduces significant enhancements to feature management, license validation, and overall system structure.
Highlights
- Advanced Feature Management: Introducing the new
FeatureManager, offering granular control over licensed features with support for various data types (Boolean, Integer, Float, String, DateTime, ByteArray). - Enhanced License Validation: Refined validation process with detailed
LicenseLoadResultandLicenseStatusreporting for improved diagnostics. - Streamlined License Building: Simplified feature integration with new overloads in
LicenseBuilder. - Improved Data Structure: Introduction of the
Featuremodel for more organized and type-safe feature representation. - Server-Side Enhancements: The Aegis Server now supports the new feature model and validation improvements.
New Features
-
FeatureManager:- Centralized management of feature-related operations.
- Methods to check feature enablement (
IsFeatureEnabled). - Methods to retrieve feature values of different types (
GetFeatureInt,GetFeatureFloat,GetFeatureString,GetFeatureDateTime,GetFeatureByteArray). ThrowIfNotAllowedmethod to enforce feature restrictions.- Thread-safe access to the current license using
ThreadLocal<BaseLicense?>.
-
FeatureModel:- Represents feature values with specific data types (
FeatureValueType). - Provides methods for creating and accessing feature values in a type-safe manner.
- Represents feature values with specific data types (
-
LicenseLoadResult:- Replaces the previous
LicenseValidationResult. - Provides comprehensive information about the license loading and validation process, including:
Status(LicenseStatus): Indicates the license's status (Valid, Revoked, Expired, Invalid).License(BaseLicense): The loaded license object (if successful).Exception(Exception): Any exceptions that occurred during the process.
- Replaces the previous
-
LicenseStatusEnum:- Represents the status of a license (Valid, Revoked, Expired, Invalid).
Enhancements
-
LicenseBuilder:- Added overloads to the
WithFeaturemethod to support adding features with different data types (bool, int, float, string, DateTime, byte[]). - Now uses the
Featuremodel for feature values.
- Added overloads to the
-
LicenseManager:LoadLicenseAsyncnow returns aLicenseLoadResultobject.ValidateLicenseAsyncnow returns aLicenseLoadResultobject.- Automatically sets the loaded license in
FeatureManagerafter successful validation.
-
LicenseValidator:- Validation methods (e.g.,
ValidateStandardLicense) now returnLicenseStatus. VerifyLicenseDatanow returns aLicenseLoadResult.
- Validation methods (e.g.,
-
BaseLicense:Featuresproperty now usesDictionary<string, Feature>to store features and their values.
-
Aegis Server:
- Updated
Licenseentity to support the newFeaturemodel. LicenseServicenow handles the new feature representation and validation logic.LicenseGenerationRequestDTO now includes aFeaturesdictionary.
- Updated
Breaking Changes
LicenseValidationResultRemoved: Replaced byLicenseLoadResultin core library. Any code relying onLicenseValidationResultwill need to be updated to useLicenseLoadResultand theLicenseStatusenum.BaseLicense.FeaturesType Change: TheFeaturesproperty inBaseLicenseis now of typeDictionary<string, Feature>instead ofDictionary<string, bool>.LicenseValidatorMethod Signature Changes: Methods likeValidateStandardLicensenow returnLicenseStatusinstead ofbool.- Aegis Server Database Changes: The database schema has been updated to accommodate the
Featuremodel. Database migrations will be required. - Aegis Server API Changes: The
LicenseGenerationRequestDTO now uses aDictionary<Guid, Feature>for features.
V1.3.0
Aegis v1.3.0 - Customizable Serialization and Hardware ID
Aegis v1.3.0 brings significant improvements to serialization and hardware identification, offering greater flexibility and control over your licensing process. We've also simplified offline validation and removed external dependencies, making Aegis even more lightweight and efficient.
Key Features:
-
Flexible Serialization: Introduce the
ILicenseSerializerinterface and theJsonLicenseSerializerclass, allowing you to easily switch between different serialization formats or implement custom serialization logic. This makes Aegis adaptable to various systems and requirements. -
Customizable Hardware Identification: Implement the
IHardwareIdentifierinterface to tailor hardware identification to your specific needs. The newDefaultHardwareIdentifierclass provides a robust default implementation, replacing the previous dependency on theDeviceIdlibrary, streamlining Aegis and reducing external dependencies. -
Simplified Offline Validation: Streamline offline validation with simplified logic and control over built-in validations. Use the
SetBuiltInValidationmethod to enable or disable default validation checks to solely use your custom validation rules. -
Enhanced Security and Stability: Resolved potential vulnerabilities and improved overall code quality, ensuring more secure and stable license management. Various internal changes and refactorings have improved code structure and clarity.
Upgrade Guide:
-
Hardware Identification: If you previously relied on the
HardwareUtilsclass, It got replaced with the newDefaultHardwareIdentifieror implement your customIHardwareIdentifier. -
Serialization: While the default JSON serialization remains similar, you can now control serialization by implementing and injecting your custom
ILicenseSerializerclass.
Breaking Changes:
- The
HardwareUtilsclass has been removed. TheDefaultHardwareIdentifierused by default or implement a customIHardwareIdentifier. - The
SaveLicensemethod inLicenseBuilderhas been renamed toSaveLicenseToPath.
V1.2.0 - Breaking Changes Update
Aegis Licensing Library v1.2.0 Release Notes
This release introduces major enhancements to the security and flexibility of the Aegis Licensing Library, including hybrid encryption, custom validation rules, and an improved developer experience.
Major Features:
1. Enhanced Security with Hybrid Encryption:
- License data is now encrypted using AES and a SHA256 hash of the encrypted data is signed with RSA, providing stronger protection and supporting larger data sizes.
- Public key validation eliminates the need for shipping the private key, enhancing security.
- Offline validation is simplified by using raw license data directly.
2. Custom Validation Rules:
- Developers can now implement custom validation rules using the
IValidationRuleinterface and apply them to licenses. IValidationRuleGroupallows grouping validation rules for better organization.- The example project demonstrates a custom validation rule for trial license expiry based on system time.
3. Improved Developer Experience:
- Centralized verification logic in
LicenseValidatorimproves code organization and maintainability. - The example project demonstrates how to generate, load, and validate licenses, as well as access license information and feature flags.
LicensingSecretsstructure is simplified by removing the unusedEncryptionKeyproperty.LicenseManagernow allows overriding the default private key when saving a license.- README updated with a section on custom validation rules and an example.
Breaking Changes:
- This release introduces breaking changes due to the implementation of hybrid encryption. Existing licenses generated with previous versions will not be compatible with this version.
- Several methods in
SecurityUtilsrelated to RSA encryption/decryption and signature verification are now internal.
Other Changes:
- Improved File Path Validation:
LicenseManager.SaveLicensenow validates the provided file path to ensure it's a valid local path. - RSA Key Export in Base64 Format:
LicenseUtils.GenerateLicensingSecretsnow exports RSA keys in Base64 format for better portability. - Enhanced Error Handling:
LicenseValidator.VerifyLicenseDatanow throws specific exceptions on signature or integrity check failures.
Example Project:
- A sample console application demonstrating the usage of the updated licensing system has been added. It showcases:
- Generating and saving licenses.
- Loading and validating licenses.
- Accessing license information and feature flags.
- Implementing custom validation rules.
This release significantly improves the security, robustness, and maintainability of the Aegis Licensing Library. The example project provides a clear and concise guide for developers to integrate the updated licensing system into their applications. We encourage all users to upgrade to this latest version to take advantage of these enhancements.