In order to successfully connect to the Anaplan Authentication service you will need to:
Generate a CA certificate. with access to both the public certificate and the private key
Add the public cert to the anaplan security site
Generate random byte** string
Sing random byte** string
**the random byte string IS NOT just a random string of characters. the byte referred to is actually a data field type. I have tested using random strings and encoding it and has not worked. The only way i got it to work is following the example of the Java script, and creating the random string and signed random string. An alternative method is to use anaplan's packaged process. This process calls the Anaplan Connect .jar file, which is part of zip file. This call only goes to the authentication value creation.
To use the anaplan process a Java Key Store (JKS) will need to be created. Once created, the .bat file included in the zip file will need to updated with the JKS location, JKS alias and JKS password. Screenshot of the successful process completion is provided below.
Here is the zip file of the certificate generator provided by the anaplan support team: certAuthGenerator.7z
The file: certAuthGenerator.bat needs to be configured to match your JKS (Java Key Store)
OR you can use the code below to create the same result
I have posted some code below. I used Eclipse to execute.