intersystems / ipm

InterSystems ObjectScript Package Manager
MIT License
29 stars 19 forks source link

Need support to check proper IRIS license when installing a package #377

Open isc-mzhou opened 1 year ago

isc-mzhou commented 1 year ago

As we plan to launch new supply chain product through IPM, we would like to check if the IRIS instance has the proper license for the installation. For example, IRIS instance without a proper IRIS for Supply Chain license should not be allowed to install package "isc-supply-chain". See Slide 7 in this ppt file for proposed changes in IRIS for Supply Chain license key, which can be used to verify if an IPM installation should be allowed. https://intersystemscorporation-my.sharepoint.com/:p:/g/personal/mzhou_intersystems_com/EdAvFHy0DHhNvI_ZWvE8pfQB-7fH0nzf26TGqCc1kpDEfQ?e=ZqsES8

daimor commented 1 year ago

So, I suppose it just requires a specific feature flag in license. Then it can be implemented through the additional attribute in SystemRequirements tag

isc-mzhou commented 1 year ago

Since this will be applicable beyond supply chain, I will leave it to IPM PM to decide the best way forward. I only provided one possible solution.

daimor commented 1 year ago

I have no access to the slide, so, I just guessed

isc-mzhou commented 1 year ago

Somehow I cannot find your name in sharepoint to give you access. so I am pasting the slide here: image

daimor commented 1 year ago

Yeah, because I'm not part of the company

Well, using description part of the license does not look good, it should be through the Feature Flag

$system.License.GetFeature(X) https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.License

On screenshot it shown as Extended Features

isc-mzhou commented 1 year ago

Thanks for sharing the link. Looks like ideal solution is to make this work: $System.License.IsAppLicensed("isc-supply-chain") somehow. Please work with Bob on the proper solution, and supply chain will follow the same practice.

isc-tleavitt commented 1 year ago

I think this is a case for https://github.com/intersystems-community/zpm-registry/issues/66 rather than changes to IPM itself. cc @evshvarov and @isc-rkuszews

kuszewski commented 1 year ago

I see two needs here:

  1. ZPM Server needs to know about your organization and licensed products to let you download only the right products. (As is the case with the WRC downloads and with the InterSystems Container Registry today.

  2. We might add a feature to the IPM client so that it checks the license key before attempting to install. Note that the code will need to check the license anyway, but we can produce a cleaner user experience if we check at install time

isc-tleavitt commented 1 year ago

@kuszewski agreed.