MyITGuy
5/1/2024 - 12:47 PM

Flexera App Portal Web Extension Design Flow

Flexera App Portal Web Extension Design Flow

Disclaimer

The information provided in this documentation was neither created by, nor is supported by, Flexera. It is my understanding of how the product works based on objective data.

Preface

This understanding makes the following assumptions:

  • The web browser is Microsoft Edge.
  • The 32-bit web extension supporting files are installed. (MSI)
  • The web extension is installed in the browser. (CRX)
  • The primary computer name discovery method is webext.
  • The secondary computer name discovery method is activex.
  • The fallback computer name discovery method is dns.

Informational

  • Web Extension Installation Location (msedge): %UserProfile%\AppData\Local\Microsoft\Edge\User Data\{Profile}\Extensions\{Extension-ID}\{Extension-Version}
  • Web Extension supporting files (MSI): %ProgramFiles% (x86)\Flexera\App Portal WebExtensions
  • Web Extension supporting files (chromium): %ProgramFiles% (x86)\Flexera\App Portal WebExtensions\Chromium
  • Web Extension ID (chrome): omfdapccbikpkiheohohbohhglmijeeb
  • Web Extension ID (chromium/msedge): aejhddcfmefciddeneccplpjlnkfmapo
  • Web Extension registry location: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Edge\NativeMessagingHosts\com.flexera.appportal.client.chromium
  • Web Extension executable: FlexeraAppPortalClient.exe

Undefined

  • Web Extension communication

Process

  1. App Portal is accessed by the user.
  2. A session with the App Portal web site is created.
  3. The session checks for the existence of the computer ID (cid) variable.
    NOTE If the cid variable exists, the cid is used, the Loader.aspx process is skipped.
  4. The session redirects to Loader.aspx using the parameters configured in the Web Site configuration of the Admin settings.
    Example /ESD/Loader.aspx?q=webext&f=dns
  5. The web extension is loaded in the browser
    1. background.js is loaded
      1. listener is added to receive connectNativeApp function from the content.js script
    2. content.js is loaded
      1. appportalclientinstalled class is added to the Loader.aspx body classlist
      2. listener is added to receive sendNativeMessage function from the background.js script.
    3. background.js listener receives connectNativeApp function
      1. calls com.flexera.appportal.client.chromium
      2. com.flexera.appportal.client.chromium calls ../FlexeraAppPortalClient.exe
        NOTE com.flexera.appportal.client.chromium class is defined by a JSON file of the same name. The path for this file is located in the Windows registry as the Data for the (default) value under HKEY_LOCAL_MACHINE\WOW6432Node\SOFTWARE\Microsoft\Edge\NativeMessageingHosts\com.flexera.appportal.client.chromium. The folder path of the com.flexera.appportal.client.chromium.json file is used as the root path for the execution of ../FlexeraAppPortalClient.exe.
      3. The output of FlexeraAppPortalClient.exe is sent back to content.js as JSON.
        NOTE The JSON return looks like this: {"ComputerName":"FLEXERABOX1"}
  6. Loader.aspx does the following:
    1. detectWebExtension function is called
      1. Queries for the existence of the appportalclientinstalled class in the classlist.
      2. loader function is called with a delay based on the value for ComputerDiscoveryMethodTimeout
        NOTE ComputerDiscoveryMethodTimeout should be set to, at least, 1.5x the actual run time of the FlexerAppPortalClient.exe run time. The concept is to account for delay between execution and presenting the data back to the loader function.
      3. loader function is called 1000 millisecond delay.
        IMPORTANT This unmanaged loader call causes a race condition; the FlexeraAppPortalClient.exe process has not completed on the local system causing the loader function to have neither q1 nor data populated. When this race condition is met, the service will use the fallback computer name detection method.
      4. cid variable is set to the ComputerName value returned in the JSON
      5. The user is redirected to Processor.aspx using the discovery method (d) and computer ID (cid).
        Example /ESD/Processor.aspx?d=webext&cid=FLEXERABOX1

Known Limitations

  • Inherent race-condition. The web extension hands off execution of the FlexeraAppPortalClient.exe process to the local system. The, now, external process may not complete within the time limit configured by the Web Site settings (maximum of 5 seconds). The external process is limited by, but not limited to, CPU, memory and disk utilization.

Problematic Scenarios