Hi all,
I'm trying to connect to Anaplan through Anaplan Connect tool using a Sectigo Certificate.
I'm able to connect using an hard coded credentials (user:pass) but when trying to connect via Certificate I'm facing the error below.
Note: I have received an "user.crt" file from Sectigo on which I ran the following openssl code to get the private key:
openssl x509 -inform der -in user.crt -out certificate.pem
@Echo on
rem This example loads a source text file and runs an Anaplan import into a module.
rem For details of how to configure this script see doc\Anaplan Connect User Guide.doc
set certificate="C:\Anaplan\anaplan-connect\certificates\certificate.pem"
set WorkspaceId="8a81b09459"
set ModelId="61XYZA7"
set Operation=-file "Employee.txt" -put "C:\Users\User\Downloads\Employee.txt"
-import "New Hire from Employee.txt" -execute -output "C:\My Errors.txt"
rem *** End of settings - Do not edit below this line ***
setlocal enableextensions enabledelayedexpansion || exit /b 1
cd %~dp0
set Credentials=-certificate %certificate%
set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%
@Echo %Command%
cmd /c %Command%
Thanks in advance
Ruben
Hi Anirudh,
Thanks for your quick reply,
The error that I'm getting is detailed below:
Running Anaplan Connect...
Using Class-Path: C:\Anaplan\anaplan-connect\anaplan-connect-1.4.4-jar-with-dependencies.jar
2020-06-23 18:55:54 ERROR 14272 |-- Anaplan API: Could not initialise service credentials (Runtime: Could not load the privateKey for authentication. Please check the privateKey parameters in your input.)
I will have a look into the interactive guide that you shared.
Best Regards,
Ruben
You need to add all the parameters
Regards
I believe that will be a further step (authentication through Java Key Store).
Firstly, I was trying to connect using my Sectigo certificate without the aforementioned option, simply using the certificate location.
Please see below a succesful example implemented by Elisa.
Thanks in advance,
Ruben
The Anaplan Connect version in that post is 1.3
which version are you using?
this is the guide for 1.4.4:
https://s3.amazonaws.com/anaplanenablement/Community/Anapedia/Anaplan_Connect_v1_4_4.pdf
I'm using Anaplan Connect 1.4 (latest version available) and followed the instructions below to get the CA certificate from Sectigo
Step #1 - Procure your CA Certificate from Sectigo
Navigate to Sectigo and purchase a Personal Authentication Certificate. The following link has been preconfigured to support Anaplan's certificate requirements:
URL: https://secure.trust-provider.com/products/!PlaceOrder?ap=Anaplan&product=506
Under User Details, complete the fields to specify Email Address, Forename, Surname.
Under Advanced Security Options, accept the pre-populated default values.
Under Login Credentials, set a Username, and Password.
Confirm the password.
Click Place Order.
Now I have access to an user.crt certificate sent it by Sectigo but no password file available.
Could you give me some guidance how do I get the respective password file related to the issued certificate?
Thanks
Ruben
It seems like the issue is because you are not referencing the private key at all in the script. In the successful scripts that I have run on 1.4.4, you have to 'set' the public certificate (what you already have) and set the private key. See the example below.
set CERTPATH="D:\prod_anaplan\prod_anaplan_connect\CAcertificate.pem" set PRIVATEKEY="D:\prod_anaplan\prod_anaplan_connect\private.key:"
Hope this is helpful.
Thanks,
Kathleen