Anaplan Connect - Could not load the privateKey for authentication.

Options
ruben.garcia@peakepm.com
ruben.garcia@peakepm.com Member, ALL USERS, Certified Model Builder Posts: 5 New Contributor

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

Comments

  • ruben.garcia@peakepm.com
    ruben.garcia@peakepm.com Member, ALL USERS, Certified Model Builder Posts: 5 New Contributor

    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

  • ruben.garcia@peakepm.com
    ruben.garcia@peakepm.com Member, ALL USERS, Certified Model Builder Posts: 5 New Contributor

    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.

     

    https://community.anaplan.com/t5/Anaplan-Platform/Anaplan-Connect-Use-of-Certificate-in-script-does-not-work/m-p/36942#M523

     

    Thanks in advance,

     

    Ruben

  • ruben.garcia@peakepm.com
    ruben.garcia@peakepm.com Member, ALL USERS, Certified Model Builder Posts: 5 New Contributor

    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.

    source:
    https://support.onecloud.io/support/solutions/articles/48000982119-anaplan-certificate-authentication-setup


    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