Itgenale014 as Production release and Beta release side by side

Momenteel is het niet mogelijk om zowel Latest Production Releases als BETA Products naast elkaar te draaien. Wanneer ik de licentie toevoeg aan beta release (20.1.267) ontneemt hij de licentie van productie release (20.0.111). Dit is ook andersom. Getest met Invantive Data Hub en Invantive Query Tool. Ik krijg de volgende foutmelding terug.

itgenale014: The license key is encrypted using an obsoleted encryption method. Please acquire an up-to-date license key and install it.

Welke mappen heb je in %USERPROFILE%\Invantive\Prd\Invantive Data Hub\Inst?

En in die mappen, staat daar telkens een bestand product-installation-user.settings.settings? Hierin wordt de licentiesleutel versleuteld opgeborgen in het XML-element met de naam EncryptedLicenseKey.

Aan het einde zie je als goed is ook onder AuditEvents hoe vaak het bestand overschreven wordt. Zie je hierin een “ruzie” tussen de twee versies om de licentiesleutel te wijzigen?

  <AuditEvent>
    <Machine>INVANTIVE</Machine>
    <MessageCode>itgenpig002</MessageCode>
    <MomentOccurrence>2020-11-06T13:19:22.7856136Z</MomentOccurrence>
    <Text>Changed setting of NumberOfProductInstallationStarts from '2' to '3'.</Text>
    <User>invantive\businessinnovation</User>
  </AuditEvent>
  <AuditEvent>
    <Machine>INVANTIVE</Machine>
    <MessageCode>itgenpig002</MessageCode>
    <MomentOccurrence>2020-11-06T13:19:22.9486147Z</MomentOccurrence>
    <Text>Changed setting of DateTimeLastUpgradeDetectedOnStart from '11/6/2020 1:17:21 PM' to '11/6/2020 1:19:22 PM'.</Text>
    <User>invantive\businessinnovation</User>
  </AuditEvent>

Vermoedelijk hetzelfde probleem. Raken steeds de licentie kwijt onder v20.0.110.

In %USERPROFILE%\Invantive\Prd\Invantive Data Hub\Inst staat niks. In de onderliggende map Data Hub wel.

3 november beginnen deze corrupte bestanden, dit is ook de datum dat versie 20.0.110 geïnstalleerd is.

There is an error in XML document (19, 34).

itgenemd002: Unknown node ‘LastLanguage’ in XML file on line 19, position 34, context ‘’.

InvantiveSystemException
System.InvalidOperationException

Dit staat in alle bestanden met een naam eindigend op -error.

It looks like it’s ping-ponging between two versions of the storage format for Data Hub installation settings. This also contains the encrypted licence key.

Could you try upgrading the 20.0.11 to a recent 20.0 release, for example 20.0.114? 20.0.11 is one of the first versions within 20.0.

And then try again.

RSA Implementation Used

If it still doesn’t work after that, it’s possible that two different RSA implementations are interfering with each other.

So please check what the value is of the environment variable INVANTIVE_RSA? Is it empty/absent or equal to INVANTIVE?

If the value of INVANTIVE_RSA is empty or different from INVANTIVE, please set it to INVANTIVE. Then reload the licence key on both 20.0 and 20.1 BETA if a licence key error occurs at startup. And then run the jobs again:

  • first a random job with 20.0
  • then a random 20.1 BETA job
  • then a 20.0 job again
  • and once more a 20.1 BETA

Does it work then?

Background

At least in 17.32 we used the built-in RSA encryption of Windows, but that turned out to be unreliably implemented or too difficult for our limited brain capacity. With Windows server patches, keys would regularly — but unpredictably — become invalid, and after patch Tuesday it was always a case of waiting to see whether we’d get flooded with calls because the servers could no longer process the jobs. This problem occurred on both on-premise and Azure and AWS servers. The most common error was something like:

Could not instantiate RSA crypto service provider for container 'InvantiveDevice' due to System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.

   at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
   at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
   at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
   at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
   at (Int32 , CspParameters )
   at IBC.IDJ.U(Int32 , CspParameters )
   at Invantive.Basics.StrongAsymmetricKey.CreateWindowsCryptoProvider(GlobalState owner, ExecutionOptions executionOptions, String keyContainerName)

