Skip to main content
January 24, 2024
Question

JWT Token Generation from PKCS#8 Private key

  • January 24, 2024
  • 15 replies
  • 2 views

Hi, 

I am currently working on a use case  that requires the generation of JWT tokens based on PKCS#8 standards.  I've chosen JWT plugin for this task. However, it seems that this plugin is compatible only with private keys that are based on PKCS#1 (RSA) standards.

Is there any known workaround  to fulfill this requirement ?

 

Thanks, 

15 replies

mathieud0001
January 25, 2024

Did you try converting your pkcs 8 key into pkcs 1 and then using that with the JWT plugin?

openssl rsa -in pkcs8.key -out pkcs1.key

January 25, 2024

Yes, I tried but Snowflakes doesn't like that token, It supports PKCS#8 format only. 

stefanhelzle0001
January 25, 2024

The JWT plugin only implements a very specific subset of alle the things that you could do to a JWT.

But, there are plugins that directly connect to Snowflake systems. Did you try these?

January 25, 2024

Yes, Most likely needs additional configuration to set it correctly.

stefanhelzle0001
January 25, 2024

In the certificate URL the term "snowflakecomputing.com" is double. Is that intended?

June 14, 2024

The JWT plug-in has now been updated to support PKCS#8 keys community.appian.com/.../jwt-web-token-tools

August 14, 2024

[mention:693a27f43f1e4b278e1c0ed9195c728c:e9ed411860ed4f2ba0265705b8793d05]  I have a requirement to generate JWT token using the plug in and i am getting error  "appianprivatekeypassword or appianprivatekey for Credential Store was null". Can you please let me know how you configured the key value in adminconsole to generate token?. Thanks for help

      August 14, 2024

      Can you provide a screenshot of the function you are calling and the corresponding Third-party credential store? It should look something like this. app.screencast.com/eKW98q8GvemuT

      August 16, 2024

      Thanks [mention:4a63e259c677438390bdbff1307887c7:e9ed411860ed4f2ba0265705b8793d05] , we were missing some parameter and after we inputted the key, we are able to generate the token successfully. After creation of token, we pass that to Snowflake as Key/pair JWT Auth and it says invalid JWT Token which means it doesnt accept. Can you please let us know if any solution.