Skip to content

Instantly share code, notes, and snippets.

@MyITGuy
Last active May 1, 2024 14:00
Show Gist options
  • Save MyITGuy/96e75672b10f4e0ffafec85b4e20820a to your computer and use it in GitHub Desktop.
Save MyITGuy/96e75672b10f4e0ffafec85b4e20820a to your computer and use it in GitHub Desktop.

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.

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
      3. cid variable is set to the ComputerName value returned in the JSON
      4. 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

  • There are times when all of the expectations have been met for the primary method to be used but, instead, the fallback method is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment