Patent Publication Number: US-11663301-B2

Title: Method for licensing a tool chain

Description:
This nonprovisional application is a continuation of International Application No. PCT/EP2020/052801, which was filed on Feb. 5, 2020 and which claims priority to German Patent Application No. 10 2019 103 445.0, which was filed in Germany on Feb. 12, 2019, and which are both herein incorporated by reference. 
    
    
     BACKGROUND OF THE INVENTION 
     Field of the Invention 
     The present invention relates to a method for usage-based licensing of one or more applications in a container, a computer system comprising an operating computer, a license server, and a plurality of working computers, as well as a computer program product. 
     Description of the Background Art 
     In the development of complex products, a large number of tests are required to ensure safe and reliable functioning. Since the costs for troubleshooting are higher the later an error is detected, components of motor vehicles, for example, such as control units in particular, are tested in a hardware-in-the-loop simulation before the entire product is completed. This involves simulating the physical system in real time and ensuring a correct response of the ECU but requires expensive real-time simulation computers and is also time-consuming. Increasingly, it is becoming possible to test numerous ECU functions without the presence of hardware. For example, the firmware of an ECU for processing sensor data in a motor vehicle can be tested by means of a “virtual test drive”, wherein usually a large number of software applications interact to carry out the simulation. 
     A conclusive test of complex functions such as the autonomous guidance of a motor vehicle requires so much computing power that a large number of computers must be used simultaneously. For this purpose, a local cluster of computers can be kept available or rented from an infrastructure provider as part of cloud computing. The software applications for a test case are packaged in a container, such as a virtual machine, and, depending on need, run on numerous computers. For software manufacturers, this raises the question of how licensing for expensive and specialized software applications can be ensured in such a cloud environment. 
     Various approaches to licensing software in containers are known from the prior art, such as modifying common mechanisms to bind the software to a particular computer via one or more hardware features. In particular, it may be provided that a program running on the host operating system accesses the physical computer and makes the features obtained available to the virtual machines, usually with a limit on the number of virtual machines running simultaneously. One disadvantage of this approach is that it is too inflexible for applications in which the number of required computers fluctuate greatly. 
     Another approach to licensing is based on adapting the hypervisor or the cloud infrastructure; a particular disadvantage here is the lock-in to a specific provider or the requirement for a trusted cloud. For example, EP 2480966 B1, which corresponds to US 2011/0072431, discloses a method for usage-based licensing of applications in a virtual hypervisor run environment, in which multiple licensable components are combined when bootable machine images are created and weightings for the multiple licensable components are embedded as metadata. The hypervisor aggregates telemetric information and transmits it to a management framework, which uses the metadata to determine the usage for each component and to license the usage. In one embodiment, it is provided to assign initial usage units to an instance of the machine image. US 2014/0040343 A1 comprehensively describes a globally distributed computing cloud; a central management component enables the authentication of users and the collection of usage information. 
     US 2013/0179984 A1 discloses a method for controlling the execution of an application on a computer system, in which a license plan is created based on a given license. The license plan includes information about which user is allowed to execute the application in question. On the computer system, there is a license client that obtains the license plan from a license server. Based on the license plan, the license client decides whether a user may run the application. The license plan can have a limited validity period, wherein the validity period can be adjusted based on recorded usage data. U.S. Pat. No. 9,588,795 B2 discloses a method for monitoring resource allocation and logging usage in a virtualized environment, in which overuse of a license is detected and a secured report is generated, taking into account the different processing power of different processors. 
     SUMMARY OF THE INVENTION 
     It is therefore an object of the present invention to provide a method and a mechanism which enables flexible licensing of software applications in containers. In particular, usage-dependent licensing would be desirable, which is preferably also applicable in a private cloud. 
     Thus, according to an exemplary embodiment of the invention, a method is provided for the usage-based licensing of one or more applications in a container, the container comprising a license module, wherein an application queries the presence of an application license by means of the license module and is executed only if an application license is available. In the license module, a linking of one or more application licenses to a unique identifier is stored. The container comprises a settlement module which retrieves a usage unit from an external license source and provides the unique identifier in a secure data storage for the duration of an obtained usage unit. During this time, all applications whose application license is linked to the unique identifier can be executed. 
     The invention is applicable with various types of containers. For example, the container may be executed as a virtual machine comprising an operating system and running on virtual hardware; alternatively, the container may also access the mechanisms of the host operating system, for example, a docker container. Furthermore, the container can also be an image of an embedded system. The applications in the container check the presence of a license when a certain functionality is started or used. It is expedient that, from this point on, a renewed license check is carried out regularly, i.e., at fixed intervals, by the application, in particular having a period of one minute or shorter. The secure data storage can be implemented, for example, as a hidden file in the file system of the container, wherein the contents of the data storage are secured, in particular by encryption or signing, so that manipulation can be detected. 
     Advantageously, the method according to the invention enables a usage-based licensing of applications in a container, wherein a modification to the license model can be made without adaptation to the binary code of the individual applications: For single-user licensing, it is possible for the license module to access a hardware dongle, whereas for the licensing in the container this is replaced by the settlement module and the connection to a license source. The license source can be designed, for example, as a license server in a local network or as a cryptographically secured dedicated hardware module with counter. No trusted infrastructure or contract with a cloud provider is required for operation and secure settlement, but the license source can also be implemented as a metrics software module of a cloud infrastructure. The settlement module implemented as a separate component in the container can also be used independently of a virtualization. The licensing of an application via the unique identifier can thus be maintained independently of user-based settlement. By customizing the settlement module as an adapter, the currently implemented environment remains transparent for the individual software application. By separating the unique identifier, which enables the execution of a licensed application, from the presence and the concrete implementation of the retrieval of usage units, different license models can be implemented with little effort. 
     The unique identifier can be provided with a validity period and is no longer accepted after the validity period has expired. Preferably, the settlement module periodically retrieves new usage units as long as the container is being run; if no usage unit was obtained, the settlement module no longer provides a unique identifier or deletes the unique identifier from the data storage. 
     Conveniently, the retrieval of the usage units can occur at a predetermined period of time before the unique identifier expires. The settlement module does not have to be linked to the applications by (complex) dedicated mechanisms but can retrieve a new usage unit in a time-controlled manner and update the expiration time of the unique identifier or extend it by the duration of the retrieved and obtained usage unit. The duration or the time interval until the unique identifier expires can be selected within certain limits and can be a few minutes, for example. For example, the settlement module could retrieve a usage unit every minute, with the unique identifier being valid for a maximum of three minutes in each case. Thus, a short-term network interruption does not cause problems when running the toolchain, while at the same time, in the event of a bypass attempt, application overuse is limited to a few minutes. 
     The settlement module can accept a retrieved usage unit as an obtained usage unit only if the external license source authenticates itself as trustworthy. This can be done on the basis of a previously agreed key, for example in a challenge-response protocol or on the basis of a signature authentication. 
     The external license source can log retrieved usage units so that a pre-provided credit is reduced and/or the number of usage units consumed are calculated. It is also useful to provide a breakdown of the settlement if multiple sets of software applications are defined, with the settlement containing in particular an overview of the duration of use for the individual sets of applications and the price associated with each. 
     The license module or a secure data area of the license module can include multiple sets of links, wherein a first set of application licenses is linked to a first unique identifier and a second set of applications is linked to a second unique identifier, wherein the settlement module retrieves a first usage unit or a second usage unit from the external license source, and wherein the settlement module provides the first or second unique identifier depending on the usage unit retrieved and obtained. By means of a simple adjustment of the set of software applications stored in the data storage—without modifying the binary code of the individual software application—a wide variety of toolchains can be defined, or a wide variety of applications can be supported in a simple manner. 
     It can also be provided that the secure data storage can or does comprise multiple unique identifiers; the settlement module can thus request multiple usage units in parallel and provide multiple identifiers in parallel according to the usage units obtained. This allows for multiple toolchains to be executed simultaneously, wherein the usage units can be requested in a synchronized or time-offset manner. 
     The invention further relates to a computer system comprising an operating computer having a human-machine interface, a license server as a license source, and a plurality of working computers. Each working computer comprises a processor, a working memory, and an interface, and is set up to execute a method according to the invention. The license server can be executed like a license server known per se in the local network (also known as floating network license). However, other license server versions are also conceivable, as long as secure storage of usage is guaranteed—such as in the form of a Trusted Platform Module. 
     Usage units may have a very long (e.g., one year) or unlimited validity. In this case, the retrieval of usage units can be used to count the number of computers running a software component. Thus, the license server would count software activations instead of runtime. In this case, it may also be provided to permit a limited number of software component activations. If a specified maximum number is exceeded, a manual check must be appropriately performed. This means that automatic licensing can also be performed, for example, for computers that are not connected to the network for longer periods. Thus, a software component may be delivered with subsequent on-demand licensing. 
     Further, the invention relates to a computer program product having a computer-readable storage medium on which are embedded instructions that, when executed by a computing unit, cause the computing unit to be set up to execute a method according to the invention. 
     Further scope of applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes, combinations, and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The present invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only, and thus, are not limitive of the present invention, and wherein: 
         FIG.  1    shows an exemplary embodiment of an operating computer; 
         FIG.  2    shows a schematic view of a simulation in a cluster; and 
         FIG.  3    shows an exemplary embodiment of a container. 
     
    
    
     DETAILED DESCRIPTION 
       FIG.  1    shows an exemplary embodiment of an operating computer PC. This comprises a processor CPU, which can be implemented in particular as a multi-core processor, a main memory RAM and a bus controller BC. Preferably, the operating computer PC can be designed to be manually operated directly by a user, wherein a monitor DIS is connected via a graphics card GPU, and a keyboard KEY and a mouse MOU are connected via a peripheral interface HMI. In principle, the operating computer PC could also have a touch interface. The operating computer further comprises a non-volatile data storage HDD, which can be designed in particular as a hard disk and/or solid state disk, and an interface NET, in particular a network interface. Further computers, such as in particular a cluster of computers CC, can be connected via the interface NET. In principle, one or more arbitrary interfaces, in particular wired interfaces, are available on the operating computer PC and can each be used for connection to further computers. Suitably, a network interface in accordance with the Ethernet standard can be used, wherein at least the physical layer is designed standards-compliant, or several higher protocol layers can also be implemented proprietarily or adapted to the operating computer. The interface NET can also be implemented wirelessly, such as in particular as a WLAN interface or according to a standard such as Bluetooth. It can also be a mobile radio connection such as LTE, wherein preferably the exchanged data are encrypted. It is advantageous if at least one interface of the operating computer is a standard Ethernet interface, so that other computers can be easily connected to the operating computer PC. 
     Preferably, the operating computer PC can have a secure data container SEC. On the one hand, this enables the use of licensed applications on the operating computer itself, but on the other hand it also enables the operating computer to be used as a license server, wherein settlement data are stored in the secure data container. This can be implemented, for example, in the form of a dongle, which can be connected in particular to a peripheral interface. Alternatively, it can also be provided to integrate a secure data container SEC permanently in the operating computer as a component or to store it in the form of a file on the non-volatile data storage HDD, wherein the contents are suitably protected against unauthorized access or manipulation by mechanisms of the operating system and/or by a suitable management utility. 
       FIG.  2    shows a diagram for running a variety of tests on a computer cluster CC. On the operating computer there is a scheduler, which allows for a choice of runtimes, run priorities and sequences of the individual applications or of the different toolchains. This submits various jobs JOB to the computer cluster CC, wherein a job comprises the applications to be executed and the required data or parameters PAR, such as stimuli required for the simulation. The computers of the computer cluster CC are expediently set up for the parallel execution of several containers CON, such as virtual machines in particular, by executing a hypervisor on the processor, in particular a multicore CPU, of the individual computer. Preferably, the container CON comprises a job executor, which starts the desired software applications or toolchains on the basis of the submitted jobs and supplies them with the required data. One of the software applications executed can, for example, be a simulation environment SIM in which virtual ECUs or various encapsulated models are executed. The job executor logs the results RES and sends them after successful execution to a data memory Storage which can in particular also be arranged in the operating computer. The executed requests or jobs and the results obtained can be stored in the data memory Storage and made available for later evaluation. 
       FIG.  3    shows an exemplary embodiment of a container according to the invention. 
     The container CON comprises a basically arbitrary number of licensed software applications ANW, of which a simulation environment SIM, a database DBA, an environment model MOD, and a technical computing environment MAT are shown here as examples. The various applications ANW SIM, DBA, MOD and MAT are set up to query the presence of an application license via a license module LIM. Only if a license is available for the corresponding application will it be executed at all or with all features. In combination with a commercially available dongle, the applications could be executed on a single standard PC without any changes to the binary code. The license module LIM comprises a protected data area in which a link between several application licenses is stored with a unique identifier. The storing can also be done by including a signed plug-in for an application interface of the license module, wherein in the plug-in one or more sets of applications are defined and associated with a unique identifier. For example, a set of applications GRP 1  can be defined, which includes the simulation environment SIM and the database DBA and is linked with the unique identifier KEN  123 . Via an access module ZUG, the license module can access a secure data storage DAT, which contains any number of unique identifiers. The access module may include a decryption component and/or a timestamp verification component. In particular, the secured data storage DAT may be stored as an encrypted file in the file system, wherein access to the information is only possible, for example, with knowledge of the key, and/or the authenticity of the content is verified using a signature. 
     Furthermore, the container CON includes a settlement module ABR, which, in a protected data area, also contains the linking of a number of applications to a unique identifier. For example, a first toolchain GRP 1  may include, as applications, the simulation environment SIM and the database DBA and be associated with a first unique identifier KEN  123 , while a second toolchain GRP 2  may include as applications the environment model MOD and the computing environment MAT and may be linked with a second unique identifier KEN  456 . 
     The settlement module can be connected via a data link, in particular a network connection with a license source not shown here. Depending on the setting or demand, it will thereby request a usage unit for the first toolchain and/or the second toolchain. The setting can, for example, be made via a configuration file, or the settlement module could be queried with a parameter displaying the demand. If the license source authenticates itself to the settlement module (for example, by means of a challenge-response procedure) and this obtains a usage unit, then the settlement module provides the corresponding unique identifier(s) in the secure data area DAT; here, the first unique identifier KEN  123  is shown by way of example. 
     If the simulation environment SIM is started, it checks the presence of an application license via the license module. The unique identifier KEN  123  is stored in the secure data storage DAT. By means of the list of links stored in the protected data area of the license module, the license module recognizes that an existing unique identifier KEN  123  indicates an application license for the simulation environment SIM. After release by the license module, the simulation environment can be executed; it is expedient to periodically check that the unique indicator is still present. The settlement module periodically retrieves new usage units (not necessarily with the same period); if no usage unit is obtained, the settlement module removes the unique identifier (for example, by deleting from a file or by overwriting the secure data storage with zero values). 
     It is expedient to check for the presence of an application license each time an application is started. In the case of the example shown, the database DBA can be executed in addition to the simulation environment SIM. On the other hand, a query for the modeling environment MOD would show that no application license is available because it is not linked to the unique indicator KEN  123 . 
     The invention enables the licensing of toolchains of multiple, individual applications with existing dongle licensing without having to make any changes to the binary code of the individual applications. By adapting the settlement module, which acts as an adapter between the container and the outside world, various license sources can be used. In this case, the possibility of executing the toolchain in the container is licensed or settled, which means that simple usage-based licensing can be provided for complex applications. 
     The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are to be included within the scope of the following claims.