Creating a Universal Data Source Connector

A universal connector is a Docker container that is used to connect any data source to the mobile platform. A connector acts as a mediator between a mobile platform server and a data source. If output data structure differs from JSON format structure, or data format is proprietary, a connector converts data into a valid format and allows for exchanging requests between a mobile platform server and a data source to execute operations with data. A connector and a data source can be connected by means of connection to a JSON or WEB data source on the mobile platform side.

Functional architecture of Foresight Mobile Platform with the use of a universal connector:

To use a universal connector:

  1. Create a Docker container on mobile platform server or in the cluster deployed based on Kubernetes, Deckhouse or OKD/OCP.

NOTE. If required, one can place a Docker container on a dedicated server or a data source server and start it manually.

  1. Set up connection to a JSON or WEB data source depending on a purpose of use.

Features of use of a universal connector with JSON and WEB data sources:

  1. Import resource of the JSON or WEB data source, to which a use request is to be sent from a mobile device.

After executing the operations, a universal connector will be used to send data from a source when data is requested from a mobile device.

User Authentication in Data Source

By default, to authenticate the user, a data source uses a specific authentication type specified in connection settings for a JSON or WEB data source - Basic, NTLM, Kerberos or guest login.

Scheme of this authentication method:

User authentication in a data source:

  1. The user sends a request from a mobile device to a mobile platform server to get or load data.

  2. A mobile platform server checks the obtained request, determines a authentication type, and send a request to a universal connector.

  3. A universal connector converts a request with information about authentication type from a mobile platform server into a request to a data sources and sends it.

  4. A data source executes user authentication and sends a response to a universal connector.

If required, one can use other authentication type:

NOTE. The use of other authentication type is available only if WEB data source connection is set up.

Two-factor authentication of the user:

  1. The user sends a request from a mobile device to a mobile platform server to get or load data with specifying an additional header, for example, "my_auth", which contains user credentials.

  2. A mobile platform server sends a request to a universal connector containing body of request, headers, and GET parameters specified in the received request. If additional GET parameters were set on resource import, they will also be sent in a request.

  3. A universal connector converts a request with information about user credentials in the "my_auth" header from a mobile platform server to a data source request and sends it.

  4. A data source executes user authentication and sends a response to a universal connector.

Scheme of use of two-factor authentication

Three-factor authentication of the user:

  1. The user sends a request from a mobile device to a mobile platform server to get or load data with specifying an additional header, for example, "my_auth", which contains user credentials and the Web-Authorization header. The Web-Authorization header will be used to execute authentication in a universal connector.

  2. A mobile platform server sends a request to a universal connector containing body of request, headers, and GET parameters specified in the received request, and replaces the Web-Authorization header with the Authorization header. If additional GET parameters were set on resource import, they will also be sent in a request.

  3. A universal connector executed user authentication based on the Authorization header and converts a request with information about user credentials in the "my_auth" header from a mobile platform server to a data source request and sends it.

  4. A data source executes user authentication and sends a response to a universal connector.

Scheme of use of three-factor authentication

See also:

Connecting Data Sources | Creating a Docker Container | Setting Up JSON Data Source Connection | Setting Up WEB Data Source Connection | Resource Import Options