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:
this_user 120
Enabling Remote Registration
In order to enable Remote Registration, set the environment variable REMOTE_REGISTRATION_FILE to point to that 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:
- The default Linux implementation checks whether the REMOTE_REGISTRATION_FILE environment variable is set.
- If so, it tries to open the specified file for reading.
- If successful, it reads the suggested user name and registration window value from the file.
- It then passes on that information to Qeo using the qeo_platform_security_set_remote_registration_params function.
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:
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.
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)