modelica / Encryption-and-Licensing

Standardized Encryption of Modelica Libraries and Artifacts
BSD 3-Clause "New" or "Revised" License
3 stars 6 forks source link

Feature return and handshaking needs clarification #4

Closed d94pn closed 4 months ago

d94pn commented 10 months ago

After the tool have started the LVE, requested the features and got the content, the LVE is not needed until the features are returned which could be long. Hence it makes sense to terminate the LVE and start a new session for feature returns. It needs to be clarified that this should be supported by the LVE.

In general for handshaking: Should it be regarded as a possibility (preferably) or a requirement? I.e. could the tool skip it without consequnces other than risk of odd failures further on?

axelmartenssonmodelon commented 7 months ago

It's a requirement on the tool to keep the LVE alive for the entire period that it needs to hold on to licenses. This is to facilitate integration with a common licensing mechanism where you have a remote licensing server that the LVE sends pings to, and if it does not get a ping from the LVE after some timeout, then the licenses are returned.

Handshaking is a requirement, it cannot be skipped, because it is a requirement for encrypting and authenticating the communication between the tool and the LVE.

d94pn commented 7 months ago

Ok. An improvement would be to introduce the possibility for the LVE to allow for shutdown after the handshaking and feature requests (typically when it implements a node locked scheme without server) and some mechanism to tell the tool whether this is allowed.

axelmartenssonmodelon commented 4 months ago

LVE also needs to be alive to do decryption of the Modelica code. That being said, we believe the feature in #3 would be useful and cover this use case.

d94pn commented 4 months ago

Agreed. My first approach was that all content was forced to be read when opening the library. But for big libraries it is of course useful to support "on demand" loading where parts of the library may be read much later. Hence, kepping the LVE running makes sense.