Licensing process overview

The goal of this licensing system is to allow a monitoring and management of AI models through different policies, mostly based on a license expiration timestamp and a max inferences quota. Those licensing policies are optional, provided that at least one of them is selected.

Table of contents

  1. License duration
  2. License decision tree
  3. License expiration computation

License duration

The default license duration for a device is defined in the properties of the customer who owns it. This value can also be overridden on a per-device basis. The license duration is used to determine the validity period when generating a license. If the time remaining until the customer’s end of contract date is shorter than the configured license duration, the license expiration will be set to match the end of contract date.

The overlap time is configured on the SkRuntime side. This value defines the duration before license expiration during which a device begins requesting a new license.

Example: If the license parameters are set to

License duration Overlap time End of contract
1 year 1 month June 2026

And a the device request its first license in January 2025, the license generated will be valid like described on diagram 1.

---
config:
  look: handDrawn
---
gantt
title Diagram 1: License Renewal Timeline with Contract End Date
dateFormat YYYY-MM-DD
tickInterval 1month
axisFormat %m-%y
todayMarker off

License 1 :active, l1, 2025-01-01, 365d
Overlap Period :crit, l_overlap, 2025-12-01, 31d
License 2 : l2, 2025-12-01, 182d
Contract End Date : vert, v1, 2026-06-01, 0d

License decision tree

To do so, at each incoming license request from a device, a decision tree chooses the appropriate action to do among the following :

  • Allow inference (valid license).
  • Disallow inference (invalid license).

Here is a simplified version of the decision tree, browsed whenever a license request is issued to the server with a device ID and client ID attached :

---
config:
  look: handDrawn
---
graph TD
    accTitle: Licensing decision tree
    accDescr: A graph describing the decision making when it comes to handle a license request

    %% Starting point
    A{Is the device known?}

    %% Branches principales
    A -->|Yes| B{Is the device allowed?}
    A -->|No| C{What is the mode of approval?}

    %% Known device
    B -->|Yes| D{Is max active devices count reached?}
    B -->|No| DISALLOW

    D -->|No| G(Allow inference)
    D -->|Yes| DISALLOW

    %% Unknown device
    C -->|Pending list| DISALLOW
    C -->|Trust on first use| I{Is max active devices count reached?}

    I -->|Yes| DISALLOW
    I -->|No| K(Allow inference)
    
    DISALLOW(Disallow inference)

License expiration computation

The expiration date of the license is computed depending on the properties of the involved client and device:

---
config:
  look: handDrawn
---
graph TD
    accTitle: License expiration date decision tree
    accDescr: A graph describing the decision making when it comes to compute a license expiration date for a valid license request

    %% Starting point
    A{Does the device have a custom license duration ?}

    A-->|Yes| LICENCE_DURATION_1
    A-->|No| C{Does the client have a license end date?}
    
    C-->|Yes| D{Does the client have a license duration ?}
    C-->|No| E{Does the client have a license duration ?}
    
    D-->|Yes| IS_EARLIER{Is the end date earlier than now plus the license duration?}
    D-->|No| LICENCE_END
    
    E-->|Yes| LICENCE_DURATION
    E-->|No| UNLIMITED
    
    IS_EARLIER-->|Yes| LICENCE_END
    IS_EARLIER-->|No| LICENCE_DURATION
    
    LICENCE_DURATION(Now plus the client license duration)
    LICENCE_DURATION_1(Now plus the client license duration)
    LICENCE_END(End of the client license)
    UNLIMITED(No expiration)
    

This license expiration decision tree is the result of the optional nature of the custom per-device license duration attribute.