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:
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.
Features of use of a universal connector with JSON and WEB data sources:
Resource data caching.
Data transformation using the JQ utility.
Transfer specified resource parameters in the request body sent from a mobile device to a mobile platform server.
Substitute GET parameters that were set on resource import during the request from a mobile platform server to a universal connector.
WEB:
Replace the Web-Authorization header with the Authorization header and substitute GET parameters that were set on resource import during the request from a mobile platform server to a universal connector.
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.
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:
The user sends a request from a mobile device to a mobile platform server to get or load data.
A mobile platform server checks the obtained request, determines a authentication type, and send a request to a universal connector.
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.
A data source executes user authentication and sends a response to a universal connector.
If required, one can use other authentication type:
Two-factor. Authentication is executed in a data source using a custom header.
Three-factor. Authentication is executed, first of all, in a universal connector and then in a data source using a custom header and the Web-Authorization header.
NOTE. The use of other authentication type is available only if WEB data source connection is set up.
Two-factor authentication of the user:
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.
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.
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.
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:
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.
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.
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.
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