Under Linux, Mac OSX, Android and iOS, Invantive SQL has had its own RSA implementation built in since the very first releases. Given the ongoing issues with Windows, at some point the default setting for Windows was also switched from the built-in RSA encryption to the in-house implementation.

Passing the Licence Key

An alternative option is to explicitly pass the licence key in every batch job. This can be done via the licensekey command-line option with Invantive Data Hub. An example of a batch job:

set INVANTIVE_TRACE_FOLDER=c:\trace\xxacme
set INVANTIVE_CONFIGURATION_DATABASES_FOLDER=c:\jobs\xxacme\cfg
set INVANTIVE_PRG=C:\Program Files (x86)\Invantive Software BV\Invantive Data Hub 20.0\Invantive.Producer.QueryEngine.exe
set INVANTIVE_CONN=groep\database
set INVANTIVE_SQL_FILE=c:\jobs\xxacme\sql\job.sql
set INVANTIVE_LOG_FILE=c:\jobs\xxacme\log\job-%%Y%%m.log
set INVANTIVE_LOG_FILE_OVERWRITE=False
set INVANTIVE_INTERACTIVE=False
set INVANTIVE_LICENSE_KEY=lhGCN...CBAcg==

"%INVANTIVE_PRG%" /verbose /database:"%INVANTIVE_CONN%" /file:"%INVANTIVE_SQL_FILE%" /logfile:"%INVANTIVE_LOG_FILE%" /logoverwrite:"%INVANTIVE_LOG_FILE_OVERWRITE%" /interactive:%INVANTIVE_INTERACTIVE% /licensekey:%INVANTIVE_LICENSE_KEY%

IF %ERRORLEVEL% NEQ 0 (
  echo Failed Data Hub job with exit code %ERRORLEVEL%.
  exit /b %ERRORLEVEL%
)

echo Completed Data Hub job with exit code %ERRORLEVEL%.

I can’t say in advance whether this will work completely, and certainly not for the combination of versions mentioned. That can only be determined through testing. It’s possible that it still keeps ping-ponging between the two versions and that, as a result, startup continues to give an itgenale014 error message.

Gebruikte RSA Implementatie

Ik ervaar het zelfde probleem

Getest met beta release (20.1.267) en productie release (20.0.111)

Licentiesleutel meegeven

Lijkt me niet een veilige oplossing? Wachtwoorden of licenties als tekst in een file zetten.

Kun je kijken wat er ingesteld staat bij INVANTIVE_RSA zoals boven beschreven? En indien nodig vervolgstappen volgen.

Qua licentiesleutel meegeven: dat is veilig voor dit toepassingsgebied. Je kunt als je licentiesleutel meegeeft toch ISO 2700[12] compliant werken. Implementeer op goede wijze 2 van de 3: kennis, locatie, bezit. En in de praktijk zal de sleutel niet leiden tot niet-terugdraaibare financiële transacties; als iemand die sleutel meeneemt en je hebt je zaakjes netjes op orde verder dan zal Invantive praktisch in een discussie zitten. In de audit-trails kunnen we goed achterhalen wie/wat/waar een sleutel gebruikt is.

De omgevingsvariabele INVANTIVE_RSA heeft voor ons niet geholpen. Licentiesleutel meegeven
werkt wel.

Dit is geen oplossing maar een workaround, enig idee wanneer dit probleem word opgelost?

Het probleem is nog niet reproduceerbaar helaas. Zou je in de trace files eens kunnen zoeken naar de zinsnede:

platform-specific RSA implementation

Ik ben nieuwsgierig wat daar. Er zijn drie mogelijkheden, telkens voor versie 20.0 en 20.1 BETA:

  • komt niet voor (dan zou traditionele versleuteling gebruikt zijn)
  • er staat Windows in (dat zou alleen kunnen op 20.0)
  • er staat “platform-independent”, dan zou het de Invantive implementatie zijn.

Ben nieuwsgierig naar de resultaten. We gaan in ieder geval versneld op versie 20.0 de Windows RSA versleuteling obsoleten.