External Database Connector: Snowflake | Key pair

0
Hello,   I'm trying to test a connection between Mendix and snowflake using external database connector. I'm using Key pair and I already filled all the other fields, but I'm not sure how fill the field "Private key".     As you can see in the screenshot, I have the private and public key files in my folder, but I'm sure how fill the field making reference to the files.
asked
10 answers
1

Hi Lucas,

open you .pem file for private key

the pem file will have content like below

-----BEGIN PRIVATE KEY-----

[Base64 encoded private key]

-----END PRIVATE KEY-----

copy as it is and paste in private key, it will work 

 

Good luck!

answered
3

I figured it out. The problem is that your file is encrypted. You need to unencrypt it. 

The solution is:

Open the "openssl command window". Go directly to the path where your .pem file is stored. Then run the following command with the correct file names.

openssl rsa -in encrypted_key.pem -out unencrypted_key.pem 

 

 

The new file will give you the correct unencrypted file. Copy and paste it.

answered
1

Hello Sharad, thanks a lot for the information.

 

So I opened the .pem file and added to the field, but for some reason is still not being able to read the private key:

 

image.png

 

I already removed all the line breaks as well, so not sure what's is the issue.

answered
1

Hi Lucas,

you can use this website https://certlogik.com/decoder/ , just paste your private key and click on decode , it will format your private key

answered
1

Hi Sharad,

 

Thanks again. Unfortunately, Mendix is still showing me the same issue, so I'm wondering if there is something wrong with my keypair.

 

Below you can see a bit how my private key looks like when I open the .pem file:

 

image.png

 

And below, you can see the format, using the Website you provided to me:

 

image.png

 

So I copied the text, and I removed the single quote from the beginning and the end. I also removed the 'b' that came before the -----BEGIN PRIVATE KEY-----, and I also replaced the \r\n for only \n

 

image.png

 

image.png

 

But still getting the same error :(

 

image.png

answered
1

I have the same issue as Lucas as well. But the decoder can't even decode my file (see below). I tried multiple variants with \n as well at the very end of the file as some colleagues told me this is sometimes also necessary but nothing worked.

 

Your input may be a valid PKI object type not currently recognized by our decoder or it might contain an error. Check the ASN.1 information below for more details.

 

Decoder Error: Sorry we were unable to fully parse the data.
answered
1

Hi everyone,

I am also trying to connect Mendix to Snowflake via the external database connection and I have the same problem. I check if my .pem file is corrupted. But the ODBC connection works with it.

The decoder didn't help me either.

answered
1

Hi Wimmel,

 

It worked here, thanks a lot!!!!

 

I had to install openssl in my computer. If anyone also need to do the same, just check this video - https://www.youtube.com/watch?v=cBa87N_BZ4s

 

 

answered
0

Hi lucas

I have the same issue, how to fomite the private key by openssl.

answered
0

Hi Tang,

 

Please check Wimmel comments. You need to unencrype your private key with openSSL. In case you don't have openssl installed in your computer, please also check this video - https://www.youtube.com/watch?v=cBa87N_BZ4s

 

image.png

answered