About the Default Linux Implementation

As a platform integrator you need to implement/use the Qeo Platform Security API in such a way that informs Qeo which registration procedure to use together with the data needed. The default Linux implementation provides an example on how to do this.

OTC Registration

The default Linux implementation supports both OTC and Remote Registration procedures. By default, the Local Registration procedure is used.  Qeo requests registration credentials, by calling the qeo_platform_security_registration_credentials_needed function. This results in the qeo_platform_on_registration_params_needed_cb callback being called. The default implementation prompts the user on the command line to enter the One Time Code (OTC) and the URL of the Security Management Server (SMS).

Setting Up Remote Registration

Remote Registration File

In order to use the remote registration procedure, you need a remote registration file. This is a simple text file containing the suggested user name and a registration window (expressed in seconds). below is an example: 

Example of remote registration file
this_user 120
Make sure both items are separated by a space character.
Enabling Remote Registration

In order to enable Remote Registration, set the environment variable REMOTE_REGISTRATION_FILE  to point to that file:

Example of remote registration file
> export REMOTE_REGISTRATION_FILE=<path to the file>

When Qeo requests the registration credentials and qeo_platform_on_registration_params_needed_cb is called:

  1. The default Linux implementation checks whether the REMOTE_REGISTRATION_FILE environment variable is set.
  2. If so, it tries to open the specified file for reading.
  3. If successful, it reads the suggested user name and registration window value from the file.
  4. It then passes on that information to Qeo using the qeo_platform_security_set_remote_registration_params function.

 

Icon

If the environment variable is not set or if anything goes wrong while trying to open the file, the default implementation falls back to the Local Registration procedure.

Device Confirmation

When Remote Registration is performed using the Android application, the remote registration procedure calls the qeo_platform_security_remote_registration_confirmation_needed function. The remote device is required to provide a response:

Example of remote registration confirmation
Management app wants to register us in realm <Realm-Name>, URL: HTTP:join.qeo.org/ . [Y/n]

Press enter or type Y to continue registration, type n to cancel registration.

Note that the file can be a regular file or a FIFO special file. The latter can be used to write the remote registration data only after the user has, for instance, pressed a button on the device.

Automatic Confirmation and Cancellation

You can set a device to automatically confirm by setting the REMOTE_REGISTRATION_AUTO_CONFIRM environment variable.

  • Setting the value to 1 corresponds with automatic confirmation,
  • Setting it to 0 corresponds with automatic cancellation. You will not be able to register the device.
Device Name

The device name, which is also shown on the WebUI is the user friendly name of the device. This string is part of DeviceInfo. This is provided by the platform integrator by implementing the <QEO_SDK>/c/platform/include/qeo/device.h header.

The current default implementation for this parameter is:

  • ‘uname --nodename’ for Linux platforms
  • ‘android.os.Build.MODEL’ + ‘android.os.Build.SERIAL` for Android platforms (some additional logic is applied for devices that do not implement the serial number correctly)