Skip to end of metadata
Go to start of metadata

Authentication MessageType API IDs

Message Type DescriptionAPI Operation ID
ServerConfig1
ClientConfig2
Authentication3

Message Definitions

ServerConfig

The purpose of ServerConfigRequest request to get a server config from the server. The client needs to send this request after connecting to the server. If the client knows server properties, then there is no need to send this request.

Request 

ServerConfigRequest => {}

Response

ServerConfigResponse => NumberOfProperties {PropertyId PropertyValue}Description
NumberOfPropertiestype = int16The number of PropertyId:PropertyValue combinations
PropertyIdtype = int16 Supported values are listed in the table "Supported ServerConfig Response Properties - PropertyId"
PropertyValuevariable size, type = variableSupported values are in the table "Supported ServerConfig Response Properties - PropertyType"


Supported ServerConfig Response Properties

Server Response Properties
PropertyId
PropertyType
Description
SECURITY_ENABLED1booleanWhether security is enabled at server
DIFFIE_HELLMAN_KEY2byte[]The server Diffie-Hellman key if the credential is required to encrypt.
MAX_TIME_BETWEEN_CLIENT_PING3int32If the client connection is idle for MAX_TIME_BETWEEN_CLIENT_PING seconds then the server will close that connection.

ClientConfig

The Purpose of ClientConfigRequest request to send a client config to a server. The client needs to send this request after connecting to the server. This request is optional for a client unless a server is configured for the Diffie-hellman algorithm.

Request

ClientConfigRequest ==> NumberOfProperties {PropertyId PropertyValue}
Description
NumberOfPropertiestype = int16The number of PropertyId:PropertyValue combinations
PropertyIdtype = int16Supported values are listed in the table "Supported ClientConfig Request Properties - PropertyId"
PropertyValuevariable size, type = variableSupported values are listed in the table "Supported ClientConfig Request Properties - PropertyType"

Supported ClientConfig Request Properties

Client Request Properties
PropertyId
PropertyType
Description
 
CLIENT_ID1string

Unique id for the client; if a client doesn't send this property then the server

will just create id (client-host, client-port, server-host, server-port).

optional
ClIENT_READ_TIMEOUT2int32

The client will wait for CLIENT_READ_TIMEOUT for a server response. It's an optional

property.

optional
DIFFIE_HELLMAN_KEY3byte[]

The client Diffie-Hellman key is required to encrypt the credential.

If a server is configured with it then the client should send this.

Response

ClientConfigResponse ==> Success
Description
Successtype = booleanA boolean indicating is the call was successfull

Authentication

The purpose of AuthRequest to authenticate the client connection. A client can send the auth request in the following format. Before sending the auth request a client can verify the server config by sending the ServerConfigRequest. A client can send a key-value pair of credentials to authenticate itself.

Those pair needs to serialized in following way. If Diffie-Hellman encryption is enabled on the server side then need to encrypt those serialized bytes. And then send those encrypted bytes to the server. The server will decrypt those bytes and create the key-value pair.

Request

AuthRequest ==> isDiffieHellmanEnabled (NumberOfProperties {PropertyId PropertyValue} | NumberOfEncryptedBytes EncryptedCredentials )
Description
isDiffieHellmanEnabledtype = booleanA boolean to indicate if Diffie Hellman is enabled
NumberOfPropertiestype = int16The number of property pairs that have been defined
Propertyidtype = bytesSupported values are listed in the table "Supported Authentication Properties - PropertyId"
PropertyValuetype = bytesSupported values are listed in the table "Supported Authentication Properties - PropertyValue"
NumberOfEncryptedBytestype = int32The length raw EncryptedCredentials field
EncrptedCredentialstype = bytesThe encrypted credentials that need to be sent back to the server.

Response

AuthResponse => Success
Description

Success

type = booleanA flag indicating if the authentication request was successful

Error Code Definitions

Description
Error Code
AUTHENICATION_REQUIRED_EXCEPTION1
AUTHORIZATION_FAILED_EXCEPTION2
AUTHETICATIONFAILED_EXCEPTION3
  • No labels