Skip to content

Releases

V1.4.0 - More Fine-Grained Custom Features & Breaking Changes

Choose a tag to compare

@LSXPrime LSXPrime released this 03 Jan 07:32

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 LicenseLoadResult and LicenseStatus reporting for improved diagnostics.
  • Streamlined License Building: Simplified feature integration with new overloads in LicenseBuilder.
  • Improved Data Structure: Introduction of the Feature model 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).
    • ThrowIfNotAllowed method to enforce feature restrictions.
    • Thread-safe access to the current license using ThreadLocal<BaseLicense?>.
  • Feature Model:

    • Represents feature values with specific data types (FeatureValueType).
    • Provides methods for creating and accessing feature values in a type-safe manner.
  • 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.
  • LicenseStatus Enum:

    • Represents the status of a license (Valid, Revoked, Expired, Invalid).

Enhancements

  • LicenseBuilder:

    • Added overloads to the WithFeature method to support adding features with different data types (bool, int, float, string, DateTime, byte[]).
    • Now uses the Feature model for feature values.
  • LicenseManager:

    • LoadLicenseAsync now returns a LicenseLoadResult object.
    • ValidateLicenseAsync now returns a LicenseLoadResult object.
    • Automatically sets the loaded license in FeatureManager after successful validation.
  • LicenseValidator:

    • Validation methods (e.g., ValidateStandardLicense) now return LicenseStatus.
    • VerifyLicenseData now returns a LicenseLoadResult.
  • BaseLicense:

    • Features property now uses Dictionary<string, Feature> to store features and their values.
  • Aegis Server:

    • Updated License entity to support the new Feature model.
    • LicenseService now handles the new feature representation and validation logic.
    • LicenseGenerationRequest DTO now includes a Features dictionary.

Breaking Changes

  • LicenseValidationResult Removed: Replaced by LicenseLoadResult in core library. Any code relying on LicenseValidationResult will need to be updated to use LicenseLoadResult and the LicenseStatus enum.
  • BaseLicense.Features Type Change: The Features property in BaseLicense is now of type Dictionary<string, Feature> instead of Dictionary<string, bool>.
  • LicenseValidator Method Signature Changes: Methods like ValidateStandardLicense now return LicenseStatus instead of bool.
  • Aegis Server Database Changes: The database schema has been updated to accommodate the Feature model. Database migrations will be required.
  • Aegis Server API Changes: The LicenseGenerationRequest DTO now uses a Dictionary<Guid, Feature> for features.

V1.3.0

Choose a tag to compare

@LSXPrime LSXPrime released this 20 Nov 20:28

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 ILicenseSerializer interface and the JsonLicenseSerializer class, 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 IHardwareIdentifier interface to tailor hardware identification to your specific needs. The new DefaultHardwareIdentifier class provides a robust default implementation, replacing the previous dependency on the DeviceId library, streamlining Aegis and reducing external dependencies.

  • Simplified Offline Validation: Streamline offline validation with simplified logic and control over built-in validations. Use the SetBuiltInValidation method 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 HardwareUtils class, It got replaced with the new DefaultHardwareIdentifier or implement your custom IHardwareIdentifier.

  • Serialization: While the default JSON serialization remains similar, you can now control serialization by implementing and injecting your custom ILicenseSerializer class.

Breaking Changes:

  • The HardwareUtils class has been removed. The DefaultHardwareIdentifier used by default or implement a custom IHardwareIdentifier.
  • The SaveLicense method in LicenseBuilder has been renamed to SaveLicenseToPath.

V1.2.0 - Breaking Changes Update

Choose a tag to compare

@LSXPrime LSXPrime released this 20 Oct 11:34

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 IValidationRule interface and apply them to licenses.
  • IValidationRuleGroup allows 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 LicenseValidator improves code organization and maintainability.
  • The example project demonstrates how to generate, load, and validate licenses, as well as access license information and feature flags.
  • LicensingSecrets structure is simplified by removing the unused EncryptionKey property.
  • LicenseManager now 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 SecurityUtils related to RSA encryption/decryption and signature verification are now internal.

Other Changes:

  • Improved File Path Validation: LicenseManager.SaveLicense now validates the provided file path to ensure it's a valid local path.
  • RSA Key Export in Base64 Format: LicenseUtils.GenerateLicensingSecrets now exports RSA keys in Base64 format for better portability.
  • Enhanced Error Handling: LicenseValidator.VerifyLicenseData now 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.