Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleHow to enable encryption of business data, request and response between client and server in the application built using Canvas?

You can enable encryption for the application built using Canvas by setting the 'ENCRYPT_SERVER_CALLS' property to 'Y' in the 'systempreferences.properties' file.

Note

When you enable encryption, Canvas will encrypt all requests coming to your application including log out.

A sample 'systempreferences.properties' file is available in CTModelHouseResource.jar in the Model House application that comes as part of the Canvas platform package.

Note that you must stop and start your application server to enable this feature. After the application server is restarted, access the widgets in the application and check the Network tab in the browser console to verify the encryption.


Expand
titleError in Encrypt or Decrypt methodsEncryption is enabled, but not working

Check for following error pattern in the log file:

Code Block
linenumberstrue
[c.i.c.s.e.EncryptionUtils][ERROR] {[CTCOM00155]:Error occured in the decrypt JWT method : {}}
com.intellectdesign.canvas.servercomm.encryption.DecryptionException: no_error_message
	at com.intellectdesign.canvas.servercomm.encryption.AESEngine.decrypt
Caused by: javax.crypto.IllegalBlockSizeException: last block incomplete in decryption
	at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineDoFinal(Unknown Source) 

[com.intellectdesign.canvas.servercomm.encryption.PublicKeyImpl][ERROR] 
		{[CTRND00412]:Exception occurred in the Encryption and decryption of Req/Res : {}}
javax.crypto.BadPaddingException: unknown block type

Solution

If such error pattern occurs (line numbers 1, 2, 4, 7-9) in the logs, then check the following:

  1. Java version must be higher than 1.8.251.
  2. If the CT version is lower than 19.1.7.6_17307, then the bcprov-jdk16-1.46.jar file must be present.
  3. If the CT version is above 19.1.7.6_17307, then the bcprov-ext-jdk15to18-169.jar must be present.
  4. If the CT version is lower than 19.1.1.0, then the bcprov-ext-jdk15on-150.jar must be present.

...