The Client App Security feature helps to secure data exchanged between a client app and a server app. Enterprise class applications may need to ensure that network traffic being exchanged between the server and client app is not tampered with. This feature detects and reports network traffic tampering on the data exchanged between the server and client app.
As a security best practice, it is recommended that you have different Kony Fabric applications with different security keys for Native and Web.
While exchanging data between a client app and a server app and if the data is tampered, the following error message appears:
1019
Http message Body Integrity Check failed
Note: You can enable HTTP Message Body Integrity by using Kony Fabric > Identity > SERVICE CONFIGURATION.
Custom App Security Key that is configured in Kony Fabric must be provided to the SDK prior to initializing the SDK using a preshow action.
setAppSecurityKey(customSecurityKey)
Input Parameter | Type | Description | Required |
---|---|---|---|
customSecurityKey | String | Custom security key defined in Kony Fabric by the user. It contains alphanumeric characters. | Yes |
Type | Value |
---|---|
Boolean | True |
JSON | JSON object with keys, errmsg and errcode. |
// Note: This piece of code must be called from preAppInit (i.e before SDK init) // Get an instance of SDK var client = kony.sdk.getCurrentInstance(); var response = client.setAppSecurityKey("customSecurityKey"); if (response !== null && response === true) { kony.print("Custom security key is set successfully"); } else { kony.print(response.errmsg + " and " + response.errcode); }
Error Code | Error Message |
---|---|
1023 | Security Key must be a non empty string. |
Copyright © 2019 Kony, Inc. All rights reserved. |